query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
clicking on booking detail for validation after blocking ticket on bank transfer & atmKishor
public WebElement bookingDetails() { return findElement(repositoryParser, PAGE_NAME, "bookingDetails"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reviewBooking() {\n\t\telementUtil.doSendKeys(email, \"[email protected]\");\n\t\telementUtil.doSendKeys(mobile, \"83292382349\");\n\t\telementUtil.doSendKeys(name, \"sciripappa\");\n\t\telementUtil.doSelectValuesByIndex(gender, 1);\n\t\telementUtil.doSelectValuesByVisibleText(age, \"19\");\n\t\telementUtil.doClick(proceed);\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(10000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }", "@Then(\"the Booking page shows correct booking details\")\n public void bookingpage_verify_booking_details(){\n }", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "private void handleBooking() {\n\t\tString customerID;\n\t\tint recNo = table.getSelectedRow();\n\t\tif(recNo == -1){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcustomerID = JOptionPane.showInputDialog(mainPanel,\n\t\t\t\t\t\"Enter Customer ID (8 Digits)\");\n\t\t\tif (customerID != null) {\t\n\t\t\t\tcontroller.reserveRoom(recNo, customerID);\n\t\n\t\t\t\tupdateTable(nameSearchBar.getText(),\n\t\t\t\t\t\tlocationSearchBar.getText());\n\t\t\t}\n\t\t} catch (final InvalidCustomerIDException icide) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, \"Invalid format!\");\n\t\t} catch (final BookingServiceException bse) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, bse.getMessage());\n\t\t} catch (final ServiceUnavailableException sue) {\n\t\t\tJOptionPane.showMessageDialog(null, sue.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void v_Verify_Guest12_Displayed(){\n\t}", "@Override\n public void onCheckClick(String no, String deliv, String rtn, String delegate, String buyer, String status) {\n\n billNo = no;\n delivPlaceName = deliv;\n rtnPlaceName = rtn;\n consigneeCName = buyer;\n forwarderName = delegate;\n flowStatus = status;\n\n getDataList(false);\n }", "private void butCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butCheckActionPerformed\n\n Borrower bor = createBorrower();\n String date = tfDate.getText();\n\n if (driver.dateFormatValid(date)) {\n //valid date format, perform check out/in\n if (radBorrow.isSelected()) {\n //check out\n\n Book book = createBook();//create book\n\n if (!book.isOnLoan()) {\n //book is not on loan, can be loaned out\n\n //perform loan, inform user of success\n if (bor.borrow(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" loaned successfully to \" + bor.getName());\n\n } else {\n driver.errorMessageNormal(\"Book could not be loaned\");\n }\n\n } else {\n //is on loan\n driver.errorMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is already on loan.\");\n\n }\n\n } else if (radReturn.isSelected()) {\n //check in / returning\n\n Book book = createBook();\n\n if (book.isOnLoan()) {\n //book is on loan, and can be returned\n\n if (bor.returnBook(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" has been returned.\");\n\n } else {\n driver.infoMessageNormal(\"The book could not be returned.\");\n }\n\n } else {\n //not on loan\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is not on loan.\");\n }\n\n } else {\n driver.errorMessageNormal(\"Please select whether the book is being checked in or being returned.\");\n }\n\n } else {\n //invalid format\n driver.errorMessageNormal(\"Please ensure the date is in the format DD/MM/YYY\");\n }\n\n\n }", "public void clickNoFee() {\n rbNoFee.click();\n }", "public void v_Verify_Guest11_Displayed(){\n\t}", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "public void v_Verify_Guest2_Displayed(){\n\t}", "public void v_Verify_Guest9_Displayed(){\n\t}", "public void click_CheckavailabitlityButton()\r\n\t{\r\n\t\r\n\r\n\t\tSystem.out.println(\"Inside of the checkavailabitlity\");\r\n\t\t\r\n\t\t/*\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\r\n\t\tJavascriptexecutor(Checkavailability);\r\n\t\t//System.out.println(\"clicked on Checkavailability\");\r\n\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\r\n\t\t */\r\n\t\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\t\tif (Checkavailability.isDisplayed() ) \r\n\t\t{\r\n\t\t\t\r\n\t\t\t//Checkavailability.click();\r\n\t\t\tJavascriptexecutor(Checkavailability);\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\t\tExplicitWait(Checkavailability);\r\n\r\n\t\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t//System.out.println(\"BookNow button not found\");\r\n\t\t\tlogger.error(\"Check Availability button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Check Availability button not found\");\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n BookingLogin booking = new BookingLogin(accountType, user);\r\n booking.setVisible(true);\r\n }", "@Then(\"^user clicks on amend booking$\")\n\tpublic void user_clicks_on_amend_booking() throws Throwable {\n\t \n\t\tamendBooking = new AmendBookingPage();\n\t\tamendBooking.amend();\n\t\t\n\t\t\n\t}", "public void v_Verify_Guest8_Displayed(){\n\t}", "@Then(\"^the user can view their booking entry$\")\n public void the_user_can_view_their_booking_entry() throws Throwable {\n throw new PendingException();\n }", "public void v_Verify_Guest1_Displayed(){\n\t}", "public void v_Verify_Guest10_Displayed(){\n\t}", "public void v_Verify_Guest7_Displayed(){\n\t}", "public void bookFlight(){\n //Steps\n //1 Show the available flights. (at least one seat with 0)\n //2 User select a flight, and the system automatically set the seat with his id. he is not able to select the seat\n //3 User confirm the reservation \n //4 Flight reserved\n \n //1\n //FlightRepository.availableFlights();\n //Scanner input = new Scanner(System.in);\n //String flightNumber = input.nextLine();\n \n //2,3 and 4\n Flight flightObject = FlightRepository.getFlight(this.number);\n if (flightObject == null){\n System.out.println(\"Please select a valid flight number\");\n }\n flightObject.setPassengerSeat(this.PassengerID);\n }", "public void onClick(DialogInterface dialog, int which) {\n\r\n if (txtReprintBillNo.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please enter Bill Number\");\r\n return;\r\n } else if (tv_inv_date.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please enter Bill Date\");\r\n setInvoiceDate();\r\n return;\r\n } else {\r\n try {\r\n int InvoiceNo = Integer.valueOf(txtReprintBillNo.getText().toString());\r\n String date_reprint = tv_inv_date.getText().toString();\r\n tvDate.setText(date_reprint);\r\n Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(date_reprint);\r\n Cursor result = dbBillScreen.getBillDetail(InvoiceNo, String.valueOf(date.getTime()));\r\n\r\n\r\n if (result.moveToFirst()) {\r\n if (result.getInt(result.getColumnIndex(\"BillStatus\")) != 0) {\r\n int Custid = result.getInt(result.getColumnIndex(\"CustId\"));\r\n String jBilling_str = result.getString(result.getColumnIndex(\"BillingMode\"));\r\n Cursor crsr = dbBillScreen.getKOTItems(Custid, jBilling_str);\r\n if (crsr != null && crsr.moveToFirst()) {\r\n if (Integer.parseInt(jBilling_str) == 3) {\r\n MsgBox.Show(\"Warning\", \"Since this order is not delivered yet,\\nto delete bill ,kindly goto \\\"PickUp Status\\\" \" +\r\n \"\\n Select this customer and click \\\"Cancel Order \\\"\");\r\n } else if (Integer.parseInt(jBilling_str) == 4) {\r\n MsgBox.Show(\"Warning\", \"Since this order is not delivered yet, \\nto delete bill, kindly goto \\\"Delivery Status\\\" \" +\r\n \"\\n Select this customer and click \\\"Cancel Order \\\"\");\r\n }\r\n return;\r\n } else {\r\n VoidBill(InvoiceNo,String.valueOf(date.getTime()));\r\n }\r\n } else {\r\n\r\n //Toast.makeText(myContext, \"Bill is already voided\", Toast.LENGTH_SHORT).show();\r\n String msg = \"Bill Number \" + InvoiceNo + \" is already voided\";\r\n MsgBox.Show(\"Note\",msg);\r\n Log.d(\"VoidBill\", msg);\r\n }\r\n } else {\r\n //Toast.makeText(myContext, \"No bill found with bill number \" + InvoiceNo, Toast.LENGTH_SHORT).show();\r\n String msg = \"No bill found with bill number \" + InvoiceNo;\r\n MsgBox.Show(\"Note\",msg);\r\n Log.d(\"VoidBill\", msg);\r\n }\r\n ClearAll();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public void v_Verify_Guest3_Displayed(){\n\t}", "public void onClick(DialogInterface dialog, int which) {\n\n if (txtReprintBillNo.getText().toString().equalsIgnoreCase(\"\")) {\n messageDialog.Show(\"Warning\", \"Please enter Bill Number\");\n setInvoiceDate();\n return;\n } else if (tv_inv_date.getText().toString().equalsIgnoreCase(\"\")) {\n messageDialog.Show(\"Warning\", \"Please enter Bill Date\");\n setInvoiceDate();\n return;\n } else {\n try {\n int billStatus =0;\n int billNo = Integer.valueOf(txtReprintBillNo.getText().toString());\n String date_reprint = tv_inv_date.getText().toString();\n tvDate.setText(date_reprint);\n Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(date_reprint);\n Cursor LoadItemForReprint = db.getItemsFromBillItem_new(\n billNo, String.valueOf(date.getTime()));\n if (LoadItemForReprint.moveToFirst()) {\n Cursor cursor = db.getBillDetail_counter(billNo, String.valueOf(date.getTime()));\n if (cursor != null && cursor.moveToFirst()) {\n billStatus = cursor.getInt(cursor.getColumnIndex(\"BillStatus\"));\n if (billStatus == 0) {\n messageDialog.Show(\"Warning\", \"This bill has been deleted\");\n setInvoiceDate();\n return;\n }\n String pos = cursor.getString(cursor.getColumnIndex(\"POS\"));\n String custStateCode = cursor.getString(cursor.getColumnIndex(\"CustStateCode\"));\n if (pos != null && !pos.equals(\"\") && custStateCode != null && !custStateCode.equals(\"\") && !custStateCode.equalsIgnoreCase(pos)) {\n chk_interstate.setChecked(true);\n int index = getIndex_pos(custStateCode);\n spnr_pos.setSelection(index);\n //System.out.println(\"reprint : InterState\");\n } else {\n chk_interstate.setChecked(false);\n spnr_pos.setSelection(0);\n //System.out.println(\"reprint : IntraState\");\n }\n fTotalDiscount = cursor.getFloat(cursor.getColumnIndex(\"TotalDiscountAmount\"));\n float discper = cursor.getFloat(cursor.getColumnIndex(\"DiscPercentage\"));\n reprintBillingMode = cursor.getInt(cursor.getColumnIndex(\"BillingMode\"));\n\n tvDiscountPercentage.setText(String.format(\"%.2f\", discper));\n tvDiscountAmount.setText(String.format(\"%.2f\", fTotalDiscount));\n tvBillNumber.setText(txtReprintBillNo.getText().toString());\n\n tvIGSTValue.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"IGSTAmount\"))));\n tvTaxTotal.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"CGSTAmount\"))));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"SGSTAmount\"))));\n tvSubTotal.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"TaxableValue\"))));\n tvBillAmount.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"BillAmount\"))));\n\n LoadItemsForReprintBill(LoadItemForReprint);\n Cursor crsrBillDetail = db.getBillDetail_counter(Integer.valueOf(txtReprintBillNo.getText().toString()));\n if (crsrBillDetail.moveToFirst()) {\n customerId = (crsrBillDetail.getString(crsrBillDetail.getColumnIndex(\"CustId\")));\n }\n }\n\n } else {\n messageDialog.Show(\"Warning\",\n \"No Item is present for the Bill Number \" + txtReprintBillNo.getText().toString() +\", Dated :\"+tv_inv_date.getText().toString());\n setInvoiceDate();\n return;\n }\n if(reprintBillingMode ==4 && billStatus ==2)\n {\n strPaymentStatus = \"Cash On Delivery\";\n }\n else\n strPaymentStatus = \"Paid\";\n isReprint = true;\n PrintNewBill();\n // update bill reprint count\n int Result = db\n .updateBillRepintCounts(Integer.parseInt(txtReprintBillNo.getText().toString()));\n ClearAll();\n if (!(crsrSettings.getInt(crsrSettings.getColumnIndex(\"Tax\")) == 1)) { // reverse tax\n REVERSETAX = true;\n }else\n {\n REVERSETAX = false;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void v_Verify_Guest5_Displayed(){\n\t}", "public void onClick(DialogInterface dialog, int which) {\n\r\n if (txtReprintBillNo.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please enter Bill Number\");\r\n setInvoiceDate();\r\n return;\r\n }else if (tv_inv_date.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please enter Bill Date\");\r\n setInvoiceDate();\r\n return;\r\n } else {\r\n try\r\n {\r\n int billStatus =0;\r\n int billNo = Integer.valueOf(txtReprintBillNo.getText().toString());\r\n String date_reprint = tv_inv_date.getText().toString();\r\n tvDate.setText(date_reprint);\r\n Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(date_reprint);\r\n Cursor LoadItemForReprint = dbBillScreen.getItemsFromBillItem_new(\r\n billNo, String.valueOf(date.getTime()));\r\n if (LoadItemForReprint.moveToFirst())\r\n {\r\n Cursor cursor = dbBillScreen.getBillDetail(billNo,String.valueOf(date.getTime()));\r\n if (cursor != null && cursor.moveToFirst()) {\r\n billStatus = cursor.getInt(cursor.getColumnIndex(\"BillStatus\"));\r\n if (billStatus == 0) {\r\n MsgBox.Show(\"Warning\", \"This bill has been deleted\");\r\n setInvoiceDate();\r\n return;\r\n }\r\n String pos = cursor.getString(cursor.getColumnIndex(\"POS\"));\r\n String custStateCode = cursor.getString(cursor.getColumnIndex(\"CustStateCode\"));\r\n if (pos != null && !pos.equals(\"\") && custStateCode != null && !custStateCode.equals(\"\") && !custStateCode.equalsIgnoreCase(pos)) {\r\n chk_interstate.setChecked(true);\r\n int index = getIndex_pos(custStateCode);\r\n spnr_pos.setSelection(index);\r\n } else {\r\n chk_interstate.setChecked(false);\r\n spnr_pos.setSelection(0);\r\n }\r\n fTotalDiscount = cursor.getFloat(cursor.getColumnIndex(\"TotalDiscountAmount\"));\r\n float discper = cursor.getFloat(cursor.getColumnIndex(\"DiscPercentage\"));\r\n reprintBillingMode = cursor.getInt(cursor.getColumnIndex(\"BillingMode\"));\r\n\r\n tvDiscountPercentage.setText(String.format(\"%.2f\", discper));\r\n tvDiscountAmount.setText(String.format(\"%.2f\", fTotalDiscount));\r\n tvBillNumber.setText(txtReprintBillNo.getText().toString());\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"IGSTAmount\"))));\r\n tvCGSTValue.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"CGSTAmount\"))));\r\n tvSGSTValue.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"SGSTAmount\"))));\r\n tvSubTotal.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"TaxableValue\"))));\r\n tvBillAmount.setText(String.format(\"%.2f\", cursor.getDouble(cursor.getColumnIndex(\"BillAmount\"))));\r\n edtCustId.setText(cursor.getString(cursor.getColumnIndex(\"CustId\")));\r\n if(jBillingMode == 3 && cursor.getString(cursor.getColumnIndex(DatabaseHandler.KEY_ONLINE_ORDER_NO)) != null){\r\n etOnlineOrderNo.setText(cursor.getString(cursor.getColumnIndex(DatabaseHandler.KEY_ONLINE_ORDER_NO)));\r\n }\r\n\r\n LoadItemsForReprintBill(LoadItemForReprint);\r\n\r\n }\r\n\r\n } else {\r\n MsgBox.Show(\"Warning\",\r\n \"No Item is present for the Bill Number \" + txtReprintBillNo.getText().toString() +\", Dated :\"+tv_inv_date.getText().toString());\r\n setInvoiceDate();\r\n return;\r\n }\r\n if(reprintBillingMode ==4 && billStatus ==2)\r\n {\r\n strPaymentStatus = \"Cash On Delivery\";\r\n }\r\n else\r\n strPaymentStatus = \"Paid\";\r\n isReprint = true;\r\n PrintNewBill(date_reprint, 1);\r\n // update bill reprint count\r\n int Result = dbBillScreen\r\n .updateBillRepintCount(Integer.parseInt(txtReprintBillNo.getText().toString()));\r\n ClearAll();\r\n if (!(crsrSettings.getInt(crsrSettings.getColumnIndex(\"Tax\")) == 1)) { // reverse tax\r\n REVERSETAX = true;\r\n }else\r\n {\r\n REVERSETAX = false;\r\n }\r\n\r\n\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public Event validateBooking(RequestContext context) {\n\tBooking booking = (Booking) context.getFlowScope().get(\"booking\");\n\tCalendar calendar = Calendar.getInstance();\n\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\tif (booking.getCheckinDate().before(calendar.getTime())) {\n\t context.getMessageContext().addMessage(\n\t\t Messages.text(\"checkinDate\", \"Check in date must be a future date\", Severity.ERROR));\n\t return error();\n\t} else if (!booking.getCheckinDate().before(booking.getCheckoutDate())) {\n\t context.getMessageContext().addMessage(\n\t\t Messages.text(\"checkoutDate\", \"Check out date must be later than check in date\", Severity.ERROR));\n\t return error();\n\t}\n\treturn success();\n }", "@Test \n\tpublic void testbookticket(){\n\t\tboolean check =theater.bookTicket( \"Regal_Jack\",\"Star Wars\", 80, \"1500\");\t\t\n\t\tassertEquals(false,check);\n\t\tboolean check1 =theater.bookTicket( \"Regal_Jack\",\"Star Wars\", 40, \"1500\");\n\t\tassertEquals(false,check1);\n\t}", "@Override\n public void onSureClick(String value) {\n tenPayPopWindow.dismiss();\n checkPresenterImpl.addTenPayPayment(cashierResult.bill.unpaid, value);\n }", "public ActionForward checkBllingCycle(ActionMapping mapping,\n ActionForm form,\n HttpServletRequest request,\n HttpServletResponse response)\n throws TPlusException,Exception {\n\t \n\t ActionErrors errors = null;\n\t //form\n\t CardBillingForm objForm = (CardBillingForm)form;\n\t objForm.setIssuerId((String)request.getSession(false).getAttribute(\"ISSUER\"));\n\t //DtoCreation\n\t CardBillingDto objDto = new CardBillingDto();\n \n try {\n BeanUtils.copyProperties(objDto,objForm);\n //Action execution\n \t CardBillingManager objManager = new CardBillingManager();\n \t objDto = objManager.checkBllingCycle(objDto);\n \t BeanUtils.copyProperties(objForm,objDto);\n }\n catch (Exception e){\n \t System.out.println(\"Error converting to form bean in CardBillingDispatchAction checkBllingCycle method: \" + e.getMessage());\n throw new TPlusException(\"Could not populate the form bean in CardBillingDispatchAction checkBllingCycle method: \" + e);\n }\n \n \t//to checking Day of Month\n \t \t\tint dayOfMonth = objDto.getNextCycleDate();\n \t \t // if( dayOfMonth==0) System.out.println(\"Billing error\");\n \t \t \tGregorianCalendar c = new GregorianCalendar();\n \t \t if (c.get(Calendar.DAY_OF_MONTH) != dayOfMonth){\n\t\t \t errors = new ActionErrors();\n\t\t\t\t errors.add(\"Error\", new ActionError(\"error.todayisnotbillingdate\"));\n\t\t\t\t saveErrors(request, errors);\n\t\t\t}else\n\t\t\t\t{\n\t\t\t // errors = new ActionErrors();\n\t\t // errors.add(\"Error\", new ActionError(\"error.todayisbillingdate\"));\n\t\t // saveErrors(request, errors);\n\t\t request.setAttribute(\"TODAYISBILLINGDATE\", \"\");\n\t\t }\n\t return mapping.findForward(\"success\");\n}", "public boolean checkoutBooking() {\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tboolean bookUpdateSuccess = false;\r\n\r\n\t\t/**\r\n\t\t*\tSet the endTime as now\r\n\t\t*/\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(date.getTime());\r\n\r\n\t\t/**\r\n\t\t*\tCalculate the cost base on the time elapsed between the start time and end time\r\n\t\t*\tdurationMinutes = (difference b/w end and start time) / 1000 to convert millis to seconds / 60 to convert seconds to minutes\r\n\t\t*/\r\n\t\tlong start = startTime.getTime();\r\n\t\tlong end = endTime.getTime();\r\n\t\tlong durationMinutes = (end - start)/60000;\r\n\r\n\t\t/**\r\n\t\t*\tThe cost is set as Rs. 1.27 per minuteand hence will be calulated using durationMinutes\r\n\t\t* The cost will be calculated according to absolute minutes and no decimals will be considered there\r\n\t\t*/\r\n\t\tcost = durationMinutes * 1.27;\r\n\r\n\t\t/**\r\n\t\t*\tShow the cost and confirm to checkout.\r\n\t\t*/\r\n\t\tSystem.out.print(\"\\n\\tTotal cost calculated: \" + cost + \"\\n\\n\\t1. Confirm Checkout\\n\\t2. Cancel\\n\\t\\t>> \");\r\n\t\tint opt = scan.nextInt();\r\n\r\n\t\tswitch (opt) {\r\n\t\t\tcase 1: {\t//confirm checkout\r\n\t\t\t\t//do nothing and move ahead towards the checkout procedure\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 2: {\t//Cancel\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tdefault: {\r\n\t\t\t\tSystem.out.println(\"Invalid Option\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and updating data (executeUpdateParklot())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection checkoutBookingConn = new DbConnection();\r\n\r\n\r\n\t\t\t/**\r\n\t\t\t*\tupdate the data in table\r\n\t\t\t*/\r\n\t\t\tbookUpdateSuccess = checkoutBookingConn.executeUpdateBooking(endTime, cost, bookingNo);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No booking with the given booking number found.\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn bookUpdateSuccess;\r\n\t}", "public void ClickChecoutInsertBillingInfobutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout InsertBillingInfo submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btncheckoutInsertBillingInfo\"));\r\n\t\t\tSystem.out.println(\"Checkout InsertBillingInfo submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout InsertBillingInfo submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout InsertBillingInfo submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutInsertBillingInfo\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void actionPerformed(ActionEvent e) {\r\n JTextField ownerTf;\r\n String mes;\r\n\r\n String record[] = getRecordOnPan();\r\n\r\n try {\r\n int match[] = data.find(record);\r\n \r\n if (match.length > 1) {\r\n updateStatus(\"More than one match record.\");\r\n return;\r\n } else if (match.length == 0) {\r\n updateStatus(\"Record not found.\");\r\n return;\r\n }\r\n \r\n ownerTf = new JTextField();\r\n ownerTf.setText(record[5]);\r\n mes = \"Enter customer id\";\r\n \r\n int result = JOptionPane.showOptionDialog(\r\n frame, new Object[] {mes, ownerTf},\r\n \"Booking\", JOptionPane.OK_CANCEL_OPTION,\r\n JOptionPane.PLAIN_MESSAGE,\r\n null, null, null);\r\n\r\n if (result == JOptionPane.OK_OPTION) {\r\n record[5] = ownerTf.getText();\r\n bc.handleUpdateGesture(match[0], record);\r\n updateStatus(\"Subcontractor booked.\");\r\n }\r\n } catch (Exception ex) {\r\n updateStatus(ex.getMessage());\r\n }\r\n }", "public void BookRoom() throws InterruptedException\r\n\t{\r\n\t\tExplicitWait(Booknow);\r\n\r\n\t\tThread.sleep(2000);\r\n\t\tif (Booknow.isEnabled()) \r\n\t\t{\r\n\t\t\tBooknow.isDisplayed();\r\n\t\t\tJavascriptexecutor(Booknow);\r\n\r\n\t\t\t//System.out.println(\"Clicked on Booknow\");\r\n\t\t\tSeleniumRepo.waitForPageLoaded(); \r\n\t\t\tExplicitWait(verify_Headingrooms);\r\n\t\t\tlogger.info(\"Clicked on Booknow\");\r\n\t\t\ttest.log(Status.INFO, \"Clicked on Booknow\");\r\n\r\n\t\t} else \r\n\t\t{\r\n\t\t\t//System.out.println(\"BookNow button not found\");\r\n\t\t\tlogger.error(\"BookNow button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"BookNow button not found\");\r\n\r\n\t\t}\r\n\t}", "public void v_Verify_Guest4_Displayed(){\n\t}", "@When(\"^I click on Book button$\")\n\tpublic void i_click_on_Book_button() throws Throwable {\n\t\tfs.selectBookOption();\n\t}", "public void clickBookCall(){\r\n\t\tclickXPath(BOOKCALL_XPATH);\r\n\t\tReporter.log(\"Book call was clicked <br>\", true);\r\n\t}", "public void v_Verify_Guest6_Displayed(){\n\t}", "public void PurchaseTicket_OnClick(View view){\n\t\tVibrateButton();\n\t\tpurchaseTicket();\n\t}", "public void ClickPlansOfferedPage() {\r\n\t\tplansoffered.click();\r\n\t\t\tLog(\"Clicked the \\\"Plans Offered\\\" button on the Birthdays page\");\r\n\t}", "void clickOnVehicleAddStatus() {\n\t\tSeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\n\t}", "public void onClick(DialogInterface dialog, int which) {\n Cursor User = db.getUserr(txtUserId.getText().toString(),\n txtPassword.getText().toString());\n if (User.moveToFirst()) {\n if (User.getInt(User.getColumnIndex(\"RoleId\")) == 1) {\n //ReprintVoid(Byte.parseByte(\"2\"));\n int result = db.makeBillVoids(invoiceno, Invoicedate);\n if(result >0)\n {\n Date dd = new Date(Long.parseLong(Invoicedate));\n String dd_str = new SimpleDateFormat(\"dd-MM-yyyy\").format(dd);\n String msg = \"Bill Number \"+invoiceno+\" , Dated : \"+dd_str+\" voided successfully\";\n // MsgBox.Show(\"Warning\", msg);\n Toast.makeText(BillingCounterSalesActivity.this, msg, Toast.LENGTH_SHORT).show();\n Log.d(\"VoidBill\", msg);\n }\n } else {\n messageDialog.Show(\"Warning\", \"Void Bill failed due to in sufficient access privilage\");\n }\n } else {\n messageDialog.Show(\"Warning\", \"Void Bill failed due to wrong user id or password\");\n }\n }", "protected void validateAction() {\r\n\t\tthis.lblLoading.setVisible(true);\r\n\t\tThread longThread = new Thread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tMajFicheClientCarteFidelite.this.newsletter = MajFicheClientCarteFidelite.this.valeurCaseNewsletter;\r\n\t\t\t\tif (checkfields()) {\r\n\t\t\t\t\tconfirmation();\r\n\t\t\t\t} else {\r\n\t\t\t\t\talerte();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tlongThread.start();\r\n\t}", "@Test\n public void userClicksAgree_RedirectsToRequestPickup(){\n //Validates the agree button exists\n onView(ViewMatchers.withId(R.id.button_rules_agree)).perform(click());\n\n //Checks that the Request ride page appears\n Activity mRequestRide = mInstrumentation.waitForMonitorWithTimeout(mRulesMonitor, 1000);\n Assert.assertNotNull(mRequestRide);\n }", "private void payButtonClicked() {\n if (checkBoxAgreedTAC.isChecked()) {\n boolean validCard = validateCard();\n if (validCard) {\n Double payAmount = Double.parseDouble(textViewPrepaidPrice.getText().toString());\n MainActivity.bus.post(new PrepayPaymentAttemptEvent(payAmount, Long.parseLong(litersToBuy.getText().toString())));\n if (PrepayCalculatorFragment.this.payDialog != null) {\n PrepayCalculatorFragment.this.payDialog.dismiss();\n }\n }\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.TACMustAgreedMessage), Toast.LENGTH_SHORT).show();\n }\n\n }", "private void butTools_Click(Object sender, System.EventArgs e) throws Exception {\n FormFeeSchedTools FormF = new FormFeeSchedTools(FeeSchedC.getListShort()[listFeeSched.SelectedIndex].FeeSchedNum);\n FormF.ShowDialog();\n if (FormF.DialogResult == DialogResult.Cancel)\n {\n return ;\n }\n \n Fees.refreshCache();\n ProcedureCodes.refreshCache();\n changed = true;\n if (Programs.isEnabled(ProgramName.eClinicalWorks))\n {\n fillFeeSchedules();\n }\n \n //To show possible added fee schedule.\n fillGrid();\n SecurityLogs.MakeLogEntry(Permissions.Setup, 0, \"Fee Schedule Tools\");\n }", "private void butEditFeeSched_Click(Object sender, System.EventArgs e) throws Exception {\n long selectedSched = 0;\n if (listFeeSched.SelectedIndex != -1)\n {\n selectedSched = FeeSchedC.getListShort()[listFeeSched.SelectedIndex].FeeSchedNum;\n }\n \n FormFeeScheds FormF = new FormFeeScheds();\n FormF.ShowDialog();\n DataValid.setInvalid(InvalidType.FeeScheds,InvalidType.Fees,InvalidType.ProcCodes);\n //Fees.Refresh();\n //ProcedureCodes.RefreshCache();\n changed = true;\n fillFeeSchedules();\n for (int i = 0;i < FeeSchedC.getListShort().Count;i++)\n {\n if (FeeSchedC.getListShort()[i].FeeSchedNum == selectedSched)\n {\n listFeeSched.SelectedIndex = i;\n }\n \n }\n fillGrid();\n SecurityLogs.MakeLogEntry(Permissions.Setup, 0, \"Fee Schedules\");\n }", "public void netLinkTurnOnCard(final String status, String bdpId, String times) {\n\n Map<String, String> params = new HashMap<>();\n params.put(ApiKey.COMMON_TOKEN, AppUtils.getToken(mFragment.getActivity()));\n params.put(ApiKey.VERIFY_NO, \"1\");\n params.put(ApiKey.BOOKING_NO, String.valueOf(booking.getBookingNo()));\n params.put(ApiKey.BOOKING_STATUS, status);\n params.put(ApiKey.SHOPPING_PRICING_TIMES_FLG, booking.getPricingTimesFlg());\n params.put(ApiKey.SHOPPING_PRICING_TIMES, times);\n params.put(ApiKey.SHOPPING_PRICING_BDP_ID, bdpId);\n\n HttpManager<JsonBookingDetailList> hh = new HttpManager<JsonBookingDetailList>(mFragment) {\n @Override\n public void onJsonSuccess(JsonBookingDetailList jo) {\n int returnCode = jo.getReturnCode();\n String msg = jo.getReturnInfo();\n if (returnCode == Constants.RETURN_CODE_20201_MODIFY_SUCCESSFULLY) {\n TeeTimeAddFragment teeTimeAddFragment = (TeeTimeAddFragment) mFragment;\n teeTimeAddFragment.refreshView(parentPosition, position);\n\n if (\"1\".equals(status)) {\n booking.setBookingStatus(0);\n } else {\n booking.setBookingStatus(1);\n }\n } else {\n Utils.showShortToast(mFragment.getActivity(), msg);\n }\n }\n\n @Override\n public void onJsonError(VolleyError error) {\n\n }\n };\n hh.start(mFragment.getActivity(), ApiManager.HttpApi.TurnOnCard, params);\n }", "public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}", "@SuppressWarnings(\"deprecation\")\n\t\t\t\tpublic void onClick(View v) \n\t {\n\t \tif (emailCheckedBool == true)\n\t \t{\n\t \tString[] to = {\"[email protected]\", \"[email protected]\"}; \n\t String[] cc = {\"[email protected]\"}; \n\t \tsendEmail(to, cc,getApplicationContext().getResources().getString(R.string.support),\n\t \"Email Contents will go here\");\n\t \t}\n\t \t\n\t \t\n\t \t// for the pending intent\n\t \t\n\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\n\t\t\t\t\t// messages to be added to the notification \n\t\t\t\t\tCharSequence contentTitle = \"Thank You For Youre Booking\";\n\t\t\t\t\tCharSequence contentText = \"Recommened Service for Car-Hire\";\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// an intent to open a webpage\n\t\t\t\t\tIntent msgIntent = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t.parse(\"http://www.autoeurope.ie/\"));\n\t\t\t\t\t\n\t\t\t\t\t// the pending intent to flag the new task \n\t\t\t\t\tPendingIntent intent = PendingIntent.getActivity(Confirmation.this, 0, msgIntent,\n\t\t\t\t\t\t\tIntent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\n\t\t\t\t\tmsg.defaults |= Notification.DEFAULT_SOUND;\n\t\t\t\t\tmsg.flags |= Notification.FLAG_AUTO_CANCEL;\n\n\t\t\t\t\tmsg.setLatestEventInfo(context, contentTitle, contentText,\n\t\t\t\t\t\t\tintent);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tmNManager.notify(NOTIFY_ID, msg);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// start next activty \n\t\t\t\t\t\n\t\t\t\t\tstartBookingDetails();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t \t\n\t }", "public void CashonDeliverySubmit(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cashondelivery should be submitted\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnsubmitorder\"));\r\n\r\n\t\t\tif(isExist(locator_split(\"btnsubmitorder\"))){\r\n\r\n\t\t\t\tclick_submitorder_creditcard();\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Cashondelivery should be clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Cashondelivery button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnsubmitorder\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public void run() {\n final androidx.appcompat.app.AlertDialog.Builder continueBookingDialog = new AlertDialog.Builder(view.getContext());\n continueBookingDialog.setTitle(\"Book locker for \" + marker.getTitle() + \" \" + marker.getSnippet() +\"?\");\n // resendVerificationMailDialog.setView(resendVerificationEditText);\n continueBookingDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent intent = new Intent(getActivity(), BookingActivity.class);\n intent.putExtra(\"title\", marker.getTitle());\n intent.putExtra(\"postal\",post);\n Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n .show();\n getActivity().startActivity(intent);\n }\n });\n continueBookingDialog.setNegativeButton(\"Back\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Automatically close the dialog\n\n }\n });\n continueBookingDialog.show();\n\n }", "@OnClick(R.id.accept_new_tickets)\n public void onAcceptNewTickets() {\n if (numberOfTicketsField.getText() == null || numberOfTicketsField.getText().toString().equals(\"\")) {\n Toast.makeText(getContext(), \"Please enter a valid number of tickets\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n Intent intent = new Intent();\n intent.putExtra(MOVIE_ORDER_BUNDLE, movieOrder);\n getActivity().setResult(Activity.RESULT_OK, intent);\n getActivity().finish();\n }\n }", "public boolean paymentActionPage(WebDriver driver,String Street,String Billingcity,String State,String Zipcode\r\n\t\t\t,String Cardholdersname,String Cardnumber,String Cardexpirymonth,String Cardexpiryyear,String cvv) throws InterruptedException\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t//PAYMENT PAGE\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='street']\")).clear();\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='street']\")).sendKeys(Street);//street\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='city']\")).clear();\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='city']\")).sendKeys(Billingcity);//Billingcity\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\tWebElement ele = driver.findElement(By.xpath(\"//select[@name='state']\"));//State\r\n\t\tSelect sel = new Select(ele);\r\n\t\tsel.selectByVisibleText(State);\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='zip']\")).clear();\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='zip']\")).sendKeys(Zipcode);//zipcode\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='cardholdername']\")).clear();\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='cardholdername']\")).sendKeys(Cardholdersname);//Cardholdersname\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"cardnumber\")).clear();\r\n\t\tdriver.findElement(By.id(\"cardnumber\")).sendKeys(Cardnumber);//Cardnumber\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\tWebElement ele1 = driver.findElement(By.xpath(\"//select[@class='card-expiry-month stripe-sensitive required form-control']\"));//Cardexpirymonth\r\n\t\tSelect sel1 = new Select(ele1);\r\n\t\tsel1.selectByVisibleText(Cardexpirymonth);\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\tWebElement ele2 = driver.findElement(By.xpath(\"//select[@class='card-expiry-year stripe-sensitive required form-control']\"));//Cardexpiryyear\r\n\t\tSelect sel2 = new Select(ele2);\r\n\t\tsel2.selectByVisibleText(Cardexpiryyear);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"cvv\")).clear();\r\n\t\tdriver.findElement(By.id(\"cvv\")).sendKeys(cvv);//cvv\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"diseablebtn\")).click();//Get Your Membership button\r\n\t\treturn true;\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "private void onClickEvents() {\n binding.createOfferOfferPeriodFrom.setOnClickListener(v -> openCalenderDialog(binding.createOfferOfferPeriodFrom, \"from\"));\n binding.createOfferOfferPeriodTo.setOnClickListener(v -> openCalenderDialog(binding.createOfferOfferPeriodTo, \"to\"));\n binding.createOfferSave.setOnClickListener(v -> {\n validation(offerTypeId);\n });\n\n binding.createOfferGenerateOfferIv.setOnClickListener(v -> {\n binding.createOfferGenerateOfferEditText.setText(getSaltString());\n });\n\n binding.createOfferIncludeExcludeProducts.setOnClickListener(v -> {\n\n if (offerId.equals(\"0\") || offerId.equals(\"\")) {\n utility.showDialog(\"Please select existing offer to include or exclude product\");\n }\n else {\n CreateOfferDirections.ActionCreateOfferFragmentToIncludeExcludeFragment action = CreateOfferDirections.actionCreateOfferFragmentToIncludeExcludeFragment();\n action.setOfferId(offerId);\n action.setMessage(offerCategoryName + \" Discount \" + amount + \" % \");\n navController.navigate(action);\n }\n });\n\n\n }", "public void backToFlights(){\n logger.debug(\"click on Back To Flights button\");\n driver.findElement(oBackToFlights).click();\n }", "public void cashondeliverysubmit(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Submit order button should be clicked\");\r\n\t\ttry{\r\n\t\t\twaitforElementVisible(locator_split(\"btnsubmitorder\"));\r\n\t\t\tclick(locator_split(\"btnsubmitorder\"));\r\n\t\t\tif(isExist(locator_split(\"btnsubmitorder\")))\r\n\t\t\t{\r\n\t\t\t\tclick(locator_split(\"btnsubmitorder\"));\r\n\t\t\t}\r\n\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"Submit order button is clicked.\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Submit order button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Submit order button is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnsubmitorder\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@When(\"user selects on AndhraBank\")\r\n\tpublic void usert_selects_on_Andhrabank() throws InterruptedException {\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.MINUTES);\r\n\t\t//driver.findElement(By.xpath(\"//div[@id='swit']/div[1]/label/i\")).click();\r\n\t\tdriver.findElement(By.xpath(\"//label[contains(text(),'Andhra Bank')]\")).click();\r\n\t}", "public void setBookingId(int booking_id) {\n this.booking_id = booking_id;\n }", "public void clickDepartsAsEarlyAs() {\n\t\tdepartsAsEarlyAsButton.click();\n\t}", "@Override\n public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n \n BookingOrderBean obj = (BookingOrderBean)form;\n HttpSession sess = request.getSession(false);\n String c_id = (String)sess.getAttribute(\"c_id\");\n Connection con = null;\n String key = null,email = null;\n con = Data.getConnection();\n DateFormat d = new SimpleDateFormat(\"yyyy-MM-dd\");\n String vdate = d.format(new Date());\n String vQuery = \"select * from bookingdetail where consumerid='\"+c_id+\"' and status ='booked' order by dateofbooking desc\";\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(vQuery);\n Date dat1 = null;\n if(rs.next()){\n st.close();\n rs.close(); \n response.getWriter().print(\"You can not Book a new refill request because Your Previous Order is Not Delivered You Can Use Your Previous Booked Order for New Refill\");\n return null;\n }\n \n else { \n vQuery = \"select * from bookingdetail where consumerid='\"+c_id+\"' and status ='Delivered' order by dateofbooking desc\";\n st = con.createStatement();\n rs = st.executeQuery(vQuery);\n if(rs.next()){\n dat1 = d.parse(rs.getString(\"dateofdelivery\")); \n Date dat2 = d.parse(vdate);\n long n = DateFunction.getDateDiff(dat1, dat2, TimeUnit.DAYS);\n if(n<30){\n st.close();\n rs.close();\n response.getWriter().print(\"In One Month you cannot refill your cylinder more than once ! Sorry \");\n return null;\n }\n }\n \n }\n \n String query = \"insert into Bookingdetail(status,consumerid,NoofCyl,prodid,remark) values (?,?,?,?,?)\";\n PreparedStatement pst = con.prepareStatement(query,Statement.RETURN_GENERATED_KEYS);\n pst.setString(1, \"Booked\");\n pst.setString(2, c_id);\n //pst.setString(3,vdate );\n pst.setString(3, obj.getQuantity());\n pst.setString(4, obj.getEquip());\n pst.setString(5, obj.getRemarks());\n int i = pst.executeUpdate();\n ResultSet rs1 = pst.getGeneratedKeys(); \n email=\"[email protected]\"; \n if(rs1.next()){\n key = rs1.getString(1); \n String message = \"<html><body style=\\\"text-align:center\\\">\"; \n message += \"Your order for following services has been submitted to your distributor\";\n //message += dist;\n message += \"<br/>Your Lovely Gas Seva Reference No. : \"+key;\n message += \"<br/>Equipment : \"+Data.Equipments[Integer.parseInt(obj.getEquip())];\n message += \"<br/>Quantity : \"+obj.getQuantity();\n message += \"<br/>Booking Date : \"+vdate;\n message += \"<br/>Your Consumer No : \"+c_id; \n message += \"</body></html>\";\n final String msg = message;\n final String mailId = email;\n \n new Thread(new Runnable(){\n @Override\n public void run() {\n try {\n new Bean_and_Action.SendMail().sendMail(mailId,\"Lovely Gas Seva\",\"Hello\",msg);\n } catch (MessagingException ex) {\n Logger.getLogger(SignUpFormAction.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }).start();\n \n con.close();\n response.getWriter().print(message);\n return null;\n }\n \n return null;\n}", "void clickOnDelivery(Delivery delivery);", "public void clickCashondeliveryradiobutton(){\r\n\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cashondelivery Radio button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"Cashondelivery_Spain\"));\r\n\t\t\tclick(locator_split(\"Cashondelivery_Spain\"));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\twaitforElementVisible(locator_split(\"Submitorder_Spain\"));\r\n\t\t\tclick(locator_split(\"Submitorder_Spain\"));\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Cashondelivery radio button clicked \");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Cashondelivery Radio button is not clicked \"+elementProperties.getProperty(\"Cashondelivery_Spain\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"Cashondelivery_Spain\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(priority = 4)\n\tpublic void inActiveBusService() {\n\t\tbusServiceId = \"60\";\n\t\tloginToAdminAccount();\n\t\tList<WebElement> serviceList = driver.findElements(By.xpath(\"//li[@id='Services']//a[text()='Services']\"));\n\t\t// System.out.println(\"webelement size:\"+serviceList.size());\n\t\tfor (WebElement serviceEle : serviceList) {\n\t\t\t// System.out.println(serviceEle.getText());\n\t\t\tif (serviceEle.getText().equals(\"SERVICES\")) {\n\t\t\t\tserviceEle.click();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tGeneral_Wait(2000);\n\t\tSelect select = new Select(byID(driver, propertyMap.get(\"admin_service_list\")));\n\t\tselect.selectByVisibleText(\"Service Master\");\n\t\tGeneral_Wait(3000);\n\t\tbyXPath(driver, propertyMap.get(\"search_field\")).sendKeys(propertyMap.get(\"search_bus\"));\n\t\tList<WebElement> busListed = driver.findElements(By.xpath(\"//tbody[@id='service-table-data']//tr//td[1]\"));\n\t\tSystem.out.println(\"total bus present related to this id:\" + busListed.size());\n\t\tGeneral_Wait(2000);\n\t\tfor (WebElement busId : busListed) {\n\t\t\tSystem.out.println(\"busId text:\" + busId.getText());\n\t\t\tGeneral_Wait(2000);\n\t\t\tif (busId.getText().equals(busServiceId)) {\n\t\t\t\tSystem.out.println(\"//tbody[@id='service-table-data']//tr[@id=\" + \"'\" + busServiceId + \"'\"\n\t\t\t\t\t\t+ \"]//button[@class='btn btn-primary btn-sm']\");\n\t\t\t\tdriver.findElement(By.xpath(\"//tbody[@id='service-table-data']//tr[@id=\" + \"'\" + busServiceId + \"'\"\n\t\t\t\t\t\t+ \"]//button[@class='btn btn-primary btn-sm']\")).click();\n\t\t\t\tGeneral_Wait(2000);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tGeneral_Wait(3000);\n\t\tbyXPath(driver, propertyMap.get(\"inactive_field\")).click();\n\t\tbyXPath(driver, propertyMap.get(\"save_bus\")).click();\n\t\tGeneral_Wait(3000);\n\t\tvalidateTest.reteriveInActiveBusId(driver, busServiceId);\n\t\tdriver.navigate().refresh();\n\t\ttry {\n\t\t\tbyXPath(driver, propertyMap.get(\"admin_icon\")).click();\n\t\t\tbyXPath(driver, propertyMap.get(\"admin_logout\")).click();\n\t\t\tGeneral_Wait(5000);\n\n\t\t} catch (UnhandledAlertException e) {\n\t\t\tAlert alert = driver.switchTo().alert();\n\t\t\tSystem.out.println(\"alertText:\" + alert.getText());\n\t\t\talert.accept();\n\t\t}\n\t\t// validateTest.validateLogout(driver);\n\t\tlogoutAdmin(driver);\n\t}", "@Override\n\tpublic boolean bookingStatus(UserDetails userDetails, FilghtDetails flightDetails) {\n\t\treturn false;\n\t}", "public void SpecialRateplan_Validation() throws InterruptedException\r\n\t{\r\n\t\tThread.sleep(3000);\r\n\r\n\t\tExplicitWait(Offercode);\r\n\t\tint No_of_offercdes=SpecialRateplans.size();\r\n\t\t//System.out.println(No_of_offercdes+\" offer codes are available\");\r\n\t\tfor(int i=1;i<=No_of_offercdes;i++)\r\n\t\t{\r\n\r\n\t\t\t//Confirms the xpath being used actually works \r\n\t\t\tWebElement Specialrateplan= SeleniumRepo.driver.findElement(By.xpath(\"(//input[@class='custom-radio-checkbox ng-isolate-scope none-outline']/..)[\"+i+\"]\"));\r\n\r\n\t\t\tif(Specialrateplan.isDisplayed())\r\n\t\t\t{\t\r\n\t\t\t\tString offercode=Specialrateplan.getText();\r\n\t\t\t\t////System.out.println(offercode);\r\n\t\t\t\t//System.out.println(\"Offer code present at \"+i+\" radio button SPECIAL RATES & OFFER CODE is \"+offercode);\r\n\t\t\t\ttest.log(Status.INFO, \"Obtained text is displayed successfully\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void ClickCommissionRatesPage() {\r\n\t\tcommissionrates.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Rates\\\" button on the Birthdays page\");\r\n\t}", "public String customer_request_booking(Customer_Booking cb){\n\t\tIdUser user= new IdUser();\n\t\tTransaction trns1 = null;\n Session session = HibernateUtil.getSessionFactory().openSession(); \n Booking_Request_Master book = new Booking_Request_Master();\n\t\ttry {\n trns1 = session.beginTransaction();\n Pickup_Location_Master pick_source=new Pickup_Location_Master();\n \tpick_source = (Pickup_Location_Master) session.createQuery(\"from Pickup_Location_Master where id=?\").setParameter(0, cb.getSource()).list().get(0);\n \tPickup_Location_Master pick_destin=new Pickup_Location_Master();\n \tpick_destin = (Pickup_Location_Master) session.createQuery(\"from Pickup_Location_Master where id=?\").setParameter(0, cb.getDestination()).list().get(0);\n \n \t\n book.setCreated_at(current_timestamp);\n book.setUpdated_at(current_timestamp);\n book.setProvided_time(cb.getTime()+\":00\");\n book.setSource_id(cb.getSource());\n book.setFrom_id(pick_source.getLocation_id());\n book.setDestination_id(cb.getDestination());\n book.setTo_id(pick_destin.getLocation_id());\n book.setDept_date(java.sql.Date.valueOf(cb.getDate()));\n book.setDept_time(java.sql.Time.valueOf(cb.getTime()+\":00\"));\n book.setNumber_of_booking(cb.getNumber_of_seat());\n book.setUser_id(user.getAuthentic());\n book.setEnabled(true);\n book.setStatus(\"Pending\");\n session.save(book);\n trns1.commit();\n } catch (RuntimeException e) {\n \te.printStackTrace();\n } \n\t\tfinally {\n session.flush();\n session.close();\n }\n\t\treturn \"success\";\n\t}", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n dialog_member.dismiss();\n eventFullDetails.Vol_CancelBooking(MemberList.get(position).getHostId());\n\n }", "@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }", "public void v_Verify_Guest11_Hidden(){\n\t}", "public void ClickConfirmationPage() {\r\n\t\tconfirmation.click();\r\n\t\t\tLog(\"Clicked the \\\"Confirmation\\\" button on the Birthdays page\");\r\n\t}", "public void v_Verify_Guest12_Hidden(){\n\t}", "private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }", "public void cliquerSauverContinuer() {\r\n\t\t\t\r\n\t\t\t//Identification du bouton et clic\r\n\t\t\tWebElement boutonSaveContinue = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//table[@id='\"+prefix()+\"y5-box']/tbody/tr[2]/td[2]\")));\r\n\t\t\tboutonSaveContinue.click();\r\n\t\t}", "public void onClick(DialogInterface dialog, int which) {\n Cursor User = dbBillScreen.getUser(txtUserId.getText().toString(),\r\n txtPassword.getText().toString());\r\n if (User.moveToFirst()) {\r\n if (User.getInt(User.getColumnIndex(\"RoleId\")) == 1) {\r\n //ReprintVoid(Byte.parseByte(\"2\"));\r\n int result = db.makeBillVoids(invoiceno, Invoicedate);\r\n if(result >0)\r\n {\r\n Date dd = new Date(Long.parseLong(Invoicedate));\r\n String dd_str = new SimpleDateFormat(\"dd-MM-yyyy\").format(dd);\r\n String msg = \"Bill Number \"+invoiceno+\" , Dated : \"+dd_str+\" voided successfully\";\r\n // MsgBox.Show(\"Warning\", msg);\r\n Toast.makeText(myContext, msg, Toast.LENGTH_SHORT).show();\r\n Log.d(\"VoidBill\", msg);\r\n }\r\n } else {\r\n MsgBox.Show(\"Warning\", \"Void Bill failed due to in sufficient access privilage\");\r\n }\r\n } else {\r\n MsgBox.Show(\"Warning\", \"Void Bill failed due to wrong user id or password\");\r\n }\r\n }", "public void addBooking(Bookings b) {\n IController<Bookings> ic = new Controller<>();\n\n // Check whether the booking conflicts with another booking.\n for (Bookings booking : ic.readAll(Bookings.class)) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n // Check whether the room is available at the given time.\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at this time.\");\n }\n // Check whether the students are available at that time.\n for (Students student : relatedModule.getStudents()) {\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time.\");\n }\n }\n // Check whether the staff members are available at that time.\n for (Staff staff : relatedModule.getStaff()) {\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time.\");\n }\n }\n\n // Put the booking into the database.\n ic.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }", "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "public void clickbtnApprove() {\n\t\twaitForElementClickable(10,btnApprove);\n\t\tclickByJavaScript(btnApprove);\n\t\tsleep(1);\n\t}", "public void verifyPopupShouldNotDisplayAfterPublishingTheAd() throws Exception {\n\t\t\tCreateStockTradusProPage createStockObj= new CreateStockTradusProPage(driver);\n\t\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\t\twaitTill(2000);\n\t\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\t\tloginPage.setAccountEmailAndPassword(\"[email protected]\", \"sunfra123\");\n\t\t\tjsClick(driver, loginPage.LoginButton);\n\t\t\twaitTill(5000);\n\t\t\tif(!verifyElementPresent(overviewObj.PostYourAdButtonOnWelcomePopup))\n\t\t\t{\n\t\t\t\tdriver.navigate().refresh();\n\t\t\t}\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.TradusWelcomeBox);\n\t\t\tjsClick(driver, overviewObj.PostYourAdButtonOnWelcomePopup);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.createStockPageVerificationElement);\n\t\t\tcreateStockObj.uploadImageButtonInPostingForm.sendKeys(System.getProperty(\"user.dir\") + \"\\\\Tire.jpeg\");\n\t\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\t\twaitTill(1000);\n\t\t\tscrollToElement(driver, createStockObj.priceSectionInPostingForm);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.priceTypeFieldPostingForm);\n\t\t\twaitTill(1000);\n\t\t\tactionClick(driver, createStockObj.priceTypeasFixed);\n\t\t\twaitTill(1000);\n\t\t\tif (!getText(createStockObj.currencyFieldAutofillValue).equalsIgnoreCase(\"EUR\")) {\n\t\t\t\tclick(createStockObj.currencyTypeFieldPostingForm);\n\t\t\t\twaitTill(1000);\n\t\t\t\tactionClick(driver, createStockObj.currencyTypeasEuro);\n\t\t\t}\n\t\t\tsendKeys(createStockObj.netPriceFieldPostingForm, \"10000\");\n\t\t\twaitTill(1000);\n\t\t\tscrollToElement(driver, createStockObj.yourVehicleSectionInPostingForm);\n\t\t\twaitTill(2000);\n\t\t\tclick(createStockObj.vehicleTypeFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleTypeasSpareParts);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.vehicleCategoryFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleCategoryasTires);\n\t\t\twaitTill(2000);\n\t\t\tclick(createStockObj.vehicleMakeFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleMakeasVolvo);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.vehicleModelFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleModelas8700);\n\t\t\twaitTill(4000);\n\t\t\tsendKeys(createStockObj.descriptionAreainPostingForm, \"Ad\");\n\t\t\tjsClick(driver, createStockObj.postYourAdButton);\n\t\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\t\tjsClick(driver, overviewObj.overviewOptioninSiderBar);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\t\twaitTill(5000);\n\t\t\tAssert.assertFalse(verifyElementPresent(overviewObj.TradusWelcomeBox),\n\t\t\t\t\t\"Welcome popup displaying even after clicking cross icon\");\n\t\t}", "public void onAction(IClientContext context, IGuiElement button) throws Exception\n\t{\n IDataTableRecord activeCampaign = TC.getActiveCampagne(context);\n \n // check whether the given object already has an order in the future\n //\n IDataTableRecord objectRecord = context.getSelectedRecord();\n IDataAccessor accessor = context.getDataAccessor();\n accessor.qbeClearAll();\n \n IDataTable orderTable = accessor.getTable(\"tc_order\");\n orderTable.qbeSetKeyValue(\"tc_object_key\", objectRecord.getValue(\"pkey\"));\n \n IDataTable capacityTable = accessor.getTable(\"tc_capacity\");\n capacityTable.qbeSetKeyValue(\"tc_campaign_key\", activeCampaign.getValue(\"pkey\"));\n capacityTable.qbeSetValue(\"slot\", \">now\");\n \n IDataBrowser orderBrowser = accessor.getBrowser(\"tc_orderBrowser\");\n orderBrowser.search(\"r_tc_order\", Filldirection.BACKWARD);\n if (orderBrowser.recordCount() > 0)\n {\n IOkCancelDialog dialog = context.createOkCancelDialog(\"Für das Fahrzeug wurde bereits eine Buchung angelegt.\\\\n Buchung des Fahrzeuges anzeigen?\", new ObjectOrderExistsCallback(orderBrowser));\n dialog.show();\n return;\n }\n\n // check whether a customer has been selected\n //\n IDataTableRecord customerRecord = context.getDataTable(\"tc_customer\").getSelectedRecord();\n if (customerRecord == null)\n {\n throw new BusinessException(\"Es wurde bisher kein Kunde ausgewählt!\");\n }\n \n // check whether the given customer already has an order in the future\n //\n accessor.qbeClearAll();\n orderTable.qbeSetKeyValue(\"tc_customer_key\", customerRecord.getValue(\"pkey\"));\n capacityTable.qbeSetKeyValue(\"tc_campaign_key\", activeCampaign.getValue(\"pkey\"));\n capacityTable.qbeSetValue(\"slot\", \">now\");\n \n orderBrowser.search(\"r_tc_order\", Filldirection.BACKWARD);\n if (orderBrowser.recordCount() > 0)\n {\n FormLayout layout = new FormLayout(\"10dlu,p,10dlu\", \"20dlu,p,20dlu\");\n\n IFormDialog dialog = context.createFormDialog(\"Buchung vorhanden\", layout, new CustomerOrderExistsCallback(orderBrowser));\n CellConstraints c = new CellConstraints();\n if (orderBrowser.recordCount() == 1)\n dialog.addLabel(\"Der Kunde hat bereits eine Buchung beauftragt. Mit der Terminberechnung fortfahren oder Buchung anzeigen?\", c.xy(1, 1));\n else\n dialog.addLabel(\"Der Kunde hat bereits mehrere Buchungen beauftragt. Mit der Terminberechnung fortfahren oder Buchungen anzeigen?\", c.xy(1, 1));\n\n dialog.addSubmitButton(PROCEED_BUTTON_ID, \"Fortfahren\");\n if (orderBrowser.recordCount() == 1)\n dialog.addSubmitButton(SHOW_ORDER_BUTTON_ID, \"Buchung anzeigen\");\n else\n dialog.addSubmitButton(SHOW_ORDER_BUTTON_ID, \"Buchungen anzeigen\");\n dialog.setCancelButton(\"Abbrechen\");\n\n dialog.show(350, 120);\n return;\n }\n\n // everything already -> proceed\n doit(context);\n\t}", "private void makeBooking()\n {\n Scanner sc= new Scanner(System.in);\n Date dt = new Date();\n System.out.println(\"Enter Registered member ID: \");\n int memberID = sc.nextInt();\n if(sportsClub.memberIdentity(memberID))//check id exist or not\n {\n Member mem = sportsClub.searchMember(memberID); // get the obj of that member based on ID\n if(mem != null)\n {\n if(mem.getFinancial())\n {\n \n \n System.out.println(\"Enter the Sport Name u want to Play :\");\n System.out.println(\"Basketball\\nBadminton\" );\n Scanner sc1= new Scanner(System.in);\n String userSportName=sc1.nextLine();\n\n if(mem.statusSport(userSportName))\n {\n Scanner sc2= new Scanner(System.in);\n System.out.println(\"Enter the date u want to play in this format dd-MM-yyyy : \"); \n String stringData=sc2.nextLine();\n LocalDate date = DateUtility.convertDate(stringData);\n System.out.println(\"Please enter the Start Time \"); \n stringData=sc2.nextLine();\n LocalTime startTime = DateUtility.convertTime(stringData);\n System.out.println(\"Please enter the End Time\"); \n stringData=sc2.nextLine();\n LocalTime endTime= DateUtility.convertTime(stringData);\n \n DateUtility du=new DateUtility();\n duration=(int)(du.timeBetweenDateTimes(startTime,endTime));//calculats to get the duration \n Sport s = sportsClub.findSport(userSportName);\n\n if(s.timeCheck(mem.getTotalDuration(userSportName, date)+ duration))//total duration checking (without exceeding limits\n { \n\n if(sportsClub.validateTime(date, startTime, duration)==1)//check the pass condition for the given statement\n { \n\n System.out.println(\"=========Available List==========\");\n for(Court courtObj : s.getAvailableCourts(date, startTime, duration))\n {\n System.out.println(\"\\tCourt number \" + courtObj.getCourtId() + \" is available\");\n } \n System.out.println(\"=====================================\");\n Scanner in= new Scanner(System.in);\n System.out.println(\"Which Court would you like to play in?\");\n int courtNumber = in.nextInt();\n\n Court courtObj = null;\n for(Court c : s.getCourtList())\n {\n if(c.getCourtId() == courtNumber)\n {\n courtObj = c;\n }\n }\n\n Booking book = new Booking(dt.getTime(),date,startTime,endTime,mem,courtObj);\n mem.addBooking(book);\n courtObj.addBooking(book);\n System.out.println(\"Successfully booked the court!\");\n\n }\n else if(sportsClub.validateTime(date, startTime, duration)==5)\n System.out.println(\"Booking done between 8-11pm\");\n else if(sportsClub.validateTime(date, startTime, duration)==4)\n System.out.println(\"only 7 days Advance is available\");\n else if(sportsClub.validateTime(date, startTime, duration )==2)\n System.out.println(\"Booking cannot be done\");\n else if(sportsClub.validateTime(date, startTime, duration)==1)\n System.out.println(\"Bookings cant be advanved by years\");\n else if(sportsClub.validateTime(date, startTime, duration) < 0)\n System.out.println(\"Bookings cant be done for previously!\");\n }\n else\n System.out.println(\"Sorry no slots available for sort\"+userSportName);\n }\n else\n {\n System.out.println(\"Sorry! sport is not is not available.\");\n\n }\n\n }\n else\n System.out.println(\"Finances are poor!\");\n }\n }\n else\n System.out.println(\"Sorry you are not in any club!\");\n\n }", "@When(\"^I goto Adoption page and check for unavailability$\")\n\tpublic void gotoAdoptionpageCheckAvailability2() throws Throwable {\n\t\tZooHomePage homePage = new ZooHomePage();\n\t\t homePage.navigateToAdoption();\n\t\t AdoptionPage adoptPage = new AdoptionPage();\n\t\t adoptPage.selectStartDate();\n\t\t adoptPage.checkAvailability2();\n\t\t \n\t}", "public void v_Verify_Guest2_Hidden(){\n\t}", "public void VoidBill(final int invoiceno , final String Invoicedate) {\n\n AlertDialog.Builder AuthorizationDialog = new AlertDialog.Builder(this);\n\n LayoutInflater UserAuthorization = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n View vwAuthorization = UserAuthorization.inflate(R.layout.user_authorization, null);\n\n final EditText txtUserId = (EditText) vwAuthorization.findViewById(R.id.etAuthorizationUserId);\n final EditText txtPassword = (EditText) vwAuthorization.findViewById(R.id.etAuthorizationUserPassword);\n\n AuthorizationDialog.setTitle(\"Authorization\")\n .setIcon(R.drawable.ic_launcher)\n .setView(vwAuthorization)\n .setNegativeButton(\"Cancel\", null)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n Cursor User = db.getUserr(txtUserId.getText().toString(),\n txtPassword.getText().toString());\n if (User.moveToFirst()) {\n if (User.getInt(User.getColumnIndex(\"RoleId\")) == 1) {\n //ReprintVoid(Byte.parseByte(\"2\"));\n int result = db.makeBillVoids(invoiceno, Invoicedate);\n if(result >0)\n {\n Date dd = new Date(Long.parseLong(Invoicedate));\n String dd_str = new SimpleDateFormat(\"dd-MM-yyyy\").format(dd);\n String msg = \"Bill Number \"+invoiceno+\" , Dated : \"+dd_str+\" voided successfully\";\n // MsgBox.Show(\"Warning\", msg);\n Toast.makeText(BillingCounterSalesActivity.this, msg, Toast.LENGTH_SHORT).show();\n Log.d(\"VoidBill\", msg);\n }\n } else {\n messageDialog.Show(\"Warning\", \"Void Bill failed due to in sufficient access privilage\");\n }\n } else {\n messageDialog.Show(\"Warning\", \"Void Bill failed due to wrong user id or password\");\n }\n }\n }).show();\n }", "@Then(\"^click on checkout$\")\r\n\tpublic void click_on_checkout() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.checkout());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "public void availableBookings(int bID){\n int index=0;\n String n = null;\n Services s = new Services();\n\n System.out.println(\"\\n\"+ Login.businessList.get(bID).getName()+ \" [opening hours]\");\n System.out.println(\"-----------------------------\");\n workday.printFile(Login.businessList.get(bID).getUsername());\n System.out.println(\"-----------------------------\");\n System.out.println(\"\\nSelect a Service.\");\n s.printService(Login.businessList.get(bID).getUsername());\n\n Scanner reader = new Scanner(System.in);\n do {\n System.out.print(\"Enter Service ID: \");\n n = reader.nextLine();\n index = s.checkID(n);\n }while(index==0);\n\n }", "public void run() {\n final androidx.appcompat.app.AlertDialog.Builder continueBookingDialog = new AlertDialog.Builder(view.getContext());\n continueBookingDialog.setTitle(\"Book locker for \" + marker.getTitle() + \" \" + marker.getSnippet() +\"?\");\n // resendVerificationMailDialog.setView(resendVerificationEditText);\n continueBookingDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n\n //Pass marker.getTitle();\n// AccountsFragment af = new AccountsFragment();\n// Bundle args = new Bundle();\n// args.putString(\"title\", marker.getTitle());\n// af.setArguments(args);\n// Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n// .show();\n//\n// getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, af).commit();\n Intent intent = new Intent(getActivity(), BookingActivity.class);\n intent.putExtra(\"title\", marker.getTitle());\n intent.putExtra(\"postal\",post);\n\n Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n .show();\n getActivity().startActivity(intent);\n //getChildFragmentManager().beginTransaction().add(R.id.fragment_container, af).commit();\n // getActivity().startActivity(intent);\n // getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new AccountsFragment(),null).commit();\n //getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new AccountsFragment(),null).commit();\n }\n });\n continueBookingDialog.setNegativeButton(\"Back\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Automatically close the dialog\n\n }\n });\n continueBookingDialog.show();\n\n }", "public static void CreateduplicateBagIdVerify() throws Exception \r\n{\r\n\t\r\n\tBrowser.instance.findElement(editButton).click();\r\n\tThread.sleep(3000);\r\n\tWebDriverWait wait=new WebDriverWait(Browser.instance,10);\r\n\twait.until(ExpectedConditions.elementToBeClickable(addButton));\r\n\tRandomId=GenerateRandomValue.generateRandomInteger();\r\n\t\r\n\tBrowser.instance.findElement(BagsTab).click();\r\n\t\r\n\twait.until(ExpectedConditions.elementToBeClickable(addButton));\r\n\tBrowser.instance.findElement(addButton).click();\r\n\t\r\n\t\r\n\twait.until(ExpectedConditions.elementToBeClickable(BagIdCancelBtn));\r\n\t//Browser.instance.findElement(BagsField).sendKeys(RandomId+\"\");\r\n\tBrowser.instance.findElement(BagsField).sendKeys(\"1009998\");\r\n\tBrowser.instance.findElement(BagsField).sendKeys(Keys.TAB);\r\n\t//Browser.instance.findElement(ActiveCheckBox).click();\r\n\t\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\tBrowser.instance.findElement(BagIdSaveBtn).click();\r\n\t\t//Browser.instance.findElement(BagIdSaveBtn).click();\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(saveButton));\r\n\t\t\r\n\t\tBrowser.instance.findElement(saveButton).click();\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n\t\t\r\n\t\tBrowser.instance.findElement(editButton).click();\r\n\t\t\r\n\r\n\t\t}\r\n\r\n\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exception Handled Successfully\");\r\n\t\t\r\n\t\r\n\t\tString Actual= Browser.instance.findElement(DuplicateBagMsg).getText();\r\n\t\tString Expected=\"This Bag ID is duplicate. Can NOT save.\";\r\n\t\tif(Actual.equalsIgnoreCase(Expected))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Bag Id Duplicate Msg is verified successfully\");\r\n\t\t\t\t\tBrowser.instance.findElement(DuplicateBagConfirm).click();\r\n\t\t\t\t\twait.until(ExpectedConditions.elementToBeClickable(BagIdCancelBtn));\r\n\t\t\t\t\tBrowser.instance.findElement(BagIdCancelBtn).click();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"No message is verified about duplicate Bag Id\");\r\n\r\n\t\t}\r\n\t\t}\r\n\r\n\t}", "@Test\n\tpublic void verifyAbletoEditandUpdatetheAd() throws Exception{\n\t\tCreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.firstStockVerificationElement);\n\t\tjsClick(driver, AllStockPage.editButtonforMANtires);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.postingFormVerificationElement);\n\t\twaitTill(3000);\n\t\tscrollToElement(driver, createStockObj.vehicleVersionFieldPostingForm);\n\t\twaitTill(7000);\n\t\tclick(createStockObj.fuelTypeinPosting);\n\t\tclick(createStockObj.fuelTypeDropdownvalues\n\t\t\t\t.get(dynamicSelect(createStockObj.fuelTypeDropdownvalues)));\n\t\twaitTill(1000);\n\t\tscrollToElement(driver, createStockObj.conditioninPostingForm);\n\t\twaitTill(4000);\n\t\tclick(createStockObj.conditioninPostingForm);\n\t\tclick(createStockObj.conditionDropdownvalues\n\t\t\t\t.get(dynamicSelect(createStockObj.conditionDropdownvalues)));\n\t\twaitTill(1000);\n\t\tscrollToElement(driver, createStockObj.constructionYearAreainPostingForm);\n\t\twaitTill(3000);\n\t\tsendKeys(createStockObj.constructionYearAreainPostingForm,generateRandomNumber(2015,2021));\n\t\tsendKeys(createStockObj.sellerReferenceAreainPostingForm,generateRandomNumber(369258,369300));\n\t\tsendKeys(createStockObj.VINAreainPostingForm,generateRandomNumber(21144567,21144600));\n\t\twaitTill(3000);\n\t\tList<String> actualInputs=new ArrayList<String>();\n\t\tactualInputs.add(getAttribute(createStockObj.constructionYearAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getAttribute(createStockObj.sellerReferenceAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getAttribute(createStockObj.VINAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getText(createStockObj.fuelTypeinPosting));\n\t\tactualInputs.add(getText(createStockObj.conditioninPostingForm));\n\t\twaitTill(2000);\n\t\tjsClick(driver,AllStockPage.saveButtoninPostingForm);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\tAssert.assertTrue(\n\t\t\t\tgetText(createStockObj.successToastInPostingForm).replace(\"\\n\", \", \").trim()\n\t\t\t\t\t\t.contains(\"Successful action, Your ad was posted.\"),\n\t\t\t\t\"Success message is not displayed while posting Ad with image and with all mandatory fields filled\");\n\t\tString pageURL=driver.getCurrentUrl();\n\t\tAssert.assertTrue(getCurrentUrl(driver).equals(pageURL)\n\t\t\t\t,\"Page is not navigating to All ads age after posting success\");\n\t\twaitTill(3000);\n\t\tString parentURL=driver.getCurrentUrl();\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\twaitTill(2000);\n\t\t\tdriver.navigate().refresh();\n\t\t}\n\t\tjsClick(driver,AllStockPage.tradusLinkforMANtires);\n\t\tswitchWindow(driver,parentURL);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.makeandModelonTradusADP);\n\t\twaitTill(3000);\n\t\tAssert.assertTrue(getText(AllStockPage.makeandModelonTradusADP).trim().equals(\"MAN MAN 18.324\"), \"Ad deatils for MAN MAN 18.324 ad is not displaying on Tradus\");\n\t\tWebElement[] updatedVal= {AllStockPage.makeYearonTradusADP,AllStockPage.sellerRefNoonTradusADP,AllStockPage.vinNumberonTradusADP};\n\t\tString[] attributeName= {\"MakeYear\",\"SellerRef\",\"VINNumber\"};\n\t\tfor(int i=0;i<updatedVal.length;i++) {\n\t\t\tAssert.assertTrue(getText(updatedVal[i]).trim().equals(actualInputs.get(i).trim()), \"\"+attributeName[i]+\" is not updated properly\");\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (!Util.db.isItemPoolSwitchON(item_pool_id, checked_in_eventId)) {\n\t\t\t\t\t\topenScanSettingsAlert(SessionListActivity.this,item_pool_id, SessionListActivity.class.getName());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcursor.moveToPosition((int) v.getTag());\n\t\t\t\t\t\tif (!NullChecker(cursor.getString(cursor.getColumnIndex(DBFeilds.SESSION_ATTENDEE_COMPANY))).equalsIgnoreCase(DBFeilds.STATUS_OFFLINE)\n\t\t\t\t\t\t\t\t&& !NullChecker(cursor.getString(cursor.getColumnIndex(DBFeilds.SESSION_ATTENDEE_COMPANY))).equalsIgnoreCase(DBFeilds.STATUS_INVALID)) {\n\t\t\t\t\t\t\tattendee_id = cursor.getString(cursor.getColumnIndex(DBFeilds.SESSION_ATTENDEE_TICKET_ID));\n\t\t\t\t\t\t\tString orderstatus=Util.db.getOrderStatuswithAttendeeID(attendee_id,checked_in_eventId);\n\t\t\t\t\t\t\tboolean ischeckin = Util.db.SessionCheckInStatus(attendee_id,Util.db.getSwitchedONGroupId(checked_in_eventId));\n\t\t\t\t\t\t\tif(ischeckin && Util.checkin_only_pref.getBoolean(sfdcddetails.user_id+checked_in_eventId, false)){\n\t\t\t\t\t\t\t\tshowMessageAlert(getString(R.string.checkin_only_msg),false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//commented for non ticketed session\n\t\t\t\t\t\t\t/*else if(!externalSettings.quick_checkin&&!orderstatus.equalsIgnoreCase(\"Fully Paid\")){\n\t\t\t\t\t\t\t\tfinal String att_id=attendee_id;\n\t\t\t\t\t\t\t\tUtil.setCustomAlertDialog(SessionListActivity.this);\n\t\t\t\t\t\t\t\tUtil.txt_okey.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\t\tUtil.alert_dialog.dismiss();\n\t\t\t\t\t\t\t\t\t\trequest_type = WebServiceUrls.SA_TICKETS_SCAN_URL;\n\t\t\t\t\t\t\t\t\t\tdoRequest();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tUtil.txt_dismiss.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\t\tUtil.alert_dialog.dismiss();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tUtil.openCustomDialog(\"Alert\", \"This Order Status is \"+orderstatus+\"! \\n Do you still want to Continue?\");\n\n\t\t\t\t\t\t\t}*/else{\n\t\t\t\t\t\t\t\trequest_type = WebServiceUrls.SA_TICKETS_SCAN_URL;\n\t\t\t\t\t\t\t\tdoRequest();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "public void fill_PreAdmission_StudentCountReportForm_BetweenDate_TransferstudentAdmissionConfirm()\r\n\t\t\tthrows Exception {\r\n\t\tisDisplayed(rdBtn_Transferstudent);\r\n\t\tif (!rdBtn_Transferstudent.isSelected()) {\r\n\t\t\trdBtn_Transferstudent.click();\r\n\t\t\tlog(\"Transfer student(Admission Confirm) radio button is selected and object is:-\"\r\n\t\t\t\t\t+ rdBtn_Transferstudent.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t\t} else {\r\n\t\t\tlog(\"Transfer student(Admission Confirm) radio button is already selected and object is:-\"\r\n\t\t\t\t\t+ rdBtn_Transferstudent.toString());\r\n\t\t\tThread.sleep(500);\r\n\t\t}\r\n\t\tisDisplayed(rdBtn_BetweenDates);\r\n\t\tif (!rdBtn_BetweenDates.isSelected()) {\r\n\t\t\trdBtn_BetweenDates.click();\r\n\t\t\tlog(\"Between Date radio button is selected and object is:-\" + rdBtn_BetweenDates.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t\t} else {\r\n\t\t\tlog(\"Between Date radio button is already selected and object is:-\" + rdBtn_BetweenDates.toString());\r\n\t\t\tThread.sleep(500);\r\n\t\t}\r\n\t\t//Enter From date\r\n\r\n\t\t\tclickOnButton(btn_FromCalender);\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", btn_MonthYear_From);\r\n\t\t\tThread.sleep(500);\r\n\t\t\tbtn_Date_From.click();\r\n\t\t\tlog(\"From date is selected from calender.\");\r\n\t\t\t\r\n//Enter To date\r\n\t\r\n\t\t\tclickOnButton(btn_ToCalender);\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", btn_MonthYear_To);\r\n\t\t\tThread.sleep(500);\r\n\t\t\tbtn_Date_To.click();\r\n\t\t\tlog(\"To date is selected from calender.\");\r\n\t\t\tThread.sleep(1000);\r\n\t\t\r\n\t}", "@Then(\"^the booking is successful$\")\n public void the_booking_is_successful() throws Throwable {\n throw new PendingException();\n }", "public void accToAssempt() throws InterruptedException {\n\t\tThread.sleep(waiteTime);\r\n\t\tJavascriptExecutor js = null;\r\n\t\tif (driver instanceof JavascriptExecutor) {\r\n\t\t\tjs = (JavascriptExecutor) driver;\r\n\t\t}\r\n\t\tjs.executeScript(\"$('#127 .button_element').children().first().click();\");\r\n\t\t\r\n\t\tgetEBN(\"calClick\").click();\r\n\t\tThread.sleep(waiteTime);\r\n\t\tgetEBN(\"chooseDay\").click();\r\n\t\tgetEBN(\"dropStartlist\").click();\r\n\t\tgetEBN(\"dStartTime\").click();\r\n\t\tgetEBN(\"dropEndlist\").click();\r\n\t\tgetEBN(\"dEndTime\").click();\r\n\t\tgetWEBN(\"okComform\").clickAndWait(waiteTime);\r\n\t\tgetWEBN(\"selectDayCal\").clickAndWait(waiteTime);\r\n\t\tgetWEBN(\"patClicCal\").clickAndWait(waiteTime);\r\n\t\tgetWEBN(\"delPatFCal\").clickAndWait(waiteTime);\r\n\t\tgetEBN(\"patList\").click();\r\n\t}", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void onClick(DialogInterface dialog, int which) {\n\n String strNextDate = \"\";\n\n if (dateNextDate.getDayOfMonth() < 10) {\n strNextDate = \"0\" + String.valueOf(dateNextDate.getDayOfMonth());\n } else {\n strNextDate = String.valueOf(dateNextDate.getDayOfMonth());\n }\n if (dateNextDate.getMonth() < 9) {\n strNextDate += \"-\" + \"0\" + String.valueOf(dateNextDate.getMonth() + 1) + \"-\";\n } else {\n strNextDate += \"-\" + String.valueOf(dateNextDate.getMonth() + 1) + \"-\";\n }\n strNextDate += String.valueOf(dateNextDate.getYear());\n\n try{\n if(!date_str1.equals(\"\") && !date_str1.equals(strNextDate)){\n Date dd = new SimpleDateFormat(\"dd-MM-yyyy\").parse(strNextDate);\n Cursor cc = dbHandler.getBillDetailByInvoiceDate(\"\"+dd.getTime());\n if(cc!= null && cc.getCount()>0)\n {\n msgBox.Show(\"Error\",\"Since bill for date \"+strNextDate+\" is already present in database, therefore this date cannot be selected\");\n return;\n }\n }else if(date_str1.equals(strNextDate))\n {\n return;\n }\n }catch (Exception e)\n {\n e.printStackTrace();\n }\n\n long iResult = dbHandler.updateBusinessDate(String.valueOf(strNextDate));\n Logger.d(\"ManualDayEnd\", \"Bussiness Date updation status :\" + iResult);\n //UpdateStock();\n /*\n StockOutwardMaintain stock_outward = new StockOutwardMaintain(myContext, getDb());\n stock_outward.saveOpeningStock_Outward(strNextDate);\n\n StockInwardMaintain stock_inward = new StockInwardMaintain(myContext, getDb());\n stock_inward.saveOpeningStock_Inward(strNextDate);*/\n //setBillNo();\n BillNoReset bs = new BillNoReset();\n bs.setBillNo(dbHandler);\n\n List<Fragment> list = getSupportFragmentManager().getFragments();\n for(Fragment frag : list)\n {\n if(frag instanceof BillingFragment)\n {\n ((BillingFragment) frag).initSettingsData();\n ((BillingFragment) frag).mBillNumberSet();\n break;\n }\n }\n if (iResult > 0) {\n msgBox.Show(\"Information\", \"Transaction Date changed to \" + strNextDate);\n } else {\n msgBox.Show(\"Warning\", \"Error: DayEnd is not done\");\n }\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tstartGetTicketActivity();\n\t\t\t\t}", "public void confirmBooking(){\n double ticketPrice = 56.0;\n double mealPrice = 30.0;\n if (student || child )\n ticketPrice = ticketPrice/2;\n else\n ticketPrice = ticketPrice*0.8;\n \n if (child )\n mealPrice = mealPrice/2;\n else\n mealPrice = mealPrice*0.9;\n double totalPrice = ticketPrice + mealPrice;\n System.out.println(getName()+\"\\nTicket price:$\"+ticketPrice+\"\\nMeal Price:$\"+mealPrice+\"\\nTotal price:$\"+totalPrice+\"\\nConfirm booking for \"+getName()+\" (Y/N)\");\n setBooked();\n System.out.println(getBooked()+\"\\n\\n\");\n }", "public void v_Verify_Guest9_Hidden(){\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t flightNum.setFocusable(true);\n flightNum.setFocusableInTouchMode(true);\n\t flightNum.requestFocus();\n\t flightNum.requestFocusFromTouch();\n\t\t\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.flight_select_imagebutton://点击查询按钮\n\t\t\t\n\t\t\tif(TextUtils.isEmpty(flightNum.getText().toString().trim())){\n\t\t\t\t\n\t\t\t\t Toast.makeText(getActivity(), \"请输入航班号\", Toast.LENGTH_SHORT).show();\n\t\t\n\t\t\t\t flightNum.setShakeAnimation();//摇晃输入框\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//异步发起请求,获取航班信息\n\t\t\t\thandler.sendEmptyMessage(0x100);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tbreak;\n\n\t\tcase R.id.flight_date_click://点击日期\n\t\t\t\n\t\t\t utilsClass.getCalendarDate(getActivity(),flightDataShow);//日历显示\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}" ]
[ "0.6659429", "0.6600075", "0.64496773", "0.6407593", "0.63259524", "0.6130334", "0.6126298", "0.6090761", "0.60779387", "0.6062677", "0.602643", "0.60254943", "0.59855247", "0.59810686", "0.5958741", "0.5952312", "0.5937468", "0.5920454", "0.5909744", "0.58998924", "0.58926976", "0.5875887", "0.58597475", "0.58393025", "0.5831505", "0.57916456", "0.57899547", "0.57849795", "0.5775096", "0.5752622", "0.57511294", "0.57478225", "0.57431865", "0.57256037", "0.5721337", "0.57092595", "0.5702986", "0.5701296", "0.5689517", "0.5685837", "0.5684018", "0.56704366", "0.5655114", "0.5646945", "0.5638993", "0.56200165", "0.56150985", "0.5613804", "0.56122017", "0.5607204", "0.55929756", "0.55790645", "0.5575031", "0.55651987", "0.5564373", "0.55521494", "0.5550749", "0.5549538", "0.5548738", "0.55483305", "0.55456895", "0.55325204", "0.55295736", "0.5527126", "0.5519025", "0.55165887", "0.5512001", "0.5506344", "0.5501968", "0.55005956", "0.5497751", "0.54973495", "0.5495419", "0.5491363", "0.5491249", "0.54849786", "0.5482527", "0.54800785", "0.54791695", "0.54741174", "0.5473459", "0.54717124", "0.546215", "0.5460775", "0.5459563", "0.5457094", "0.54561716", "0.54496294", "0.5448869", "0.54461575", "0.5445025", "0.54398763", "0.54390275", "0.543802", "0.5436997", "0.54335594", "0.54305995", "0.54175216", "0.54162467", "0.5415111", "0.5414628" ]
0.0
-1
selecting payment mode as ATMKishor
public WebElement atmPaymode() { return findElement(repositoryParser, PAGE_NAME, "atmPay"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getPaymentMode() {\n\t\treturn null;\n\t}", "public void chosePaymentMethod(String paymentMode) {\n\t\tswitch (paymentMode) {\n\t\tcase \"COD\":\n\t\t\tPayMethod = new cashOnDelivery();\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"creditCard\":\n\t\t\tPayMethod = new creditCard();\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"debitCard\":\n\t\t\tPayMethod = new debitCard();\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"netBanking\":\n\t\t\tPayMethod =new netBanking();\n\t\t\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tPayMethod =null;\n\t\t\tbreak;\n\t\t}\n\n\t}", "private PaymentMode parsePaymentMode(String paymentMode) throws InvoiceFileParseException {\n\t\tPaymentMode pm;\n\t\ttry {\n\t\t\tpm = PaymentMode.valueOf(paymentMode);\n\t\t} catch (Exception e) {\n\t\t\tthrow new InvoiceFileParseException(\"Specified payment mode [\" + paymentMode + \"] is not valid\");\n\t\t}\n\t\treturn pm;\n\t}", "public void setModePfPayment (java.lang.String modePfPayment) {\n\t\tthis.modePfPayment = modePfPayment;\n\t}", "PaymentMethod getPaymentMethod();", "public WebElement bankTransferPaymentMode() {\n\t\treturn findElement(repositoryParser, PAGE_NAME, \"bankTransfer\");\n\t}", "public java.lang.String getModePfPayment () {\n\t\treturn modePfPayment;\n\t}", "public void selectPaymentMethod(String payment) {\n\t\tif (payment == \"Cashless\")\n\t\t\tdriver.findElement(By.id(\"payBtn1\")).click();\n\t\tif (payment == \"Cash\")\n\t\t\tdriver.findElement(By.id(\"payBtn2\")).click();\n\t\tif (payment == \"Special\")\n\t\t\tdriver.findElement(By.id(\"payBtn3\")).click();\n\t}", "public String getBuy_mode() {\r\n\t\treturn buy_mode;\r\n\t}", "public String getPaymentType() {\r\n return paymentType;\r\n }", "public abstract PaymentType getPaymentType();", "public PaymentType getPaymentType()\n {\n return PAYMENT_TYPE;\n }", "int getACMode();", "public WebElement selectSavedCardPaymentMode() {\n\t\treturn wait.until(ExpectedConditions.elementToBeClickable(findElement(\n\t\t\t\trepositoryParser, PAGE_NAME, \"savedCard\")));\n\t}", "public java.lang.String getPaymenttype () {\r\n\t\treturn paymenttype;\r\n\t}", "public String getPaytype() {\n return paytype;\n }", "@Override\r\n\tpublic void setPaymentType() {\n\t\tthis.paymentType = PaymentType.YINLIAN;\r\n\t}", "void setPaymentMethod(PaymentMethod paymentMethod);", "public long getPaymentType() {\n return paymentType;\n }", "public String getPayMethod() {\n return payMethod;\n }", "public void teste() {\n\t\tSelect billingMasterPolicy = new Select(comboBillingMasterPolicy);\n\t\tWebElement WebL = billingMasterPolicy.getFirstSelectedOption();\n\t\tString planoRisco = WebL.getAttribute(\"text\");\n\t\tSystem.out.println(\"Teste: \"+ planoRisco);\n\t}", "public String getPAYMENT_TYPE() {\r\n return PAYMENT_TYPE;\r\n }", "public String getPayType() {\n return payType;\n }", "public String getPayType() {\n return payType;\n }", "public CreditCard getDefaultPaymentInfo();", "public Short getPayType() {\n return payType;\n }", "public Integer getPaymentType() {\n\t\treturn paymentType;\n\t}", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "private String m50417p() {\n String cardType = this.f30729a0.getCardType();\n String str = C10527a.f28544e;\n if (cardType.equalsIgnoreCase(str)) {\n return str;\n }\n if (cardType.equalsIgnoreCase(\"MASTERCARD\")) {\n return \"MASTER\";\n }\n String str2 = \"MADA\";\n return cardType.equalsIgnoreCase(str2) ? str2 : \"UNKNOWN\";\n }", "@Override\n\tpublic String showTypeCard() {\n\t\treturn \"It's payment by Visa\";\n\t}", "public void setPayMethod(String value) {\n this.payMethod = value;\n }", "public interface UnionpayConfig {\n String CHARSET = \"UTF-8\";\n String TIME_PATTERN = \"YYYYMMDDhhmmss\";\n\n String getMerId();\n\n String getFrontReturnUrl();\n\n String getBackNotifyUrl();\n\n boolean isEncrypted();\n\n String getTrId();\n}", "public String getPaymentPlatform() {\n\t\treturn paymentPlatform;\n\t}", "private PaymentType(String payment) {\n this.payment = payment;\n }", "public void setRadiologyOrderIDForPayment(java.lang.String param){\n \n this.localRadiologyOrderIDForPayment=param;\n \n\n }", "public Boolean getPayType() {\n return payType;\n }", "public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}", "private boolean paymentIsPreferred(Payment p)\n\t{\n\t\tswitch(p.payer.defaultPaymentType)\n\t\t{\n\t\t\tcase CREDIT: \treturn (p.payee == restaurant);\n\t\t\tcase IOU_EMAIL:\treturn (p.payee == p.payer.defaultPayee);\n\t\t\tcase VENMO:\t\treturn (p.payee == p.payer.defaultPayee);\n\t\t\tdefault:\t\treturn false;\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tpayment_type = \"1\";\r\n\r\n\t\t\t}", "String getPaymentInformation();", "public int getPrepayment_option() {\n return prepayment_option;\n }", "public void setPaymentMethodCode_BankTransfer() {\n setPaymentMethodCodeAsPaymentMethod(AppCDef.PaymentMethod.BankTransfer);\n }", "public boolean isPaymentMethodCodeBankTransfer() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.BankTransfer) : false;\n }", "java.lang.String getMode();", "public String getPaymentMethod() {\n\t\treturn paymentMethod;\n\t}", "public String getCreditCardType();", "public String getPaymentAmountType() {\r\n return paymentAmountType;\r\n }", "boolean isSetCapitalPayed();", "String getACModeName();", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tpayment_type = \"2\";\r\n\r\n\t\t\t}", "CarPaymentMethod processPayPal();", "List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);", "CashSettlementMethodEnum getCashSettlementMethod();", "public IBankTransfert payment();", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public static String getMode() {\n\t\treturn \"rs232 mode get\" + delimiter + \"rs232 mode get \";\n\t}", "public void setPaymentMethodCode_CreditCard() {\n setPaymentMethodCodeAsPaymentMethod(AppCDef.PaymentMethod.CreditCard);\n }", "public static String getAdvertisementType() {\n return \"jxta:PA\";\n }", "@Override\n public String getPaymentMethodCode() {\n return this.getAdvanceTravelPayment().getPaymentMethodCode();\n }", "public void setTransactionType(int transactionChoice);", "public String getAccountPayment() {\r\n return accountPayment;\r\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "public PaymentTypeObject getPaymentType(int payment_type_id) throws AppException;", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "boolean isCreditCardIsSingleAvailablePayment();", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "@org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();", "public String getMerchantNo();", "public void set_transaction_mode(TransactionType mode){\n\t\ttransaction_type = mode;\n\t}", "public void setTestPayment(boolean isTestPayment) {\n\t\tthis.isTestPayment = isTestPayment;\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tpayment_type = \"0\";\r\n\r\n\t\t\t}", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "public PaymentType getPaymentType() {\n\t\treturn paymentType;\n\t}", "public static String getPaymentMethods(String account){\n return \"select pm_method from payment_methods where pm_account = '\"+account+\"'\";\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public int getFlightMode();", "boolean hasPayment();", "boolean hasPayment();", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv.Enum getCryptProviderType();", "public void setDeliveryMode(int value) {\n this.deliveryMode = value;\n }", "public PaymentType typeOfPayment() {\n\t\treturn category.Comision;\n\t}", "public void setPaymentType(long paymentType) {\n this.paymentType = paymentType;\n }", "public void setPaymenttype (java.lang.String paymenttype) {\r\n\t\tthis.paymenttype = paymenttype;\r\n\t}", "public void onClickPKCS15(View view) {\n Intent i = new Intent(this, TestActivity.class);\n i.putExtra(\"providerType\", ProviderType.PKCS15);\n startActivity(i);\n }", "boolean CanBuyDevCard();", "public boolean isTestPayment() {\n\t\treturn isTestPayment;\n\t}", "public void setCreditCardType (String CreditCardType);", "public String getLBR_PartialPayment();", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public int switch_modes() {\r\n //when angle modes is selected power field is disabled\r\n if(angle_radio.isArmed()){\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n }\r\n //Power Field is necessary for Powers mode\r\n else if(power_radio.isArmed()){\r\n power_combo.setDisable(false);\r\n power_combo.setOpacity(1);\r\n }\r\n //when Angle sum mode is selected power field is disabled\r\n else if(sum_radio.isArmed()){\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n }\r\n //Returning values to switch whole Program's mode based on Radio buttons\r\n if(angle_radio.isSelected()) return -1;\r\n else if(power_radio.isSelected()) return -2;\r\n else if(sum_radio.isSelected()) return -3;\r\n return 0;\r\n }", "public boolean isPaymentMethodCodeByHand() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.ByHand) : false;\n }", "public PaymentType(String paymentType) {\n\t\tsuper();\n\t\tthis.paymentType = paymentType;\n\t}", "io.opencannabis.schema.commerce.Payments.PaymentStatus getStatus();", "boolean CanBuySettlement();", "public abstract void setDecryptMode();", "public int getDeliveryMode() {\n return deliveryMode;\n }" ]
[ "0.6839534", "0.6530503", "0.63487625", "0.6235883", "0.62159103", "0.62141144", "0.62095004", "0.60863954", "0.6061786", "0.5946334", "0.5939436", "0.58307296", "0.5806467", "0.57679564", "0.5704222", "0.569599", "0.5683851", "0.56627417", "0.56460947", "0.56329745", "0.560904", "0.55913943", "0.55485076", "0.55485076", "0.5523043", "0.551746", "0.5494761", "0.5490248", "0.5484189", "0.5483336", "0.547289", "0.5427281", "0.54184014", "0.538397", "0.53762054", "0.53727", "0.537043", "0.53674823", "0.53539443", "0.5342965", "0.53428304", "0.5340107", "0.53326404", "0.53068084", "0.53055996", "0.53009766", "0.5292548", "0.5291367", "0.52862054", "0.5274434", "0.5260851", "0.5255612", "0.5236982", "0.5233204", "0.5226887", "0.5223582", "0.5210276", "0.5202107", "0.52006257", "0.5194508", "0.5190857", "0.5187646", "0.5177695", "0.51762843", "0.5171397", "0.5159539", "0.5155624", "0.51488113", "0.5146576", "0.5141495", "0.51405644", "0.51396555", "0.51394296", "0.51391953", "0.51247066", "0.5124532", "0.5121776", "0.51187474", "0.51177114", "0.51154286", "0.5105249", "0.5105249", "0.5102902", "0.50921464", "0.50912875", "0.5087954", "0.50724566", "0.5071199", "0.50694174", "0.505134", "0.50503844", "0.5043466", "0.50328803", "0.5032353", "0.50284904", "0.5026413", "0.50258785", "0.50246525", "0.5022976", "0.50187105" ]
0.6693878
1
selecting payment mode as InternetBankingKishor
public WebElement internetBanking() { return findElement(repositoryParser, PAGE_NAME, "internetBanking"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebElement bankTransferPaymentMode() {\n\t\treturn findElement(repositoryParser, PAGE_NAME, \"bankTransfer\");\n\t}", "public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}", "public void chosePaymentMethod(String paymentMode) {\n\t\tswitch (paymentMode) {\n\t\tcase \"COD\":\n\t\t\tPayMethod = new cashOnDelivery();\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"creditCard\":\n\t\t\tPayMethod = new creditCard();\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"debitCard\":\n\t\t\tPayMethod = new debitCard();\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"netBanking\":\n\t\t\tPayMethod =new netBanking();\n\t\t\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tPayMethod =null;\n\t\t\tbreak;\n\t\t}\n\n\t}", "public Object getPaymentMode() {\n\t\treturn null;\n\t}", "public void setPaymentMethodCode_BankTransfer() {\n setPaymentMethodCodeAsPaymentMethod(AppCDef.PaymentMethod.BankTransfer);\n }", "public IBankTransfert payment();", "public void selectPaymentMethod(String payment) {\n\t\tif (payment == \"Cashless\")\n\t\t\tdriver.findElement(By.id(\"payBtn1\")).click();\n\t\tif (payment == \"Cash\")\n\t\t\tdriver.findElement(By.id(\"payBtn2\")).click();\n\t\tif (payment == \"Special\")\n\t\t\tdriver.findElement(By.id(\"payBtn3\")).click();\n\t}", "public boolean isPaymentMethodCodeBankTransfer() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.BankTransfer) : false;\n }", "PaymentMethod getPaymentMethod();", "@Override\r\n\tpublic void setPaymentType() {\n\t\tthis.paymentType = PaymentType.YINLIAN;\r\n\t}", "public WebElement selectSavedCardPaymentMode() {\n\t\treturn wait.until(ExpectedConditions.elementToBeClickable(findElement(\n\t\t\t\trepositoryParser, PAGE_NAME, \"savedCard\")));\n\t}", "public abstract PaymentType getPaymentType();", "public String getBankAccountType();", "public WebElement atmPaymode() {\n\t\treturn findElement(repositoryParser, PAGE_NAME, \"atmPay\");\n\t}", "public void teste() {\n\t\tSelect billingMasterPolicy = new Select(comboBillingMasterPolicy);\n\t\tWebElement WebL = billingMasterPolicy.getFirstSelectedOption();\n\t\tString planoRisco = WebL.getAttribute(\"text\");\n\t\tSystem.out.println(\"Teste: \"+ planoRisco);\n\t}", "private PaymentMode parsePaymentMode(String paymentMode) throws InvoiceFileParseException {\n\t\tPaymentMode pm;\n\t\ttry {\n\t\t\tpm = PaymentMode.valueOf(paymentMode);\n\t\t} catch (Exception e) {\n\t\t\tthrow new InvoiceFileParseException(\"Specified payment mode [\" + paymentMode + \"] is not valid\");\n\t\t}\n\t\treturn pm;\n\t}", "public void setBankAccountType (String BankAccountType);", "public int getRequestableBank() \n {\n return -1; \n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public String getPaymentType() {\r\n return paymentType;\r\n }", "public String getBuy_mode() {\r\n\t\treturn buy_mode;\r\n\t}", "public PaymentType getPaymentType()\n {\n return PAYMENT_TYPE;\n }", "public void setModePfPayment (java.lang.String modePfPayment) {\n\t\tthis.modePfPayment = modePfPayment;\n\t}", "public String getJP_BankAccountType();", "public boolean selectExisitingAccount(int choice, String bankAccount);", "public PUKEHandlerCallBanker_ABZ_FOUR(){\r\n\t}", "public java.lang.String getModePfPayment () {\n\t\treturn modePfPayment;\n\t}", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public String getPayMethod() {\n return payMethod;\n }", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public String getPaytype() {\n return paytype;\n }", "public boolean selectBankAccount(String bankAccount, String user, int choose);", "CashSettlementMethodEnum getCashSettlementMethod();", "public String getPayType() {\n return payType;\n }", "public String getPayType() {\n return payType;\n }", "public CreditCard getDefaultPaymentInfo();", "public void setPayMethod(String value) {\n this.payMethod = value;\n }", "public Integer getPaymentType() {\n\t\treturn paymentType;\n\t}", "public Short getPayType() {\n return payType;\n }", "public java.lang.String getPaymenttype () {\r\n\t\treturn paymenttype;\r\n\t}", "private boolean paymentIsPreferred(Payment p)\n\t{\n\t\tswitch(p.payer.defaultPaymentType)\n\t\t{\n\t\t\tcase CREDIT: \treturn (p.payee == restaurant);\n\t\t\tcase IOU_EMAIL:\treturn (p.payee == p.payer.defaultPayee);\n\t\t\tcase VENMO:\t\treturn (p.payee == p.payer.defaultPayee);\n\t\t\tdefault:\t\treturn false;\n\t\t}\n\t}", "public Boolean getPayType() {\n return payType;\n }", "public BluePay(String merchant, String secretKey, String mode)\n\t{\n\t\tBP_MERCHANT = merchant;\n\t\tBP_SECRET_KEY = secretKey;\n\t\tBP_MODE = mode;\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "public String getPAYMENT_TYPE() {\r\n return PAYMENT_TYPE;\r\n }", "private PaymentType(String payment) {\n this.payment = payment;\n }", "Databank getBank();", "public String getBankCode() {\r\n return bankCode;\r\n }", "public long getPaymentType() {\n return paymentType;\n }", "@Override\n\tpublic String showTypeCard() {\n\t\treturn \"It's payment by Visa\";\n\t}", "public void setJP_BankAccountType (String JP_BankAccountType);", "boolean isCreditCardIsSingleAvailablePayment();", "CarPaymentMethod processPayPal();", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "boolean CanBuySettlement();", "boolean CanBuyDevCard();", "IBank getBank(int rekeningNr) throws RemoteException;", "public void setTestPayment(boolean isTestPayment) {\n\t\tthis.isTestPayment = isTestPayment;\n\t}", "java.lang.String getBankNo();", "public WebElement select123BankingPaymentType(String banks123) {\n\t\treturn findElement(modifyPageElement(repositoryParser, PAGE_NAME,\n\t\t\t\t\"123Banking\", banks123));\n\t}", "public void setPaymentType(Integer paymentType) {\n\t\tthis.paymentType = paymentType;\n\t}", "public String getLBR_PartialPayment();", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public PaymentType(String paymentType) {\n\t\tsuper();\n\t\tthis.paymentType = paymentType;\n\t}", "public String getBank() {\r\n return bank;\r\n }", "public String getBank() {\r\n return bank;\r\n }", "public interface UnionpayConfig {\n String CHARSET = \"UTF-8\";\n String TIME_PATTERN = \"YYYYMMDDhhmmss\";\n\n String getMerId();\n\n String getFrontReturnUrl();\n\n String getBackNotifyUrl();\n\n boolean isEncrypted();\n\n String getTrId();\n}", "@When(\"user selects on AndhraBank\")\r\n\tpublic void usert_selects_on_Andhrabank() throws InterruptedException {\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.MINUTES);\r\n\t\t//driver.findElement(By.xpath(\"//div[@id='swit']/div[1]/label/i\")).click();\r\n\t\tdriver.findElement(By.xpath(\"//label[contains(text(),'Andhra Bank')]\")).click();\r\n\t}", "public void setRadiologyOrderIDForPayment(java.lang.String param){\n \n this.localRadiologyOrderIDForPayment=param;\n \n\n }", "public String getPaymentMethod() {\n\t\treturn paymentMethod;\n\t}", "String getPaymentInformation();", "public String getJP_BankDataCustomerCode2();", "public PaymentType typeOfPayment() {\n\t\treturn category.Comision;\n\t}", "public String getPaymentPlatform() {\n\t\treturn paymentPlatform;\n\t}", "public PaymentTypeObject getPaymentType(int payment_type_id) throws AppException;", "public void setPaymentType(PaymentType paymentType) {\n\n this.paymentType = paymentType;\n }", "boolean isSetCapitalPayed();", "public abstract String getCurrencyType();", "public boolean isTestPayment() {\n\t\treturn isTestPayment;\n\t}", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "String getSettlementCurrency();", "boolean hasPayment();", "boolean hasPayment();", "public interface CarPaymentMethod {\n\n /**\n * Choose PayPal payment option\n */\n CarPaymentMethod processPayPal();\n\n /**\n * Choose HotDollars payment option\n */\n CarPaymentMethod processHotDollars();\n\n /**\n * Choose CreditCard payment option\n */\n CarPaymentMethod processCreditCard();\n\n /**\n * Choosing saved payment methods\n */\n\n CarPaymentMethod processSavedVisa(String securityCode);\n\n CarPaymentMethod processSavedMasterCard(String securityCode);\n\n /**\n * Getting payment buttons\n */\n\n WebElement getPayPalRadioButton();\n\n WebElement getHotDollarsButton();\n\n WebElement getCreditCardField();\n\n WebElement getSavedCreditCardButton();\n\n WebElement getSavedVisaButton();\n\n WebElement getSavedMasterCardButton();\n\n String getNameOfChosenPaymentMethod();\n\n boolean isHotDollarsModuleAvailable();\n\n String getHotDollarsMessage();\n\n WebElement getPaymentOptionCreditCard();\n\n /**\n * Input card holder's initials for credit card\n */\n CarPaymentMethod cardHolder(String firstName, String lastName);\n\n /**\n * Input credit card attributes\n */\n CarPaymentMethod creditCardNumber(String cardNumber);\n\n CarPaymentMethod expDate(String cardExpMonth, String cardExpYear);\n\n CarPaymentMethod creditCardSecurityCode(String cardSecCode);\n\n CarPaymentMethod savedVisaSecurityCode(String cardSecCode);\n\n /**\n * Fill in card holder's address information\n */\n CarPaymentMethod city(String city);\n\n CarPaymentMethod country(String country);\n\n CarPaymentMethod state(String state);\n\n CarPaymentMethod billingAddress(String address);\n\n CarPaymentMethod zipCode(String zipCode);\n\n CarPaymentMethod continuePanel();\n\n /**\n * Filling PayPal payment fields\n */\n CarPaymentMethod payPalUser(String firstName, String lastName);\n\n CarPaymentMethod payPalAddress(String address);\n\n CarPaymentMethod payPalCity(String city);\n\n CarPaymentMethod payPalState(String state);\n\n CarPaymentMethod payPalZipCode(String zip);\n\n /**\n * Verify that billing section is present on the page\n */\n boolean isBillingSectionPresent();\n\n /**\n * Verify that billing section has only one Credit Card payment method\n */\n boolean isCreditCardIsSingleAvailablePayment();\n\n void saveMyInformation();\n\n void savePaymentInformation();\n\n WebElement getPasswordField();\n\n WebElement getConfirmPasswordField();\n\n boolean isSaveMyInfoExpanded();\n\n void chooseCreditCardPaymentMethod();\n\n boolean isSavedPaymentPresent();\n\n void typeCreditCardNameField(String ccNumber);\n\n\n}", "public String getBank() {\n return bank;\n }", "public String getPaymentAmountType() {\r\n return paymentAmountType;\r\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tpayment_type = \"1\";\r\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tpayment_type = \"2\";\r\n\r\n\t\t\t}", "public boolean isPaymentMethodCodeByHand() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.ByHand) : false;\n }", "public void setTransactionType(int transactionChoice);", "boolean hasSettlementCurrency();", "public void setPaymentType(long paymentType) {\n this.paymentType = paymentType;\n }", "io.opencannabis.schema.commerce.Payments.PaymentStatus getStatus();", "public Integer getPayType() {\n\t\treturn payType;\n\t}", "public String getBankPolicyGuidelineType() {\n return bankPolicyGuidelineType;\n }", "public String getCreditCardType();", "public void saveFiBcoinPayconfig(FiBcoinPayconfig fiBcoinPayconfig);", "public String getJP_BankDataCustomerCode1();", "public interface ABC extends Unionpay { //农行卡\n public boolean payPhoneBill(String phone , double money );//交话费\n}", "List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);" ]
[ "0.6846226", "0.66541636", "0.644426", "0.63457763", "0.6160255", "0.6133193", "0.6132466", "0.6120192", "0.6087269", "0.6066058", "0.5995142", "0.5905377", "0.59012866", "0.58957535", "0.5841459", "0.5753183", "0.5729962", "0.5723274", "0.57197475", "0.571672", "0.5677997", "0.5676299", "0.56748664", "0.56553173", "0.5629357", "0.5592002", "0.55892986", "0.55667317", "0.5522433", "0.550669", "0.5490756", "0.549073", "0.54858166", "0.54758", "0.54758", "0.54674244", "0.5464846", "0.5438917", "0.5435883", "0.5411175", "0.53754425", "0.53729874", "0.5356897", "0.53517497", "0.53492373", "0.53449833", "0.5338065", "0.5337153", "0.53144884", "0.5308209", "0.5302134", "0.52971625", "0.5293249", "0.5285782", "0.5281793", "0.5272337", "0.5255706", "0.5255692", "0.5234532", "0.5230919", "0.5230782", "0.5228114", "0.522099", "0.52127105", "0.5210451", "0.5210451", "0.5200639", "0.51987433", "0.51881367", "0.5187625", "0.5184472", "0.5176732", "0.5172126", "0.5167156", "0.5166959", "0.51620406", "0.51583797", "0.5155207", "0.5150262", "0.5147524", "0.51445013", "0.5144484", "0.5144484", "0.51348543", "0.51198006", "0.5116692", "0.51145625", "0.51128465", "0.5108534", "0.5092543", "0.5092132", "0.5083236", "0.5080711", "0.50714594", "0.50698143", "0.5069371", "0.50687075", "0.5059414", "0.50582194", "0.50543225" ]
0.54773915
33
selecting payment type of bank transferKishor
public WebElement bankSelection(String bankName) { return findElement(modifyPageElement(repositoryParser, PAGE_NAME, "internetBankingBank", bankName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebElement bankTransferPaymentMode() {\n\t\treturn findElement(repositoryParser, PAGE_NAME, \"bankTransfer\");\n\t}", "public abstract PaymentType getPaymentType();", "public IBankTransfert payment();", "public void setPaymentMethodCode_BankTransfer() {\n setPaymentMethodCodeAsPaymentMethod(AppCDef.PaymentMethod.BankTransfer);\n }", "public String getBankAccountType();", "public void setTransactionType(int transactionChoice);", "public PaymentType getPaymentType()\n {\n return PAYMENT_TYPE;\n }", "public String getPaymentType() {\r\n return paymentType;\r\n }", "public void selectPaymentMethod(String payment) {\n\t\tif (payment == \"Cashless\")\n\t\t\tdriver.findElement(By.id(\"payBtn1\")).click();\n\t\tif (payment == \"Cash\")\n\t\t\tdriver.findElement(By.id(\"payBtn2\")).click();\n\t\tif (payment == \"Special\")\n\t\t\tdriver.findElement(By.id(\"payBtn3\")).click();\n\t}", "private PaymentType(String payment) {\n this.payment = payment;\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "public boolean isPaymentMethodCodeBankTransfer() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.BankTransfer) : false;\n }", "public void setBankAccountType (String BankAccountType);", "public PaymentTypeObject getPaymentType(int payment_type_id) throws AppException;", "public String getPaytype() {\n return paytype;\n }", "public String getJP_BankAccountType();", "@NotNull\n public PaymentType getPaymentType(){\n if(payment.size() == 1){\n return payment.get(0).getPaymentType();\n }else if(payment.size() > 1){\n return PaymentType.SPLIT;\n }\n return PaymentType.UNPAID;\n }", "public String getPayType() {\n return payType;\n }", "public String getPayType() {\n return payType;\n }", "public Integer getPaymentType() {\n\t\treturn paymentType;\n\t}", "public java.lang.String getPaymenttype () {\r\n\t\treturn paymenttype;\r\n\t}", "public long getPaymentType() {\n return paymentType;\n }", "public PaymentType(String paymentType) {\n\t\tsuper();\n\t\tthis.paymentType = paymentType;\n\t}", "public void queryByPaymentType(String payType) {\n\t\tPAYMENT_TYPE = payType;\n\t}", "public String getPaymentAmountType() {\r\n return paymentAmountType;\r\n }", "@Override\r\n\tpublic void setPaymentType() {\n\t\tthis.paymentType = PaymentType.YINLIAN;\r\n\t}", "public void setPaymentType(PaymentType paymentType) {\n\n this.paymentType = paymentType;\n }", "public String getPAYMENT_TYPE() {\r\n return PAYMENT_TYPE;\r\n }", "public void setPaymentType(long paymentType) {\n this.paymentType = paymentType;\n }", "public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}", "public void setPaymentType(Integer paymentType) {\n\t\tthis.paymentType = paymentType;\n\t}", "public PaymentType getPaymentType() {\n\t\treturn paymentType;\n\t}", "public Short getPayType() {\n return payType;\n }", "public PaymentType typeOfPayment() {\n\t\treturn category.Comision;\n\t}", "public void setPaymenttype (java.lang.String paymenttype) {\r\n\t\tthis.paymenttype = paymenttype;\r\n\t}", "public WebElement select123BankingPaymentType(String banks123) {\n\t\treturn findElement(modifyPageElement(repositoryParser, PAGE_NAME,\n\t\t\t\t\"123Banking\", banks123));\n\t}", "public void setPayType(Short payType) {\n this.payType = payType;\n }", "public boolean selectBankAccount(String bankAccount, String user, int choose);", "public char select_deposit() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tchar type;\n\t\tdo {\n\t\t\tSystem.out.println(\"Would you like to deposit to (c)hecking balance or (s)aving balance?\");\n\t\t\ttype = scan.next().charAt(0);\n\t\t\ttype = Character.toLowerCase(type);\n\t\t} while(!(type != 'c' || type != 's'));\n\t\t\n\t\treturn type;\n\t}", "public void setPaymentType(PaymentType paymentType) {\n\t\tthis.paymentType = paymentType;\n\t}", "public void setPaymentAmountType(String paymentAmountType) {\r\n this.paymentAmountType = paymentAmountType;\r\n }", "public void setJP_BankAccountType (String JP_BankAccountType);", "public abstract String getCurrencyType();", "public Integer getPayType() {\n\t\treturn payType;\n\t}", "public List<SelectItem> loadComboPaymentType() {\n\t\tlistPaymentType = new ArrayList<SelectItem>();\n\t\tlistPaymentType.add(new SelectItem(ContantsUtil.PaymentType.PAYMENT_TYPE_PREPAID,\n\t\t\t\tContantsUtil.PaymentType.PAYMENT_TYPE_PREPAID_NAME));\n\t\tlistPaymentType.add(new SelectItem(ContantsUtil.PaymentType.PAYMENT_TYPE_POSTPAID,\n\t\t\t\tContantsUtil.PaymentType.PAYMENT_TYPE_POSTPAID_NAME));\n\t\treturn listPaymentType;\n\t}", "public void chosePaymentMethod(String paymentMode) {\n\t\tswitch (paymentMode) {\n\t\tcase \"COD\":\n\t\t\tPayMethod = new cashOnDelivery();\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"creditCard\":\n\t\t\tPayMethod = new creditCard();\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"debitCard\":\n\t\t\tPayMethod = new debitCard();\n\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"netBanking\":\n\t\t\tPayMethod =new netBanking();\n\t\t\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tPayMethod =null;\n\t\t\tbreak;\n\t\t}\n\n\t}", "Databank getBank();", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public void setPayType(Boolean payType) {\n this.payType = payType;\n }", "public PaymentGatewayType getType() {\n return this.paymentGatewayType;\n }", "public Boolean getPayType() {\n return payType;\n }", "public List<HCLFieldTransaction> getTransactionbyType(String transactionType)\r\n\t\t\tthrows JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTransactionbyType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTransactionbyType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) {\r\n\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Type :: \" + transactionType);\r\n\t\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTransactionbyType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Return value from service layer:: getTransactionbyType() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\r\n\t}", "public abstract java.util.Set getPaymentTypes();", "private String getFundingTypeLabel(String type, Locale locale) {\n String paymentMethodLabel = \"\";\n if (type.equalsIgnoreCase(PdfConstants.CREDIT)) {\n paymentMethodLabel = \"\";\n } else if (type.equalsIgnoreCase(PdfConstants.BLACKHAWK) || type.equalsIgnoreCase(PdfConstants.PRECASH) ||\n type.equalsIgnoreCase(PdfConstants.INCOMM)) {\n paymentMethodLabel = getMessage(locale, \"pdf.receipt.cashFundingSource\");\n } else if (type.equalsIgnoreCase(PdfConstants.PROMO_CREDIT)) {\n paymentMethodLabel = getMessage(locale, \"pdf.receipt.promoFundingSource\");\n }\n return paymentMethodLabel;\n }", "PaymentMethod getPaymentMethod();", "@Override\n\tpublic String showTypeCard() {\n\t\treturn \"It's payment by Visa\";\n\t}", "public boolean selectExisitingAccount(int choice, String bankAccount);", "public String getPaymentTypeName() {\n return paymentTypeName;\n }", "TokenlyCurrency getCurrencyType();", "@Override\n public byte getSubtype() {\n return SUBTYPE_PAYMENT_ORDINARY_PAYMENT;\n }", "@Override\r\n\tpublic void solicitarTipoTransaccion() {\n\t\tSystem.out.println(\"Escoger tipo de transaccion\");\r\n\t\t\r\n\t}", "TokenlyBalancesType getType();", "private void doBankRequest(final String amount) {\n ParseObject bankRequest = new ParseObject(Constants.CLASS_TRANSACTIONS);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_FROM, mCurrentUser);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n bankRequest.put(Constants.CLASS_TRANSACTIONS_RESOLUTION, false);\n bankRequest.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n mProgressBar.setVisibility(View.INVISIBLE);\n if (e == null) {\n\n bankRequestObject = new JSONObject();\n try {\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_FROM, mUserId);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n } catch (JSONException el) {\n el.printStackTrace();\n }\n\n saveTransaction(amount, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n\n Logger.s(getApplicationContext(), getString(R.string.request_sent_message_txt));\n IntentUtils.startActivity(RequestFundsActivity.this, HomeActivity.class);\n finish();\n } else if (e.getCode() == ParseException.CONNECTION_FAILED || e.getCode() == ParseException.TIMEOUT) {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.network_timeout_message_txt));\n } else {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.general_error_message_txt));\n }\n }\n });\n }", "public void setPaymentType(String paymentType) {\r\n this.paymentType = paymentType == null ? null : paymentType.trim();\r\n }", "public String getCreditCardType();", "public char select_withdraw() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tchar type;\n\t\tdo {\n\t\t\tSystem.out.println(\"Would you like to withdraw from (c)hecking balance or (s)aving balance?\");\n\t\t\ttype = scan.next().charAt(0);\n\t\t\ttype = Character.toLowerCase(type);\n\t\t} while(!(type != 'c' || type != 's'));\n\t\t\n\t\treturn type;\n\t}", "public String getOrderType(@XPath(value = \"/order:order/order:type\",\n namespaces = @NamespacePrefix(prefix = \"order\", uri = \"http://vpsdemo.no/order/v1\")) String type) {\n \tif (buy.equals(\"buy\")) {\n return buy;\n }\t else if (sell.equals(\"sell\")) {\n return sell;\n } else {\n return unknown;\n }\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "public PURCHASE_TYPE getType(){\n return type;\n }", "TransactionType createTransactionType();", "public Account transactionMenu(boolean transferOut){\r\n String typeOfAccount = null;\r\n int accountNum = 0;\r\n int numAccounts = -1;\r\n\r\n boolean selectionNotMade = true;\r\n while (selectionNotMade) {\r\n System.out.println(\"Select account type:\");\r\n if (!transferOut) {\r\n System.out.println(\" 1. Credit Card\");\r\n }\r\n System.out.println(\" 2. Line Of Credit\");\r\n System.out.println(\" 3. Chequing\");\r\n System.out.println(\" 4. Savings\");\r\n typeOfAccount = BankMachine.getInput();\r\n switch (typeOfAccount){\r\n case \"1\":\r\n if (!transferOut) {\r\n numAccounts = creditCounter;\r\n break;\r\n }\r\n case \"2\":\r\n numAccounts = lineOfCreditCounter;\r\n break;\r\n case \"3\":\r\n numAccounts = chequingCounter;\r\n break;\r\n case \"4\":\r\n numAccounts = savingCounter;\r\n break;\r\n default:\r\n System.out.println(\"INVALID ENTRY\");\r\n numAccounts = -1;\r\n break;\r\n }\r\n if (numAccounts == 0){\r\n System.out.println(\"You have no accounts of this type\\n\");\r\n } else if (numAccounts != -1){\r\n selectionNotMade = false;\r\n }\r\n }\r\n boolean accountLoop = true;\r\n System.out.println(\"Currently there are \" + numAccounts + \" of these accounts.\");\r\n while (accountLoop){\r\n System.out.println(\"Enter the number of the account you wish to access:\");\r\n String withdrawAccount = BankMachine.getInput();\r\n if (withdrawAccount.matches(\"-?\\\\d+\")){\r\n accountNum = Integer.parseInt(withdrawAccount);\r\n if (accountNum > 0 && accountNum <= numAccounts){\r\n accountLoop = false;\r\n }else{\r\n System.out.println(\"INVALID ENTRY\");\r\n }\r\n }\r\n else{\r\n System.out.println(\"INVALID ENTRY\");\r\n }\r\n }\r\n return getSpecifiedAccount(typeOfAccount, accountNum);\r\n }", "public void setPaymentTypeName(String paymentTypeName) {\n this.paymentTypeName = paymentTypeName;\n }", "public void setCreditCardType (String CreditCardType);", "abstract void addDepositTransaction(Transaction deposit, Ui ui, String bankType) throws BankException;", "int getCouponType();", "public String getProposedTransactionType() {\n return proposedTransactionType;\n }", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tpayment_type = \"2\";\r\n\r\n\t\t\t}", "public Integer addPaymentType(PaymentTypeObject paymentTypeObject) throws AppException;", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tpayment_type = \"1\";\r\n\r\n\t\t\t}", "@Override\r\n\tpublic XftPayment selectByNo(String payNo, String payType) {\n\t\treturn xftPaymentMapper.selectByNo(payNo, payType);\r\n\t}", "public String getPredefinedType() {\n return \"purchase\";\n }", "public void queryBytransType(String transType) {\n\t\tTRANSACTION_TYPE = transType;\n\t}", "public ArrayList<PaymentTypeObject> getPaymentTypes(PaymentTypeObject paymenttype_obj) throws AppException;", "private String getFundingLabel(String type, Locale locale) {\n String paymentMethodLabel = \"\";\n if (type.equalsIgnoreCase(PdfConstants.PROMO_CREDIT)) {\n paymentMethodLabel = getMessage(locale, \"pdf.receipt.promoCredit\");\n } else if (type.equalsIgnoreCase(PdfConstants.BLACKHAWK)) {\n paymentMethodLabel = getMessage(locale, \"pdf.receipt.reloaditPack\");\n } else if (type.equalsIgnoreCase(PdfConstants.PRECASH)) {\n paymentMethodLabel = getMessage(locale, \"pdf.receipt.evolvePayBucks\");\n } else if (type.equalsIgnoreCase(PdfConstants.INCOMM)) {\n paymentMethodLabel = getMessage(locale, \"pdf.receipt.vanillaReload\");\n }\n return paymentMethodLabel;\n }", "private String getTypeOfTransaction(String transact) {\n\t\tif ( transact.indexOf(\"w\") != -1 ) {\n\t\t\treturn TRANSTYPE_WRITABLE;\n\t\t} \n\t\treturn TRANSTYPE_READABLE;\n\t}", "@Override\n public String getDescription() {\n return \"Transfer currency\";\n }", "private void returnDeposit(String paymentInfo) {\n }", "public Builder copy (PaymentType paymentType)\n {\n this.cashPayment = paymentType.cashPayment;\n this.eftPayment = paymentType.eftPayment;\n return this;\n }", "public String getMoneyType() {\n return moneyType;\n }", "CashSettlementMethodEnum getCashSettlementMethod();", "@NotNull(message = \"empty.paymentType\")\n public PaymentType getPaymentType() {\n\n return paymentType;\n }", "public Integer updatePaymentType(PaymentTypeObject paymentTypeObject) throws AppException;", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "void setType(TokenlyBalancesType tokenlyBalancesType);", "void pay(Payment payment) {\n\n\t}", "public Integer getBalanceType() {\n return balanceType;\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_MONETARY_SYSTEM_CURRENCY_TRANSFER;\n }", "public LookupAccountTransactions sigType(Enums.SigType sigType) {\n addQuery(\"sig-type\", String.valueOf(sigType));\n return this;\n }", "public int getRequestableBank() \n {\n return -1; \n }", "public void registerPaymentType(String alias, int cod_sys) {\n }" ]
[ "0.68387306", "0.6563649", "0.6559946", "0.650028", "0.6489811", "0.6360381", "0.63577527", "0.63353515", "0.62556946", "0.6240028", "0.62289095", "0.6203737", "0.61815095", "0.61326337", "0.6109427", "0.6102831", "0.6055268", "0.6044514", "0.6044514", "0.6024896", "0.5998587", "0.59858817", "0.59647185", "0.59523153", "0.5948156", "0.59213346", "0.59101677", "0.5908056", "0.5888884", "0.58667624", "0.5865993", "0.58619505", "0.585173", "0.5813098", "0.5805698", "0.58053327", "0.5795914", "0.57172436", "0.57060266", "0.5705648", "0.56693363", "0.56659424", "0.5629681", "0.5599372", "0.5590916", "0.55714333", "0.556375", "0.5536375", "0.5521669", "0.551996", "0.55141944", "0.55050206", "0.5503972", "0.5496854", "0.54922926", "0.5489561", "0.5479237", "0.54754764", "0.5466338", "0.54600126", "0.54580885", "0.5446221", "0.5437611", "0.542924", "0.5420401", "0.5418364", "0.54137546", "0.54115015", "0.54101306", "0.5392009", "0.5389119", "0.5378622", "0.5370427", "0.5340945", "0.5336827", "0.53322935", "0.5331408", "0.5312923", "0.53104377", "0.53069454", "0.53068477", "0.5304255", "0.53039", "0.5302133", "0.52928066", "0.52914363", "0.5286913", "0.52661896", "0.5259015", "0.525056", "0.52491975", "0.52484447", "0.524381", "0.52311563", "0.5229906", "0.522511", "0.5224101", "0.52186626", "0.52171737", "0.52097136", "0.520236" ]
0.0
-1
Return SavedCard DropDown Element
public WebElement selectSavedCardDropDown() { return findElement(repositoryParser, PAGE_NAME, "dropDownOption"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebElement selectSavedCardPaymentMode() {\n\t\treturn wait.until(ExpectedConditions.elementToBeClickable(findElement(\n\t\t\t\trepositoryParser, PAGE_NAME, \"savedCard\")));\n\t}", "public Select getDrzava() {\n\t\treturn new Select(Utils.waitForElementPresence(driver, By.name(\"state\"), 10));\n\t}", "private JComboBox getCardValue() {\n\t\tif (cardValue == null) {\n\t\t\tcardValue = new JComboBox();\n\t\t\tcardValue.setModel(new TypeModel(TypeModel.valueType_cards));\n\t\t\tcardValue.setSelectedIndex(5);\n\t\t}\n\t\treturn cardValue;\n\t}", "public String getDropdown() {\n\t\treturn dropdown;\n\t}", "public void Dropdownselection(WebElement ele) {\t\t\n\t\t\n\t Select dropdown = new Select(ele);\n\t//Get all options\n\tList<WebElement> dd = dropdown.getOptions();\n\t int iCnt = dd.size();\n Random num = new Random();\n int iSelect = num.nextInt(iCnt);\n dropdown.selectByIndex(iSelect);\n System.out.println(\"Element Name 1 : \" +ele.getAttribute(\"value\"));\n\t}", "private JComboBox getCardType() {\n\t\tif (cardType == null) {\n\t\t\tcardType = new JComboBox();\n\t\t\tcardType.setModel(new TypeModel(TypeModel.type_cards));\n\t\t\tcardType.setSelectedIndex(0);\n\t\t}\n\t\treturn cardType;\n\t}", "WebElement getStatusSelectField();", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown9() {\n return build_f_ListDropDown9();\n }", "public SelenideElement rolesDropDownButton () {\n return formPageRoot().$(\"button.dropdown-toggle\");\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown44() {\n return build_f_ListDropDown44();\n }", "public Selectable getValuableElement();", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown55() {\n return build_f_ListDropDown55();\n }", "public HTMLSelectElement getElementFciclo() { return this.$element_Fciclo; }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown66() {\n return build_f_ListDropDown66();\n }", "@Test\r\n public void getSelectAsSdt() throws Exception\r\n {\n final String HTML = \"\\n <html>\\n <select name='ComboBox' size='1'>\\n <option value='val1'>item1</option>\\n <option value='val2'></option> \\n </select>\\n </html>\\n \";\r\n\r\n HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();\r\n htmlLoadOptions.setPreferredControlType(HtmlControlType.STRUCTURED_DOCUMENT_TAG);\r\n\r\n Document doc = new Document(new MemoryStream(Encoding.getUTF8().getBytes(HTML)), htmlLoadOptions);\r\n NodeCollection nodes = doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG, true);\r\n\r\n StructuredDocumentTag tag = (StructuredDocumentTag) nodes.get(0);\r\n //ExEnd\r\n\r\n Assert.assertEquals(2, tag.getListItems().getCount());\r\n\r\n Assert.assertEquals(\"val1\", tag.getListItems().get(0).getValue());\r\n Assert.assertEquals(\"val2\", tag.getListItems().get(1).getValue());\r\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown20() {\n return build_f_ListDropDown20();\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown53() {\n return build_f_ListDropDown53();\n }", "public Option[] SetBreedDropDownData(){\n List<BreedDTO> instDTOList = this.getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().getAllBreeds();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(BreedDTO instDTO : instDTOList){\n option = new Option(instDTO.getBreedId(), instDTO.getName().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }", "public TDropListItem getSwitcherFac();", "@Path(\"/dropdown\")\r\n\t@GET\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\tpublic String getMoviesDropdown() {\r\n\t\tList<Movie> movies = new ArrayList<Movie>() {\r\n\t\t\t@Override\r\n\t\t\tpublic String toString() {\r\n\t\t\t\tString str = \"<select name=\\\"movie_id\\\">\";\r\n\t\t\t\tfor (Movie movie : this) {\r\n\t\t\t\t\tstr += \"<option value=\\\"\" + movie.getId() + \"\\\">\";\r\n\t\t\t\t\tstr += movie.getName();\r\n\t\t\t\t\tstr += \"</option>\";\r\n\t\t\t\t}\r\n\t\t\t\tstr += \"</select>\";\r\n\t\t\t\treturn str;\r\n\t\t\t}\r\n\t\t};\r\n\t\tmovies.addAll(TodoDao.instance.getMovies().values());\r\n\t\treturn \"\" + movies;\r\n\t}", "public Item GetDefautValueCombo() \n {\n return this.defautValueCombo;\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown71() {\n return build_f_ListDropDown71();\n }", "String getSelect();", "String getSelect();", "private void llenarCombo(HTMLSelectElement combo, String tabla, String codigo, String descripcion, String condicion, String defecto, boolean dejarBlanco) {\n/* 436 */ if (dejarBlanco) {\n/* 437 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 438 */ op.setValue(\"\");\n/* 439 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 440 */ combo.appendChild(op);\n/* */ } \n/* 442 */ TGeneralDAO rsTGen = new TGeneralDAO();\n/* 443 */ Collection<TGeneralDTO> arr = rsTGen.cargarTabla(tabla, codigo, descripcion, condicion);\n/* 444 */ rsTGen.close();\n/* 445 */ Iterator<TGeneralDTO> iterator = arr.iterator();\n/* 446 */ while (iterator.hasNext()) {\n/* 447 */ TGeneralDTO regGeneral = (TGeneralDTO)iterator.next();\n/* 448 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 449 */ op.setValue(\"\" + regGeneral.getCodigoS());\n/* 450 */ op.appendChild(this.pagHTML.createTextNode(regGeneral.getDescripcion()));\n/* 451 */ if (defecto != null && defecto.equals(regGeneral.getCodigoS())) {\n/* 452 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 453 */ escogida.setValue(\"on\");\n/* 454 */ op.setAttributeNode(escogida);\n/* */ } \n/* 456 */ combo.appendChild(op);\n/* */ } \n/* */ }", "public HTMLSelectElement getElementFproceso() { return this.$element_Fproceso; }", "private JComboBox getCardColor() {\n\t\tif (cardColor == null) {\n\t\t\tcardColor = new JComboBox();\n\t\t\tcardColor.setModel(new TypeModel(TypeModel.valueMast_cards));\n\t\t\tcardColor.setSelectedIndex(0);\n\t\t}\n\t\treturn cardColor;\n\t}", "@Nullable\n public T getSelectedItem() {\n return SerDes.unmirror(getElement().getSelectedItem(), getItemClass());\n }", "public interface SelectElement extends Editor {\n\t\t\n\tpublic String getParamName();\n\t\n\tpublic void renderOption(OptionItem option);\n\n\tpublic boolean isSelected(OptionItem option);\n\t\n\tpublic Object getOptions();\n\t\n\tpublic void setOptions(Object model);\n\t\n\tpublic int getOptionIndex(OptionItem option);\n\n\tpublic void reset();\n\n}", "public HTMLSelectElement getElementFarea() { return this.$element_Farea; }", "private void defaultdata()\n {\n try\n {\n \n StageBao stage_bao =\n new BaoFactory().createStageBao(); //create building bao object\n List<StageDto> stage_list =\n stage_bao.viewAll(); //get all building from DB\n \n stageComboBox.removeAllItems(); //remove all item from building combobox\n\n if(stage_list!=null&&!stage_list.isEmpty())\n {\n for(int i = 0; i<stage_list.size(); i++)\n {\n stageComboBox.addItem(stage_list.get(i).getNumber());\n }\n\n stageComboBox.setSelectedIndex(-1); //select no thing in this combo\n }\n \n \n DepartmentBao depart_bao = new BaoFactory().createDepartmentBao();\n List<DepartmentDto> depart_list = depart_bao.viewAll();\n DepartComboBox.removeAllItems();\n\n if(depart_list!=null&&!depart_list.isEmpty())\n {\n for(int i = 0; i<depart_list.size(); i++)\n {\n DepartComboBox.addItem(depart_list.get(i).getName());\n }\n DepartComboBox.setSelectedIndex(-1);\n }\n\n \n }\n \n catch(Exception e)\n {\n e.printStackTrace();\n }\n\n }", "public String returnGenderBox(){\n\t\treturn (String) genderBox.getSelectedItem();//Return the gender options\n\t}", "public String returnStageOfLife(){\n\t\treturn (String) stageofLifeBox.getSelectedItem();//Return the stage of life options\n\t}", "public SelenideElement rolesDropdown() {\n return formPageRoot().$(\".dropdown-menu\");\n }", "@Nullable String pickItem();", "public static boolean isAdded() {\r\n\tSelect BagTypeDesc = new Select(Browser.instance.findElement(BagTypeDescriptionDropdown));\r\n\tBoolean found = false;\r\n\tList<WebElement> allOptions = BagTypeDesc.getOptions();\r\n\tloop:\r\n\tfor (WebElement we : allOptions) {\r\n \r\n if (we.getText().contains(RandomString)) {\r\n found = true;\r\n System.out.println(\"The \"+ RandomString +\" has been added to BagType description\");\r\n break loop;\r\n \r\n }\r\n\t}\r\n\treturn found;\r\n}", "private JComboBox getComboBoxDomaci() {\r\n\t\tif (comboBoxDomaci == null) {\r\n\t\t\tcomboBoxDomaci = new JComboBox<Tim>();\r\n\t\t\tGUIKontroler.popuniComboBox(comboBoxDomaci);\r\n\t\t\tcomboBoxDomaci.setPreferredSize(new Dimension(130, 20));\r\n\t\t}\r\n\t\treturn comboBoxDomaci;\r\n\t}", "public String getChoice() {\r\n\t\ttype(ConfigurationItemType.CHOICE);\r\n\t\treturn stringValue;\r\n\t}", "public void selectOption(WebElement element,String text) {\nSelect s=new Select(element);\n//List<WebElement> options = s.getOptions();\n//WebElement webElement = options.get(index);\n//String text = webElement.getText();\ns.selectByVisibleText(text);\n\n\n}", "public void addZoneCommitte() {\n\t\t\tid = new JComboBox<Integer>();\n\t\t\tAutoCompleteDecorator.decorate(id);\n\t\t\tid.setBackground(Color.white);\n\t\t\tJButton save = new JButton(\"Save members \");\n\t\t\tfinal Choice position = new Choice();\n\t\t\tfinal JTextField txtLevel = new JTextField(10), txtPhone = new JTextField(10);\n\t\t\tfinal Choice chczon = new Choice();\n\n\t\t\ttry {\n\t\t\t\tString sql = \"select * from Zone;\";\n\t\t\t\tResultSet rs = null;\n\t\t\t\t// Register jdbc driver\n\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t// open connection\n\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tchczon.add(rs.getString(\"Name\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\t}\n\n\t\t\t// select zone before proceeding\n\t\t\tObject[] zone = { new JLabel(\"Zone\"), chczon };\n\t\t\tint option = JOptionPane.showConfirmDialog(this, zone, \"Choose zone..\", JOptionPane.OK_CANCEL_OPTION,\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\n\t\t\tif (option == JOptionPane.OK_OPTION) {\n\n\t\t\t\ttry {\n\t\t\t\t\tString sql = \"select * from Registration where Zone=?;\";\n\t\t\t\t\tResultSet rs = null;\n\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t// open connection\n\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\tstmt.setString(1, chczon.getSelectedItem());\n\t\t\t\t\trs = stmt.executeQuery();\n\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tid.addItem(Integer.parseInt(rs.getString(\"RegNo\")));\n\t\t\t\t\t}\n\t\t\t\t\tif (id.getItemCount() > 0) {\n\t\t\t\t\t\tsql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\n\t\t\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (SQLException | ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tid.addItemListener(new ItemListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString sql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\t\t\t\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// If save button clicked, get the inputs from the text fields\n\t\t\t\tsave.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t// ID = Integer.parseInt(IDs.getSelectedItem().toString());\n\t\t\t\t\t\tint RegNo = Integer.parseInt(id.getSelectedItem().toString());\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Insertion to database\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tif (txtPhone.getText().isEmpty() | txtLevel.getText().isEmpty()) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Phone Number or Level cannot be empty\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t\t\t\t// open connection\n\t\t\t\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\t\t\t\tString sql = \"INSERT INTO `Zone committee`(`ID`, `BaptismalName`, `OtherName`, `Phone`, `Position`, `Level`, `Zone`)\"\n\t\t\t\t\t\t\t\t\t\t+ \" VALUES (?,?,?,?,?,?,?);\";\n\t\t\t\t\t\t\t\tstmt = (PreparedStatement) con.prepareStatement(sql);\n\t\t\t\t\t\t\t\tstmt.setInt(1, RegNo);\n\t\t\t\t\t\t\t\tstmt.setString(2, txtFname.getText().toString().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(3, txtSname.getText().toString().toUpperCase());\n\n\t\t\t\t\t\t\t\tstmt.setInt(4, Integer.parseInt(txtPhone.getText().toString()));\n\t\t\t\t\t\t\t\tstmt.setString(5, position.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(6, txtLevel.getText().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(7, chczon.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.executeUpdate();\n\t\t\t\t\t\t\t\tshowZonecomm();\n\t\t\t\t\t\t\t\tid.setSelectedIndex(0);\n\t\t\t\t\t\t\t\ttxtFname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtSname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtLevel.setText(\"\");\n\t\t\t\t\t\t\t\ttxtPhone.setText(\"\");\n\t\t\t\t\t\t\t\tposition.select(0);\n\t\t\t\t\t\t\t} catch (SQLException | ClassNotFoundException e2) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Member exists in the committee list!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// add items to the choice box\n\t\t\t\tposition.add(\"Chairperson\");\n\t\t\t\tposition.add(\"Vice chairperson\");\n\t\t\t\tposition.add(\"Secretary\");\n\t\t\t\tposition.add(\"Vice secretary\");\n\t\t\t\tposition.add(\"Treasurer\");\n\t\t\t\tposition.add(\"Member\");\n\t\t\t\tposition.select(\"Member\");\n\n\t\t\t\tObject[] inputfields = { new JLabel(\"Type ID and press ENTER\"), id, labBaptismalName, txtFname,\n\t\t\t\t\t\tlabOtherName, txtSname, labPhone, txtPhone, new JLabel(\"Level\"), txtLevel, labPosition, position };\n\n\t\t\t\tJOptionPane.showOptionDialog(this, inputfields, \"Enter zone committee members\", JOptionPane.DEFAULT_OPTION,\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, new Object[] { save }, null);\n\t\t\t}\n\n\t\t}", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu57() {\n return build_f_DropDownMenu57();\n }", "public HTMLSelectElement getElementCodigoEmpleado() { return this.$element_CodigoEmpleado; }", "public static void ViewNewBagType()\r\n{\r\n\r\n\r\n\tselectBagType(RandomString);\r\n\tSystem.out.println(\"BagTypeName Viewed Successfully\");\r\n\t\r\n}", "public DevCard giveDevCard(){\n \n return null;\n }", "private JLabel getDchjComboBox() {\r\n\t\tif (dchjComboBox == null) {\r\n\t\t\tdchjComboBox = new JLabel();\r\n\t\t\tdchjComboBox.setForeground(color);\r\n\t\t\tdchjComboBox.setBounds(new Rectangle(96, 54, 90, 18));\r\n\t\t\tdchjComboBox.setText(name);\r\n\t\t}\r\n\t\treturn dchjComboBox;\r\n\t}", "public ActionForward dropdown(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n \t\t\tHttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> ... \");\n \n \t\t// blank out the FORMDATA Constant field\n \t\tViralTreatmentForm viralTreatmentForm = (ViralTreatmentForm) form;\n \t\trequest.getSession().setAttribute(Constants.FORMDATA, viralTreatmentForm);\n \n \t\t// setup dropdown menus\n \t\tthis.dropdown(request, response);\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction> exiting... \");\n \n \t\treturn mapping.findForward(\"submitViralTreatment\");\n \t}", "@Override\r\n\tprotected Object getSelectData() {\n\t\treturn null;\r\n\t}", "public Select getSelect()\n {\n return select;\n }", "public void addToInsertSelects(entity.LoadInsertSelect element);", "public void buildConsultantComboBox(){\r\n combo_user.getSelectionModel().selectFirst(); // Select the first element\r\n \r\n // Update each timewindow to show the string representation of the window\r\n Callback<ListView<User>, ListCell<User>> factory = lv -> new ListCell<User>(){\r\n @Override\r\n protected void updateItem(User user, boolean empty) {\r\n super.updateItem(user, empty);\r\n setText(empty ? \"\" : user.getName());\r\n }\r\n };\r\n \r\n combo_user.setCellFactory(factory);\r\n combo_user.setButtonCell(factory.call(null)); \r\n }", "public SelenideElement dropDownOption(String text) {\n return rolesDropdown().$$(\"a\").find(Condition.text(text));\n }", "public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }", "public JComponent playerDropDownList(Player[] plyrs) {\n \tplayers=plyrs;\n \tif(players!=null){\n\t \tString[] nameStrings = new String[players.length];\n\t \tfor(int i=0;i<players.length;i++){\n\t \t\tnameStrings[i]=\"\"+players[i].getID()+\" - \"+players[i].getFirst()+\" \"+players[i].getLast();\n\t \t}\n\t \t\n\t \tplayerComboBox = new JComboBox(nameStrings);\n\t \tplayerComboBox.setSelectedItem(\"Select from a list of current players\");\n\t \tplayerComboBox.addActionListener(new ActionListener() {\n\t \t public void actionPerformed(ActionEvent e) { \t\t\t\n\t \t\t\tfirstFieldP.setText(players[playerComboBox.getSelectedIndex()].getFirst()); \n\t \t\t\tlastFieldP.setText(players[playerComboBox.getSelectedIndex()].getLast());\n\t \t\t\tpID=players[playerComboBox.getSelectedIndex()].getID();\n\t \t\t}\n\t \t});\n \t} else\n \t\tplayerComboBox=new JComboBox();\n\t \tJPanel p = new JPanel();\n\t \tp.add(playerComboBox);\n\t \treturn p;\n }", "public void dropdown(HttpServletRequest request, HttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> Entering... \");\n \n \t\t// Prepopulate all dropdown fields, set the global Constants to the\n \t\t// following\n \n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.SEXDISTRIBUTIONDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.AGEUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRUSDROP, Constants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRALTREATUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.ADMINISTRATIVEROUTEDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t}", "private String getPickUpLocation() {\n return priceDetailsModule.findElement(By.className(\"seleniumPickupLocation\")).getText();\n }", "void selectDirectory(){\n fc.setCurrentDirectory(new java.io.File( \"saved\" + File.separator));\n fc.setDialogTitle(\"FILE CHOOSER!\");\n FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(\n \"json files (*.json)\", \"json\");\n fc.setFileFilter(xmlfilter);\n int response = fc.showSaveDialog(this);\n if (response == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fc.getSelectedFile();\n System.out.println(\"Save as file: \" + selectedFile.getAbsolutePath());\n } else if (response == JFileChooser.CANCEL_OPTION) {\n System.out.println(\"Cancel was selected\");\n }\n System.out.println(fc.getSelectedFile().getAbsolutePath());\n }", "@Override\n public void perform() {\n pickList.advanced().getSourceList().getItem(ChoicePickerHelper.byIndex().last()).select();\n pickList.advanced().getAddButtonElement().click();\n pickList.advanced().getRemoveButtonElement().click();\n }", "public Team selectTeam() {\r\n \r\n String[] list = new String[controller.getTeams().size()];\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n list[i] = controller.getTeams().get(i).getName();\r\n }\r\n\r\n JComboBox cmbOption = new JComboBox(list);\r\n int input = JOptionPane.showOptionDialog(null, cmbOption, \"Select Team that your like Delete\",JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_MESSAGE, null, null, null);\r\n if(input==-1){\r\n return null;\r\n }\r\n Team teamAux = controller.searchTeam((String) cmbOption.getSelectedItem());\r\n return teamAux;\r\n }", "public String getProfileSelect() {\n if (UrlHelper.getParameterBoolean(\"profileSelect\")) {\n setProfileSelectMode(true);\n } else {\n setProfileSelectMode(false);\n }\n return \"\";\n }", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu22() {\n return build_f_DropDownMenu22();\n }", "public void selectDropDuwn(String dropDownValue) {\n\t\t\n\t\ttry {\n\t\t\tTestLog.log.info(\"check dropdown exist\");\n\t\t\tif (driver.findElement(dropDown).isDisplayed()) {\n\t\t\t\tTestLog.log.info(\"select from dropdown list\");\n\t\t\t\tSelect drpRecords = new Select(driver.findElement(dropDown));\n\t\t\t\tdrpRecords.selectByVisibleText(dropDownValue);\n\t\t\t} else {\n\t\t\t\tTestLog.log.info(\"dropdown does not exist\");\n\t\t\t\tSystem.out.println(\"Table Entry dropdown not visible\");\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tTestLog.log.info(\"Could not find dropdown\" + ex);\n\t\t}\n\n\t}", "public String show() {\n Stage stage = new Stage();\n FileChooser fc = new FileChooser();\n\n //geef de filechooser een duidelijke naam zodat de gebruiker weet wat hij/zij moet doen.\n fc.setTitle(\"Selecteer een eerder opgeslagen .SAV bestand.\");\n\n //zorg dat de filechooser alleen .sav files accepteert.\n FileChooser.ExtensionFilter extentionFilter = new FileChooser.ExtensionFilter(\"SAV files .sav\", \"*.sav\");\n fc.getExtensionFilters().add(extentionFilter);\n\n //initial directory = de home folder van de user.\n String currentDir = System.getProperty(\"user.home\");\n File directoryPath = new File(currentDir);\n fc.setInitialDirectory(directoryPath);\n String filePath = fc.showOpenDialog(stage).getAbsolutePath();\n return filePath;\n }", "private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {\n/* 393 */ SisMultiValoresDAO ob = new SisMultiValoresDAO();\n/* 394 */ Collection<SisMultiValoresDTO> arr = ob.cargarTabla(tabla);\n/* 395 */ ob.close();\n/* 396 */ if (dejarBlanco) {\n/* 397 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 398 */ op.setValue(\"\");\n/* 399 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 400 */ combo.appendChild(op);\n/* */ } \n/* 402 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();\n/* 403 */ while (iterator.hasNext()) {\n/* 404 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();\n/* 405 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 406 */ op.setValue(\"\" + reg.getCodigo());\n/* 407 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));\n/* 408 */ if (defecto.equals(reg.getCodigo())) {\n/* 409 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 410 */ escogida.setValue(\"on\");\n/* 411 */ op.setAttributeNode(escogida);\n/* */ } \n/* 413 */ combo.appendChild(op);\n/* */ } \n/* 415 */ arr.clear();\n/* */ }", "public WebElement btnFirstOption()\n\t{\n\t\treturn getDriver().findElement(By.cssSelector(\"#preformatted-coverages-auto-plans-1 > div.preformatted-coverages__content > a\"));\n\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tdropdown.clear();\r\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tSpielplanErstellenForm erstellen = new SpielplanErstellenForm();\r\n\r\n\t\t\tRootPanel.get(\"details\").add(erstellen);\r\n\t\t}", "public void remplireListeOptions(){\r\n bddOptions.add(\"id\");\r\n bddOptions.add(\"EnvoieMail\");\r\n bddOptions.add(\"MailPeriode\");\r\n bddOptions.add(\"PeriodeJour\");\r\n bddOptions.add(\"PeriodeHeure\");\r\n bddOptions.add(\"PeriodeLun\");\r\n bddOptions.add(\"PeriodeMar\");\r\n bddOptions.add(\"PeriodeMerc\");\r\n bddOptions.add(\"PeriodeJeu\");\r\n bddOptions.add(\"PeriodeVen\");\r\n bddOptions.add(\"PeriodeSam\");\r\n bddOptions.add(\"PeriodeDim\");\r\n }", "public String getOptionSelection(){\r\n\t\treturn optionSelection;\r\n\t}", "public void searchFilter(){\n\t\t\n\t\tdriver.findElement(By.xpath(\"//div[@class='_3uDYxP']//select[@class='_2YxCDZ']\")).click();\n\t\tSystem.out.println(\"drop-downselected\");\n\t}", "private JComboBox accountSelector()\n\t{\n\t\tJComboBox viewSelectorDropdown = new JComboBox();\n\t\tviewSelectorDropdown.setBackground(ColorScheme.DARKER_GRAY_COLOR.darker());\n\t\tviewSelectorDropdown.setFocusable(false);\n\t\tviewSelectorDropdown.setForeground(ColorScheme.GRAND_EXCHANGE_PRICE);\n\t\tviewSelectorDropdown.setRenderer(new ComboBoxListRenderer());\n\t\tviewSelectorDropdown.setToolTipText(\"Select which of your account's trades list you want to view\");\n\t\tviewSelectorDropdown.addItemListener(event ->\n\t\t{\n\t\t\tif (event.getStateChange() == ItemEvent.SELECTED)\n\t\t\t{\n\t\t\t\tString selectedName = (String) event.getItem();\n\t\t\t\tplugin.changeView(selectedName);\n\t\t\t}\n\t\t});\n\n\t\treturn viewSelectorDropdown;\n\t}", "public String getSelectedWebsiteData()\n {\n try\n {\n Select websiteDataDropdown = new Select(driver.findElement(LOAD_DATA_SELECTOR));\n return websiteDataDropdown.getFirstSelectedOption().getText();\n }\n catch (NoSuchElementException e)\n {\n throw new PageException(\"Unable to locate filter elements from the dropdown\", e);\n }\n }", "private RComboBox getComboBox() {\n\tif (ComboBox == null) {\n\t\tComboBox = new RComboBox();\n\t\tComboBox.setName(\"ComboBox\");\n\t\tComboBox.setModelConfiguration(\"{/result \\\"\\\"/version \\\"3.0\\\"/icon \\\"\\\"/tooltip \\\"\\\"}\");\n\t}\n\treturn ComboBox;\n}", "private void loadDropDownInfo() {\n\t\tif(isConnected) {\n\t\t\ttry {\n\t\t\t\tlocationBuilder = connection.getLocationData();\n\n\t\t\t\tbuildingComboData = locationBuilder.getBLDGList();\n\t\t\t\tcampusComboData = locationBuilder.getCampusList();\n\t\t\t\troomComboData = locationBuilder.getRMList();\n\n\t\t\t\tbuildingCombo.setItems(buildingComboData);\n\t\t\t\tcampusCombo.setItems(campusComboData);\n\t\t\t\troomCombo.setItems(roomComboData);\n\n\t\t\t\tbuildingCombo.getSelectionModel().selectFirst();\n\t\t\t\tcampusCombo.getSelectionModel().selectFirst();\n\t\t\t\troomCombo.getSelectionModel().selectFirst();\n\t\t\t} // End try statement \n\t\t\tcatch (SQLException e) {\n\t\t\t\tsetNotificationAnimation(\"Connection Problem, Could Not Pull Information\", Color.RED);\n\t\t\t} // End catch statement \n\t\t} // End if statement\n\t\telse {\n\t\t\tsetNotificationAnimation(\"Not Connect\", Color.RED);\n\t\t} // End else statement \n\t}", "private void addCard(){\n WebDriverHelper.clickElement(addCard);\n }", "private void RenderCombo()\r\n\t{\r\n\t\tSystem.out.println(\"Setup\");\r\n\t\tList<ProductionOrder> productionOrders = null;\r\n\t\t\t\t\r\n \ttry {\r\n \t\tproductionOrders = this.getProductionOrderService().findProductionOrders(); \r\n \t\tif(productionOrders==null)\r\n \t\t\tSystem.out.println(\"productoinOrders is null\");\r\n\t \t_productionOrderSelect = null;\r\n\t \t_productionOrderSelect = new GenericSelectModel<ProductionOrder>(productionOrders,ProductionOrder.class,\"FormattedDocNo\",\"id\",_access);\r\n\t \tif(_productionOrderSelect==null){\r\n\t \t\tSystem.out.println(\"Setuprender productionOrderselect is null\");\r\n\t \t}\r\n \t}\r\n \tcatch(Exception e)\r\n \t{\r\n \t\t\r\n \t}\r\n \tfinally {\r\n \t\t\r\n \t}\r\n\t}", "public Box pickUp() {\n //System.out.println(\"Nincs mit felvenni.\");\n return null;\n }", "@Override\n public byte[] getSelectedData() {\n return null;\n }", "private void chooseDeck() throws IOException {\n String deckname = userSelection(displayOptions());\n projectController.setDeck(deckname + \".anki\");\n }", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "private JComboBox getDfwjComboBox() {\r\n\t\tif (dfwjComboBox == null) {\r\n\t\t\tdfwjComboBox = new JComboBox();\r\n\t\t\tdfwjComboBox.setBackground(Color.GRAY);\r\n\t\t\tdfwjComboBox.setBounds(new Rectangle(250, 54, 60, 18));\r\n\t\t\tdfwjComboBox.addItemListener(new java.awt.event.ItemListener() {\r\n\t\t\t\tpublic void itemStateChanged(java.awt.event.ItemEvent e) {\r\n\t\t\t\t\t// JComboBox状态的变化有两种,一是从selected到unselected还有从unselected到selected\r\n\t\t\t\t\t// 这里处理的是从unselected到selected\r\n\t\t\t\t\tif (e.getStateChange() == ItemEvent.SELECTED) {\r\n\t\t\t\t\t\t// 取消启动就打开输入用户名和密码的界面\r\n\t\t\t\t\t\tcurrentPage = 1;\r\n\t\t\t\t\t\tpageSize = 0;\r\n\t\t\t\t\t\tgetQx();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tdfwjComboBox.addItem(\"全部\");\r\n\t\t\tdfwjComboBox.addItem(\"定位\");\r\n\t\t\tdfwjComboBox.addItem(\"反位\");\r\n\t\t\tdfwjComboBox.setSelectedIndex(0);\r\n\t\t}\r\n\t\treturn dfwjComboBox;\r\n\t}", "public Option[] SetSitesDropDownData(){\n List<SiteDTO> instDTOList = this.getinventory$GatheringSessionBean().SetSitesDropDownData();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(SiteDTO sDTO : instDTOList){\n option = new Option(sDTO.getSiteId(), sDTO.getDescription().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }", "private JButton getAddQuantityCardButton() {\n\t\tif (addQuantityCardButton == null) {\n\t\t\taddQuantityCardButton = new JButton();\n\t\t\taddQuantityCardButton.setText(\"Добавить\");\n\t\t\taddQuantityCardButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tDefaultListModel model = (DefaultListModel) functionList.getModel();\n\t\t\t\t\tParseElement el = new ParseElement((ListElement) cardType.getSelectedItem(), (String)condition.getSelectedItem(), (String)value.getSelectedItem());\n\n\t\t\t\t\t((DefaultListModel) functionList.getModel()).add(model.getSize(), el);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn addQuantityCardButton;\n\t}", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu11() {\n return build_f_DropDownMenu11();\n }", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu46() {\n return build_f_DropDownMenu46();\n }", "public String getSelectedItem() {\n return (String) itsCombo.getSelectedItem();\n }", "private String getChoice() {\n return searchChoiceBox.getValue();\n }", "public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu55() {\n return build_f_DropDownMenu55();\n }", "public String getSelection()\n\t{\n\t\tString hour = (String)cbHour.getSelectedItem();\n\t\tString minutes = (String)cbMinutes.getSelectedItem();\n\t\tString am_pm = (String)cb_Am_Pm.getSelectedItem();\n\t\t\n\t\treturn (hour+\":\"+minutes+\" \"+am_pm);\n\t\t\n\t}", "private void add() {\n \t\r\n\tArrayAdapter<String> adp=new ArrayAdapter<String>(this,\r\n\t\tandroid.R.layout.simple_dropdown_item_1line,li);\r\n\t \t\r\n\tadp.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\tauto.setThreshold(1);\r\n\tauto.setAdapter(adp);\r\n\tsp.setAdapter(adp);\r\n\t\r\n }", "private void loadnetwork() {\n try {\n java.sql.Statement s = db.Database.Database();\n java.sql.ResultSet rs = s.executeQuery(\"SELECT name FROM network\");\n Vector v = new Vector();\n while (rs.next()) {\n v.add(rs.getString(1));\n}\n networkCombo.setModel(new DefaultComboBoxModel(v));\n } catch (Exception ex) {\n Logger.getLogger(ScratchCard_New.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private File showSaveAsDialog()\n {\n \tJFileChooser fc = new JFileChooser(m_preferences.get(\"path-save-game\"));\n \tif (m_file != null) fc.setSelectedFile(m_file);\n \tint ret = fc.showSaveDialog(this);\n \tif (ret == JFileChooser.APPROVE_OPTION)\n \t return fc.getSelectedFile();\n \treturn null;\n }", "public void setSingleSelectValue(String value){\n WebElement select = driver.findElement(singleSelectLocator);\n Select sele = new Select(select);\n sele.selectByIndex(1);\n /*\n actions.click(select).sendKeys(value).build().perform();\n // WebElement datalist = driver.findElement(By.tagName(\"datalist\"));\n \n List<WebElement> allOptions = select.findElements(By.tagName(\"option\"));\n System.out.println(\"#of datalist options: \" + allOptions.size());\n actions.moveToElement(allOptions.get(1)).click().build().perform();\n */\n //shift + tab\n // actions.sendKeys(Keys.TAB).perform();\n WebElement empidField = driver.findElement(inputTextEmpidLocator); \n actions.click(empidField).perform();\n \n }", "private Department selectDepartment()\n {\n Department selectedDepartment = null;\n if(listViewSelectedHospital != null){\n listViewSelectedHospital = listViewSelectedHospital.trim();\n String hospitalName = listViewSelectedHospital.split(\" \")[0];\n selectedDepartment = getDepartment(hospitalName);\n }\n return selectedDepartment;\n }", "private void dvdRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dvdRadioActionPerformed\n itemList.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select a DVD\", \"Monsters University\", \"The Avengers\", \"The Great Gatsby\" }));\n }", "public static String getSelectedOption(WebElement options) {\n\t\tString sSelectedOption = null;\n\t\ttry {\n\t\t\tlogger.info(\"INTO THE METHOD getSelectedOption\");\n\t\t\tSelect selectedOption = new Select(options);\n\t\t\tsSelectedOption = selectedOption.getFirstSelectedOption().getText();\n\t\t\tlogger.info(\"OUT OF METHOD getSelectedOption\");\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Some error came on function->select->\"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\treturn sSelectedOption;\n\t}", "public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUfEditar.addItem(list);\n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbUfEditar.setSelectedItem(nome);\n \n \n \n }", "private void buildCountryComboBox() {\n ResultSet rs = DatabaseConnection.performQuery(\n session.getConn(),\n Path.of(Constants.QUERY_SCRIPT_PATH_BASE + \"SelectCountryByID.sql\"),\n Collections.singletonList(Constants.WILDCARD)\n );\n\n ObservableList<Country> countries = FXCollections.observableArrayList();\n try {\n if (rs != null) {\n while (rs.next()) {\n int id = rs.getInt(\"Country_ID\");\n String name = rs.getString(\"Country\");\n countries.add(new Country(id, name));\n }\n }\n } catch (Exception e) {\n Common.handleException(e);\n }\n\n countryComboBox.setItems(countries);\n\n countryComboBox.setConverter(new StringConverter<>() {\n @Override\n public String toString(Country item) {\n return item.getCountryName();\n }\n\n @Override\n public Country fromString(String string) {\n return null;\n }\n });\n }", "static void selectFirstOption(){\r\n\r\n WebDriverWait wait= new WebDriverWait(BrowserInitiation.driver, 5000);\r\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(brandFromListCssSelector)));\r\n\r\n List<WebElement> brandOptionsList= BrowserInitiation.driver.findElements(By.cssSelector(brandFromListCssSelector));\r\n brandOptionsList.get(0).click();\r\n\r\n }", "private void loadToChoice() {\n\t\tfor(Genre genre : genreList) {\n\t\t\tuploadPanel.getGenreChoice().add(genre.getName());\n\t\t}\n\t}", "private void courseDoctor() {\n conn=ConnectionDataBase.connect();\n try {\n String name=Login.user;\n ps=conn.prepareStatement(\"select * from course where nameDoctor ='\"+name+\"'\");\n rst=ps.executeQuery();\n while(rst.next())\n {\n chooseCourse.addItem(rst.getString(\"nameC\"));\n }\n chooseCourse.setSelectedIndex(-1);\n \n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }finally{\n try {\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n }\n }" ]
[ "0.59963113", "0.58753103", "0.56554264", "0.56433207", "0.55402535", "0.5481858", "0.5423382", "0.54051584", "0.539133", "0.538932", "0.53888863", "0.53563637", "0.5344311", "0.5317182", "0.53037316", "0.5293483", "0.528767", "0.52824163", "0.52526516", "0.520263", "0.5201841", "0.51824975", "0.5180032", "0.5180032", "0.5171895", "0.5160957", "0.51299477", "0.51054597", "0.5095154", "0.5064227", "0.50588936", "0.5054983", "0.5044937", "0.50426614", "0.5031694", "0.500539", "0.49764127", "0.49669415", "0.49646333", "0.4952827", "0.49110758", "0.49102956", "0.49003264", "0.48916176", "0.48890305", "0.48762447", "0.4874991", "0.48706213", "0.48560336", "0.48509508", "0.48403195", "0.4839292", "0.48316863", "0.481827", "0.48155028", "0.48148128", "0.48111928", "0.48047507", "0.48019218", "0.4801699", "0.47975528", "0.4785941", "0.47825143", "0.47787637", "0.47733924", "0.47665715", "0.47660065", "0.47547516", "0.47475213", "0.47458315", "0.4745764", "0.47300476", "0.47253606", "0.47143936", "0.4714355", "0.47119957", "0.47002462", "0.46997842", "0.4696546", "0.46936417", "0.46893993", "0.46836796", "0.46791002", "0.46599475", "0.46523583", "0.46468976", "0.4646307", "0.46438804", "0.4641792", "0.46393225", "0.4635261", "0.46349657", "0.46320984", "0.46309382", "0.46284738", "0.46240515", "0.46173245", "0.46097556", "0.46092665", "0.46082515" ]
0.84953153
0
Method to find CheckBox element for payment terms and condition..
public WebElement paymentTermsAndCond() { return findElement(repositoryParser, PAGE_NAME, "paymentTermsCond"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private WebElement getCheckBoxElementWithoutSearchbyText(String widgetID, String value) {\n/* 53 */ List<WebElement> elementsList = this.webdriver.findElements(By.xpath(\".//*[@id='attribute-tree-\" + widgetID + \"']//span[text() = '\" + value + \"']\"));\n/* 54 */ if (elementsList.size() > 0) {\n/* 55 */ return elementsList.get(0);\n/* */ }\n/* 57 */ return null;\n/* */ }", "CheckBox getCk();", "public void chk_element(WebDriver driver,String[] selObj, String cusObj){\n\t\t\tfor (int K = 0; K < selObj.length; K++) {\r\n\t\t\t\tWebElement elem = cmf.checkBox(cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\tdriver);\r\n\t\t\t\tif (!elem.isDisplayed()){\r\n\t\t\t\t\t((JavascriptExecutor) driver).executeScript(\r\n\t\t\t \"arguments[0].scrollIntoView();\", elem);\r\n\t\t\t\t}\r\n\t\t\t\tif (elem.getAttribute(\"checked\") == null) {\r\n\t\t\t\t\tcmf.clkElement(driver, cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\t\tselObj[K], extent, test);\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\ttest.log(LogStatus.PASS, \"Region\", \"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\tcmf.sleep(500);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"Element \" + EndUser.custom_region_obj + \"'\" + selObj[K]\r\n\t\t\t\t\t\t\t+ \"']\" + \" already checked\");\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t\ttest.log(LogStatus.INFO, \"Region\",\r\n\t\t\t\t\t\t\t\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "public WebElement getCheckbox(String identifier) {\n return findInputElement(\"checkbox\", identifier);\n }", "public void ClickPrivacyPolicycheckbox(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Privacy Policy checkbox should be checked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"rdcheckoutprivacypolicy\"));\r\n\t\t\tSystem.out.println(\"Privacy Policy checkbox is checked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Privacy Policy checkbox is checked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Privacy Policy checkbox is not checked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"rdcheckoutprivacypolicy\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public static WebElement chkbx_selectCompCertificates(String value) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> allChkbx = driver.findElements(By.xpath(\"//*[@id='filter_comCert']/li//input\"));\r\n \t\tList<String> list = new ArrayList <String> (Arrays.asList(value.split(\", \")));\r\n \t\t\r\n \t\tfor(String check : list){\r\n \t\t\tfor(WebElement chk: allChkbx){\r\n \t\t\t\tif(chk.getAttribute(\"value\").equalsIgnoreCase(check))\r\n \t\t\t\t\tchk.click();\r\n \t\t\t}\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Company Certificated checkbox is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public String checkCheckBox(String object, String data) \n\t{\n\t logger.debug(\"Checking checkbox\");\n\t List<WebElement> element_List=null;\n\t try {\n\t\twhile (true) \n\t\t{\n\t\t\t//waitForPageLoad(driver);\n\t\t element_List = explictWaitForElementList(object);\n\n\t\t List<WebElement> next_Link_List = driver.findElements(By.xpath(OR.getProperty(\"pagination_next_link\")));\n\n\t\t if (element_List.size() > 0 )\n\t\t {\n\t\t\tfor(int i=1;i<=element_List.size();i++)\n\t\t\t{\t\t\t\t\t\t\t\t\t\n\t\t\t boolean checked = element_List.get(0).isSelected();\n\n\t\t\t if (!checked) //checkbox is unchecked\n\t\t\t { \t\t\t\t\t\t\t\t\n\t\t\t\tString xpathVal=OR.getProperty(object);\t\t\t\t\t\t\n\n\t\t\t\tif(!xpathVal.contains(Constants.INPUT_C_X))\n\t\t\t\t{\n\n\t\t\t\t if(xpathVal.endsWith(Constants.LABEL_X) || xpathVal.endsWith(Constants.DIV_X) || xpathVal.endsWith(Constants.DIV_CLASS_X) || xpathVal.contains(Constants.LABEL_C_X) ||xpathVal.contains(Constants.DIV_C_X) )\n\t\t\t\t {\n\t\t\t\t\telement_List.get(0).click();\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" clicked on check-box\";\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \t \n\t\t\t\t WebElement ele1 = driver.findElement(By.xpath(OR.getProperty(object)+\"/following-sibling::*\")); // if Xpath is made using input as last nodes.\n\t\t\t\t if(ele1.getTagName().equals(Constants.LABEL))\n\t\t\t\t {\n\t\t\t\t\tJavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\t\t\t\texecutor.executeScript(\"arguments[0].scrollIntoView(true);\", ele1);\n\t\t\t\t\texecutor.executeScript(\"arguments[0].click();\", ele1);\n\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" clicked on check-box\";\n\t\t\t\t } \n\t\t\t\t else \n\t\t\t\t {\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" check-box is already checked\";\n\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\n\t\t }\n\t\t else if (next_Link_List.size() > 0) \n\t\t {\n\t\t\tnext_Link_List.get(0).click();\n\t\t }\n\n\t\t else \n\t\t {\n\t\t\treturn Constants.KEYWORD_FAIL + \" checkbox is not present\";\n\t\t }\n\n\t\t}\n\t }\n\t catch(TimeoutException ex)\n\t {\n\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t }\n\t catch(WebDriverException ex){\n\t\ttry{\n\t\t String exceptionMessage=ex.getMessage();\n\t\t if(exceptionMessage.contains(\"Element is not clickable at point\"))\n\t\t {\n\t\t\tif(new ApplicationSpecificKeywordEventsUtil().clickJs(element_List.get(0)).equals(Constants.KEYWORD_PASS))\n\t\t\t return Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t return Constants.KEYWORD_FAIL+ex.getMessage();\n\t\t }\n\t\t else\n\t\t\treturn Constants.KEYWORD_FAIL+\"not able to Click\";\n\t\t}\n\t\tcatch(Exception e){\n\n\t\t return Constants.KEYWORD_FAIL+e.getMessage();\n\t\t}\n\n\t }\n\n\n\t catch (Exception e) {\n\n\t\treturn Constants.KEYWORD_FAIL + \" - Could not find checkbox\";\n\t }\n\t}", "public static WebElement chkbx_selectSingleVerPdt() throws Exception{\r\n \ttry{\r\n \t\t// Old UI (//*[contains(@class, 'majorPP_check')]//input[@type='checkbox'])[position()=1]\t\r\n \t\t// UI changed on Date 02-Oct-2015\r\n \t\t// New UI (//*[contains(@class, 'wt_pchk')]//input[@type='checkbox'])[position()=1]\r\n \t\t\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'majorPP_check')]//input[@type='checkbox'])[position()=1]\")); \t\t\r\n \t\tAdd_Log.info(\"User select single verified product checkbox.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Verified Product checkbox is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public static WebElement chkbx_select2ndCategory() throws Exception{\r\n\t\ttry{\r\n\t\t\telement = driver.findElement(By.xpath(\"//*[contains(@class, 'PAList')]/ul/li[2]/input\"));\r\n\t\t\tAdd_Log.info(\"Suggested categories chkbx in PA cross promotion is click on the page.\");\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\tAdd_Log.error(\"Suggested categories in PA cross promotion is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n\t}", "public String checkCheckBoxWithoutPagination(String object, String data) {\n logger.debug(\"Checking checkCheckBoxWithoutPagination\");\n WebElement element=null;\n try {\n element = explictWaitForElementUsingFluent(object);\n String xpathVal=element.toString();\n \n boolean checked = element.isSelected();\n\n if (!checked) { // checkbox is unchecked\n \n if(!xpathVal.contains(Constants.INPUT_C_X)){\n \n if(xpathVal.endsWith(Constants.LABEL_X) || xpathVal.endsWith(Constants.DIV_X) || xpathVal.endsWith(Constants.DIV_CLASS_X) || xpathVal.contains(Constants.LABEL_C_X) ||xpathVal.contains(Constants.DIV_C_X) )\n {\n element.click(); // if Xpath is made using label, div as last nodes.\n }\n }\n else{ \n WebElement ele1 = driver.findElement(By.xpath(OR.getProperty(object)+\"/following-sibling::*\")); // if Xpath is made using input as last nodes.\n if(ele1.getTagName().equals(Constants.LABEL)){\n JavascriptExecutor executor = (JavascriptExecutor) driver;\n executor.executeScript(\"arguments[0].scrollIntoView(true);\", ele1);\n executor.executeScript(\"arguments[0].click();\", ele1);\n }\n }\n return Constants.KEYWORD_PASS + \" clicked on check-box\";\n } else {\n return Constants.KEYWORD_PASS + \" check-box is already checked\";\n }\n }\ncatch(TimeoutException ex)\n \n {\n return Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n }\n catch(ElementNotVisibleException ex)\n {\n if(new ApplicationSpecificKeywordEventsUtil().clickJs(element).equals(Constants.KEYWORD_PASS))\n return Constants.KEYWORD_PASS;\n else\n return Constants.KEYWORD_FAIL;\n }\n catch(WebDriverException ex){\n try{\n String exceptionMessage=ex.getMessage();\n if(exceptionMessage.contains(\"Element is not clickable at point\"))\n {\n if(new ApplicationSpecificKeywordEventsUtil().clickJs(element).equals(Constants.KEYWORD_PASS))\n return Constants.KEYWORD_PASS;\n else\n return Constants.KEYWORD_FAIL;\n }\n else\n return Constants.KEYWORD_FAIL+\"not able to Click\"+ex.getMessage();\n }\n catch(Exception e){\n return Constants.KEYWORD_FAIL+e.getMessage();\n }\n \n }\n catch (Exception e) {\n return Constants.KEYWORD_FAIL + \" -- Not able to click on link\" + e.getMessage();\n }\n }", "public String getCheckBoxText() {\r\n\t\tcheckBox = driver.findElement(checkBoxSelector);\r\n\t\treturn checkBox.getText();\r\n\t\t\r\n\t}", "public static WebElement chkbx_selectMultipleVerPdt() throws Exception{\r\n \ttry{\r\n \t\t// UI changed on Date 25-Sep-2015\r\n\t\t//\tdriver.findElement(By.xpath(\"(//*[contains(@class, 'majorPP_check')]//input[@type='checkbox'])[position()=1]\")).click();\r\n\t\t//\tdriver.findElement(By.xpath(\"(//*[contains(@class, 'majorPP_check')]//input[@type='checkbox'])[last()]\")).click();\r\n\t\t\t\r\n\t\t\t// Select all chkbx those are odd number \r\n\t\t\tList<WebElement> chkbx = driver.findElements(\r\n\t\t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\"));\r\n\t\t\tfor(int i=1; i<chkbx.size(); i=i+2){\r\n\t\t\t\tchkbx.get(i).click();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint checkedCount = 0;\r\n\t\t\tfor(int i=0; i<chkbx.size(); i++){\r\n\t\t\t\tif(chkbx.get(i).isSelected()){\r\n\t\t\t\t\tcheckedCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAdd_Log.info(\"Number of selected chkbx ::\" + checkedCount);\r\n\t\t\tAdd_Log.info(\"User select multiple verified product checkboxes.\");\r\n\t\t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Verified Product checkbox are NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Step(\"Select and assert checkboxes\")\n public void selectCheckBox() {\n //http://selenide.org/javadoc/3.5/com/codeborne/selenide/SelenideElement.html\n $(\"label:contains('Water')\").scrollTo();\n $(\"label:contains('Water')\").setSelected(true);\n $(\".label-checkbox:contains('Water') input\").shouldBe(checked);\n logList.add(CHECKBOX1.toString());\n $(\".label-checkbox:contains('Wind')\").scrollTo();\n $(\".label-checkbox:contains('Wind')\").setSelected(true);\n $(\".label-checkbox:contains('Wind') input\").shouldBe(checked);\n logList.add(CHECKBOX2.toString());\n }", "public String checkAllCheckBox(String object, String data) throws InterruptedException {\n\t logger.debug(\"inside 'CheckAllCheckBox' method\");\n\n\t try {\n\n\n\t List<WebElement> all_checkbox = explictWaitForElementList(object);\n\t \n\t if (all_checkbox.size() == 0) {\n\t return Constants.KEYWORD_FAIL + \" no checkbox found\";\n\t }\n\t \n\t for(int i=1;i<=all_checkbox.size();i++)\n\t //for (WebElement checkbox : all_checkbox)\n\t {\n\t \n\t Thread.sleep(2000);\n\t \n\t boolean checked = all_checkbox.get(i-1).isSelected();\n\t if (!checked)\n\t {\n\t String xpathVal=all_checkbox.get(i-1).toString();\n\t if(!xpathVal.contains(Constants.INPUT_NX)){\n\t \n\t if(xpathVal.endsWith(Constants.LABEL_X) || xpathVal.endsWith(Constants.DIV_X) || xpathVal.endsWith(Constants.DIV_CLASS_X) || xpathVal.contains(Constants.LABEL_C_X) || xpathVal.contains(Constants.LABEL_C_X))\n\t { \n\t WebElement ele2 = driver.findElement(By.xpath(\"(\"+OR.getProperty(object)+\")\"+\"[position()=\"+i+\"]\"));\n\t JavascriptExecutor executor = (JavascriptExecutor) driver; // if Xpath is made using label, div as last nodes.\n\t executor.executeScript(\"arguments[0].scrollIntoView(true);\", ele2);\n\n\t executor.executeScript(\"arguments[0].click();\", ele2);\n\t }\n\t }\n\t else{ \n\t WebElement ele1 = driver.findElement(By.xpath(\"(\"+OR.getProperty(object)+\")\"+\"[position()=\"+i+\"]\"+\"/following-sibling::*\")); // if Xpath is made using input as last nodes.\n\t if(ele1.getTagName().equals(Constants.LABEL)){\n\t JavascriptExecutor executor = (JavascriptExecutor) driver;\n\t executor.executeScript(\"arguments[0].scrollIntoView(true);\", ele1);\n\t executor.executeScript(\"arguments[0].click();\", ele1);\n\t } \n\t }\n\t }\n\t \n\t else\n\t continue;\n\t }\n\n\t }\n\t catch(TimeoutException ex)\n\t \n\t {\n\t return Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t }\n\t catch (Exception e) {\n\t \n\t return Constants.KEYWORD_FAIL + e.getMessage();\n\n\t }\n\t return Constants.KEYWORD_PASS + \" checkboxes have been checked\";\n\t }", "public static WebElement chkbx_selectPACatfishBanner_2ndCatChkbx() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='catfishAd']//li[2]/label/input\"));\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void clickOnCheckboxIAgreeRules()\n \t{\n \t\tproductRequirementsPageLocators.clickOnAgreeRulesCheckbox.click();\n\n \t}", "public static WebElement chkbx_selectPdtCertificates(String value) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> allChkbx = driver.findElements(By.xpath(\"//*[@id='filter_prodCert']/li//input\"));\r\n \t\tList<String> list = new ArrayList <String> (Arrays.asList(value.split(\", \")));\r\n \t\t\r\n \t\tfor(String check : list){\r\n \t\t\tfor(WebElement chk: allChkbx){\r\n \t\t\t\tif(chk.getAttribute(\"value\").equalsIgnoreCase(check))\r\n \t\t\t\t\tchk.click();\r\n \t\t\t}\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Product Certificates checkbox is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void ClickonFilterCheckbox(String Text){\r\n\t\tString Data = getValue(Text); \r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Filter checkbox should be clicked\");\r\n\t\ttry{ \r\n\t\t\tclickSpecificElementContains(locator_split(\"chkFilterCheckbox\"), Data);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Filter checkbox is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Filter checkbox is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"chkFilterCheckbox\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public void tickCheckBox() {\r\n\t\tcheckBox = driver.findElement(checkBoxSelector);\r\n\t\tcheckBox.click();\r\n\t\t\r\n\t}", "public String verifyCheckBoxSelected(String object, String data) {\n\t\tlogger.debug(\"inside verifyCheckBoxSelected\");\n\t\ttry {\n\t\t\t//waitForPageLoad(driver);\n\t\t\t\n\t\t\tWebElement ele=explictWaitForElementUsingFluent(object);\n\t\t\t\n\t\t\t\t\t\tboolean checked =ele.isSelected();\n\t\t\t\t\t\tif (checked) {\n\t\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \"--Check box is Selected\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn Constants.KEYWORD_FAIL + \" Check box is Not selected\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t} \n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" - Could not find checkbox\";\n\t\t}\n\n\t}", "public static WebElement chkbx_selectAllVerPdt() throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> chkbxVerPdt = driver.findElements(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\"));\r\n \t\tfor(WebElement chkbx : chkbxVerPdt){\r\n \t\t\tif(!chkbx.isSelected())\r\n \t\t\t\tchkbx.click();\r\n \t\t\t\r\n \t\t}\r\n \t\tAdd_Log.info(\"All Verified Products checkboxes are selected on the page.\");\r\n \t\t\r\n \t/*\tList<WebElement> chkbx1 = driver.findElements(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox' ]\"));\r\n \t\tint chkbxCount = chkbx1.size();\r\n \t\tAdd_Log.info(\"Total chkbx ::\" + chkbxCount);\t*/\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Verified Products checkboxes are NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public static WebElement chkbx_selectBusinessTypes(String dataBusinessTypes) throws Exception{\r\n \ttry{\r\n \t/*\tList<WebElement> allChkbx = driver.findElements(By.xpath(\"//*[@id='filter_busType']/li//input\"));\r\n \t\tList<String> list = new ArrayList <String> (Arrays.asList(value.split(\", \")));\r\n\r\n \t\tfor (String check : list){\r\n \t\t\tfor (WebElement chk : allChkbx){\r\n \t\t\t\tif(chk.getAttribute(\"value\").equalsIgnoreCase(check))\r\n \t\t\t\t\tchk.click();\r\n \t\t\t}\r\n \t\t}\t*/\r\n \t\t\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='filter_busType']/li//input[@value='\"+dataBusinessTypes+\"']\"));\r\n \t\telement.click();\r\n \t\tAdd_Log.info(\"\"+dataBusinessTypes+\" chkbx is selected on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Business Type chkbx is NOT found on the page\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Then(\"^I click on contractw checkbox \\\"([^\\\"]*)\\\"$\")\n\t\tpublic void i_click_on_contractw_checkbox(String objectName) throws Throwable {\n\t\t selenium.click(objectName);\n\t\t \n\t\t}", "public static void checkCheckBox(String objXPath, String objName) throws InterruptedException, IOException{\n\t\tif(driver.findElement(By.xpath(objXPath)).isDisplayed())\n\n\t\t\tif(!(driver.findElement(By.xpath(objXPath)).isSelected())){\n\t\t\t\tdriver.findElement(By.xpath(objXPath)).click();\n\t\t\t\tUpdate_Report( \"Pass\", \"Check box \", objName+\" is checked \");\n\t\t\t}else{\n\t\t\t\tUpdate_Report( \"Pass\", \"Check box \", objName+\" is already checked.\");\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\tUpdate_Report( \"Fail\", \"checkCheckBox \", objName+\" does not exist, please check the application\");\n\n\t\t}\n\n\t}", "public static WebElement chkbx_selectFirstUnvPdt() throws Exception{\r\n \ttry{\r\n \t\t// Locate the first image\r\n \t\tWebElement imgHover = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'supplierPP_img')])[position()=1]\"));\r\n\t\t\t\r\n \t\t// Hover mouse above the image but DONT click\r\n \t\tActions builder = new Actions(driver);\r\n \t\tbuilder.moveToElement(imgHover).build().perform(); \t\t\r\n \t\t\r\n \t\t// Select the checkbox inside the zoomed image\r\n \t\tWebElement inqNowBtn = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'morePP_Pop_img')]//input[@type='checkbox'])[position()=1]\"));\r\n \t\tinqNowBtn.click();\r\n \t\tAdd_Log.info(\"First unverified product checkbox is selected on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"First unverified product checkbox is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void VerifyCheckoutTermsandCondition(String Exptitle){\r\n\t\tString ExpTitle=getValue(Exptitle);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Terms and Condition should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutTermstitle\"), ExpTitle)){\r\n\t\t\t\tSystem.out.println(\"Terms and Condition in Billing is present \"+getText(locator_split(\"txtCheckoutTermstitle\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"Terms and Condition in Billing is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Terms and Condition is present\");\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Terms and Condition in Billing is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutTermstitle\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "CheckboxInfo getCheckboxInfo(int row);", "public void Checkouttaxsubmit(){\t\r\n\t\tString countryspecific_tax = \"Italy,Germany,Sweden,Spain\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Item should be searched in the search box\");\r\n\t\ttry{\r\n\t\t\tif((countryspecific_tax).contains(countries.get(countrycount))){\r\n\t\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\t\twaitforElementVisible(locator_split(\"checkouttaxsubmit\"));\r\n\t\t\t\tclick(locator_split(\"checkouttaxsubmit\"));\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Tax submit button is clicked\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Tax submit button is not applicable to \" +country);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Item is not entered in the search box \"+elementProperties.getProperty(\"checkoutFiscalCode\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutFiscalCode\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Then(\"^I click on contract checkbox \\\"([^\\\"]*)\\\"$\")\n\t\tpublic void i_click_on_contract_checkbox(String objectName) throws Throwable {\n\t\t selenium.click(objectName);\n\t\t \n\t\t}", "public boolean isChecked(final String elementLocator);", "public static WebElement chkbx_selectTradeShow(String value) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> allChkbx = driver.findElements(By.xpath(\"//*[@id='filter_TS']/li//input\"));\r\n \t\tList<String> list = new ArrayList <String> (Arrays.asList(value.split(\", \")));\r\n \t\t\r\n \t\tfor(String check : list){\r\n \t\t\tfor(WebElement chk: allChkbx){\r\n \t\t\t\tif(chk.getAttribute(\"value\").equalsIgnoreCase(check))\r\n \t\t\t\t\tchk.click();\r\n \t\t\t}\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Trade Show checkbox is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test\n public void byTypeTest() throws Exception {\n /* Navigate to the Checkboxes section */\n driver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/ul/li[5]/a\")).click();\n\n /* Using the standard devtools */\n ArrayList<WebElement> checkboxesByTagName = new ArrayList<>();\n checkboxesByTagName.addAll(driver.findElements(By.tagName(\"input\")));\n\n\n /* Using the selenium OIC and the by type locator */\n ArrayList<WebElement> checkboxesByType = new ArrayList<>();\n checkboxesByType.addAll(driver.findElements(By.type(\"checkbox\")));\n\n\n /* Display check list */\n checkboxesByTagName.forEach(c -> System.out.println(\" is checked : \" + c.getAttribute(\"checked\")));\n checkboxesByType.forEach(c -> System.out.println(\" is checked : \" + c.getAttribute(\"checked\")));\n\n /* This test demonstrates the byType locator power :\n * It obviously add another way to locate elements\n * Enhance maintainability of code : What if a username field is added <input type=\"text\"> ? --> the test will be broken !\n * */\n }", "public void selectParticularCheckBox(String labelText){\r\n\t\t\r\n\t\t\t\tif(checkboxLabel.get(0).getText().contains(labelText)){\r\n\t\t\t\t\t\r\n\t\t\t\t\tcheckbox.get(2).click();\r\n\t\t\t\t\tReporter.log(labelText+\" Only selected\",true);\r\n\t\t\t\t}\r\n\t\t\t\telse if(checkboxLabel.get(1).getText().contains(labelText))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckbox.get(0).click();\r\n\t\t\t\t\tcheckbox.get(1).click();\r\n\t\t\t\t\tcheckbox.get(2).click();\r\n\t\t\t\t\tReporter.log(labelText+\" Only selected\",true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t}", "public static WebElement chkbx_selectPassExportCountries(String value) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> allChkbx = driver.findElements(By.xpath(\"//*[@id='filterScrollBox']//li//input\"));\r\n \t\tList<String> list = new ArrayList <String> (Arrays.asList(value.split(\", \")));\r\n \t\t\r\n \t\tfor(String check : list){\r\n \t\t\tfor(WebElement chk : allChkbx){\r\n \t\t\t\tif(chk.getAttribute(\"value\").equalsIgnoreCase(check))\r\n \t\t\t\t\tchk.click();\r\n \t\t\t}\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Past Export Countries checkboxes are NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "private void checkCheckboxes(Order orderToLoad) {\n Map<String, CheckBox> checkBoxes = new TreeMap<>(){{\n put(\"PNEU\",pneuCB);\n put(\"OIL\",oilCB);\n put(\"BATTERY\",batCB);\n put(\"AC\",acCB);\n put(\"WIPER\",wipCB);\n put(\"COMPLETE\",comCB);\n put(\"GEOMETRY\",geoCB);\n }};\n for (String problem : orderToLoad.getProblems()) {\n if (checkBoxes.containsKey(problem)){\n checkBoxes.get(problem).setSelected(true);\n }\n }\n }", "private void IdentifyCBs()\r\n\t{\r\n\t\t// Create new list of the CB\r\n\t\tthis.CBlist = new ArrayList<CheckBox>(18);\r\n\t \r\n\t // Going through all of the linear layout children\t\t\r\n \t\tfor(int count = 0; count < layoutCB.getChildCount(); count ++) \r\n\t {\r\n\t\t // If the tag of the child is linear layout tagged \"tagsvertical\"\r\n\t\t if((layoutCB.getChildAt(count)).getTag().toString().equals(\"tagsvertical\"))\r\n\t\t {\r\n\t\t\t \t// get the vertical linear-layout of the checkboxes\r\n\t\t \t\tLinearLayout layoutCBvertical = ((LinearLayout) layoutCB.getChildAt(count));\r\n\t\t \r\n\t\t\t // getting all of its children\r\n\t\t\t for(int counter = 0; counter < layoutCBvertical.getChildCount(); counter ++) \r\n\t\t\t {\r\n\t\t\t\t if((layoutCBvertical.getChildAt(counter)).getTag().toString().equals(\"cb\"))\r\n\t\t\t\t {\r\n\t\t\t\t\t // Adding the CH to the list\r\n\t\t\t\t\t CBlist.add((CheckBox) layoutCBvertical.getChildAt(counter));\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t \t}\r\n\t }\r\n\t}", "public void clickRegistrationaccounttyperadiobutton(String option){\r\n\r\n\t\tString Acctype = getValue(option);\r\n\t\tString countrygroup_accounttype =\"Spain,France,BernardFrance,BernardBelgium,PresselAustria\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Account type Radio button clicked\");\r\n\t\ttry{\r\n\t\t\tif(!(countrygroup_accounttype).contains(countries.get(countrycount))){\r\n\t\t\t\twaitforElementVisible(locator_split(\"rdbRegistrationAccounttype\"));\r\n\t\t\t\tclickSpecificElementByProperty(locator_split(\"rdbRegistrationAccounttype\"),\"value\",Acctype);\r\n\t\t\t\tSystem.out.println(\"Account type Radio button clicked for \"+Acctype);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Account type Radio button clicked for \"+Acctype);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Account type Radio button is not applicable to \" + country);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Account type Radio button is not clicked \"+elementProperties.getProperty(\"rdbRegistrationAccounttype\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"rdbRegistrationAccounttype\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public Element getElement(String id, String valueType, boolean checkMultipleElements) throws Exception { \r\n \r\n // Try the SOAP Body next \r\n Element bodyElement = SecUtil.findBodyElement(doc); \r\n if (bodyElement != null) { \r\n \r\n String cId = bodyElement.getAttributeNS(SecConstants.WSU_NS, \"Id\"); \r\n if (cId.equals(id)) { \r\n return bodyElement; \r\n } \r\n \r\n } \r\n \r\n // Otherwise do a general search \r\n return SecUtil.findElementById(doc.getDocumentElement(), id, checkMultipleElements); \r\n \r\n }", "@Test\n public void byAttributesAndStylesTest() throws Exception {\n /* Navigate to the Checkboxes section */\n driver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/ul/li[5]/a\")).click();\n\n /* Using the standard devtools */\n WebElement checkedCheckboxByTagName;\n ArrayList<WebElement> checkboxesByTagName = new ArrayList<>();\n checkboxesByTagName.addAll(driver.findElements(By.tagName(\"input\")));\n Iterator<WebElement> it = checkboxesByTagName.iterator();\n while (it.hasNext()){\n checkedCheckboxByTagName = it.next();\n if(checkedCheckboxByTagName.getAttribute(\"checked\") == null){\n checkedCheckboxByTagName = null;\n }\n }\n\n /* Using the selenium OIC and the by attribute locator */\n WebElement checkedCheckboxByAttributes = driver.findElement(By.attribute(\"checked\", \"\"));\n\n /* This test demonstrates the byAttribute locator power :\n * It obviously add another way to locate elements\n * Enhance readability of code\n * Enhance dev-tester efficiency : find directly the item that has the correct attribute VS find all item and then implement a treatment to find the good one\n * */\n }", "public void clickcreditcardradiobutton(){\t\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Item should be searched in the search box\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"creditcardradiobuton\"));\r\n\t\t\tclick(locator_split(\"creditcardradiobuton\"));\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Item is searched in the search box\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Item is not entered in the search box \"+elementProperties.getProperty(\"creditcardradiobuton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"creditcardradiobuton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateCheckboxField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the whether error message is getting displayed when the user doesnot marks Terms and conditions check box \"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.validateCheckboxTermsAndCnds(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}", "public static boolean getAndSetActiveElement_PayAsYouGo_AddProducts(String xpath, List<Param> params) throws NoSuchFieldException, SecurityException, Exception {\n\t\tboolean flag = false;\n\t\ttry {\n\t\t\tactiveElement = null;\n\t\t\tList<WebElement> amountToAddEle = driver.findElements(By.cssSelector(getefareORElement(params.get(0).getValue())));\n\t\t\tWebElement priceEle = null;\n\n\t\t\tSystem.out.println(\"size of Elements in PayAsYouGo\" + amountToAddEle.size());\n\t\t\tfor (int amountToAddIndex = 0; amountToAddIndex < amountToAddEle.size(); amountToAddIndex++) {\n\t\t\t\ttry {\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);\n\t\t\t\t\tpriceEle = amountToAddEle.get(amountToAddIndex).findElement(By.cssSelector(getefareORElement(params.get(1).getValue())));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\tString priceFromUi = priceEle.getText();\n\t\t\t\tSystem.out.println(\"Price Element is:\" + priceFromUi);\n\t\t\t\tif (priceFromUi.equals(params.get(2).getValue())) {\n\t\t\t\t\tSystem.out.println(\"Match is There\");\n\t\t\t\t\tSystem.out.println(\"priceEle.getText():params.get(2).getValue()::\" + priceEle.getText() + \":\" + params.get(2).getValue());\n\n\t\t\t\t\tactiveElement = amountToAddEle.get(amountToAddIndex);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tflag = true;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e);\n\t\t\tSystem.out.println(\"Exception was raised in getAndSetActiveElement_PayAsYouGo_AddProducts method and the exception is :\"+e);\n\t\t\tflag=false;\n\t\t}\n\t\treturn flag;\n\t}", "public void CheckoutRegisterradiobutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration radio button in checkout should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"rdcheckoutregistrationradio\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"Registration radio button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration radio button in checkout is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration radio button in checkout is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"rdcheckoutregistrationradio\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "private JCheckBox getJCBExtra()\n\t{\n\t\tif ( jCBExtra == null )\n\t\t{\n\t\t\tjCBExtra = new JCheckBox(ProVMBD.EnumTipoVM.EXTRA.name());\n\t\t\tjCBExtra.setBounds(new Rectangle(14, 85, 125, 19));\n\t\t}\n\t\treturn jCBExtra;\n\t}", "private ArrayList<String> getCheckboxes() {\n ArrayList<CheckBox> checkBoxes = new ArrayList<>();\n String[] names = {\"PNEU\",\"OIL\",\"BATTERY\",\"AC\",\"WIPER\",\"COMPLETE\",\"GEOMETRY\"}; //LINK NA DB ?\n checkBoxes.addAll(Arrays.asList(pneuCB, oilCB, batCB, acCB, wipCB, comCB, geoCB));\n ArrayList<String> result = new ArrayList<>();\n for (int i = 0; i < checkBoxes.size(); i++) {\n if(checkBoxes.get(i).isSelected()){\n result.add(names[i]);\n }\n }\n return result;\n }", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "private JCheckBox getJCheckBox1() {\r\n\t\tif (jCheckBox1 == null) {\r\n\t\t\tjCheckBox1 = new JCheckBox();\r\n\t\t\tjCheckBox1.setToolTipText(\"This brief description will be added to the biclustering results file\");\r\n\t\t\tjCheckBox1.setBounds(32, 316, 184, 24);\r\n\t\t\tjCheckBox1.setText(\"Add description line\");\r\n\t\t\tjCheckBox1.setEnabled(false);\r\n\t\t}\r\n\t\treturn jCheckBox1;\r\n\t}", "private JCheckBox getCheck() {\r\n\t\tif (check == null)\r\n\t\t\tcheck = new JCheckBox();\r\n\t\treturn check;\r\n\t}", "public final EObject ruleCheckBox() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_checkBox_1_0=null;\n\n enterRule(); \n \n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1884:28: ( (otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) ) ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1885:1: (otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) ) )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1885:1: (otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1885:3: otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) )\n {\n otherlv_0=(Token)match(input,45,FOLLOW_45_in_ruleCheckBox3752); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getCheckBoxAccess().getCheckBoxKeyword_0());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1889:1: ( (lv_checkBox_1_0= RULE_STRING ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1890:1: (lv_checkBox_1_0= RULE_STRING )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1890:1: (lv_checkBox_1_0= RULE_STRING )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1891:3: lv_checkBox_1_0= RULE_STRING\n {\n lv_checkBox_1_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleCheckBox3769); \n\n \t\t\tnewLeafNode(lv_checkBox_1_0, grammarAccess.getCheckBoxAccess().getCheckBoxSTRINGTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getCheckBoxRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"checkBox\",\n \t\tlv_checkBox_1_0, \n \t\t\"STRING\");\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public String unCheckCheckBox(String object, String data) {\n\t\tlogger.debug(\"UnChecking checkbox\");\n\t\tList<WebElement> element_List=null;\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\t // waitForPageLoad(driver);\n\t\t\t\t\telement_List = explictWaitForElementList(object);\n\t\t\t\t\tList<WebElement> next_Link_List = driver.findElements(By.xpath(OR.getProperty(\"pagination_next_link\")));\n\n\t\t\t\tif (element_List.size() > 0 && element_List.get(0).isDisplayed()) {\n\n\t\t\t\t\t\tString checked = element_List.get(0).getAttribute(\"checked\");\n\t\t\t\t\t\tif (checked == null)\n\t\t\t\t\t\t{ // checkbox is unchecked\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" check-box is already unchecked\";\n\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse {\n\t\t\t\t\t\telement_List.get(0).click();\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" unchecked check-box\";\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse if (next_Link_List.size() > 0) {\n\t\t\t\t\tnext_Link_List.get(0).click();\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\treturn Constants.KEYWORD_FAIL + \" checkbox is not present\";\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch(WebDriverException ex){\n\t\t\ttry{\n\t\t\t\tString exceptionMessage=ex.getMessage();\n\t\t\t\t\tif(exceptionMessage.contains(\"Element is not clickable at point\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(new ApplicationSpecificKeywordEventsUtil().clickJs(element_List.get(0)).equals(Constants.KEYWORD_PASS))\n\t\t\t\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn Constants.KEYWORD_FAIL;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t\treturn Constants.KEYWORD_FAIL+\"not able to Click\"+ex.getMessage();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\treturn Constants.KEYWORD_FAIL+e.getMessage();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" - Could not find checkbox\";\n\t\t}\n\n\t}", "private boolean[] getCheckBoxes() {\n\t\tHBox n4 = (HBox) uicontrols.getChildren().get(4);\n\t\tCheckBox b1 = (CheckBox) n4.getChildren().get(0);\n\t\tCheckBox b2 = (CheckBox) n4.getChildren().get(1);\n\t\tCheckBox b3 = (CheckBox) n4.getChildren().get(2);\n\t\tCheckBox b4 = (CheckBox) n4.getChildren().get(3);\n\t\tboolean[] boxes = { b1.isSelected(),b2.isSelected(),b3.isSelected(),b4.isSelected()};\n\t\treturn boxes;\n\t}", "public String unCheckCheckBoxWithoutPagination(String object, String data) {\n logger.debug(\"UnChecking unCheckCheckBoxWithoutPagination\");\n WebElement element=null;\n try {\n\n element = explictWaitForElementUsingFluent(object);\n String xpathVal=element.toString();\n \n boolean checked = element.isSelected();\n \n if (!checked)// checkbox is unchecked\n {\n return Constants.KEYWORD_PASS + \" check-box is already unchecked\";\n\n } else {\n \t\n \tif(!xpathVal.contains(Constants.INPUT_C_X)){\n \t\t\n \t\tif(xpathVal.contains(Constants.TYPE_CB))\n \t\t{\n \t\t\tnew ApplicationSpecificKeywordEventsUtil().clickJs(element);\n \t\t\treturn Constants.KEYWORD_PASS + \" uncheck check-box\";\n \t\t}\n \t\t\n \t\tif(xpathVal.endsWith(Constants.LABEL_X) || xpathVal.endsWith(Constants.DIV_X) || xpathVal.endsWith(Constants.DIV_CLASS_X) || xpathVal.contains(Constants.LABEL_C_X) ||xpathVal.contains(Constants.DIV_C_X) )\n\t \t{\n \t\telement.click();\t// if Xpath is made using label, div as last nodes.\n\t \t}\n \t}\t\n \telse{ \n \t\t \t\n \t\tWebElement ele1 = driver.findElement(By.xpath(OR.getProperty(object)+\"/following-sibling::*\")); // if Xpath is made using input as last nodes.\n \t\tif(ele1.getTagName().equals(Constants.LABEL)){\n JavascriptExecutor executor = (JavascriptExecutor) driver;\n executor.executeScript(\"arguments[0].scrollIntoView(true);\", ele1);\n executor.executeScript(\"arguments[0].click();\", ele1);\n } \t}\n return Constants.KEYWORD_PASS + \" unchecked check-box\";\n }\n }\ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n catch(ElementNotVisibleException ex)\n {\n \tif(new ApplicationSpecificKeywordEventsUtil().clickJs(element).equals(Constants.KEYWORD_PASS))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL;\n }\n catch(WebDriverException ex){\n\t\t\ttry{\n\t\t\t\tString exceptionMessage=ex.getMessage();\n\t\t\t\t\tif(exceptionMessage.contains(\"Element is not clickable at point\"))\n\t\t\t\t\t{\n\t\t\t\tif(new ApplicationSpecificKeywordEventsUtil().clickJs(element).equals(Constants.KEYWORD_PASS))\n\t\t\t\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t\t\telse\n\t\t\t\t\t\t\treturn Constants.KEYWORD_FAIL;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t\treturn Constants.KEYWORD_FAIL+\"not able to Click\"+ex.getMessage();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\treturn Constants.KEYWORD_FAIL+e.getMessage();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Not able to click on link\" + e.getMessage();\n\t\t}\n\n }", "private JCheckBox getJCheckBox2() {\r\n\t\tif (jCheckBox2 == null) {\r\n\t\t\tjCheckBox2 = new JCheckBox();\r\n\t\t\tjCheckBox2.setBounds(31, 28, 187, 21);\r\n\t\t\tjCheckBox2.setText(\"Discretize by quantiles\");\r\n\t\t}\r\n\t\treturn jCheckBox2;\r\n\t}", "public Boolean getCheckBox() {\n return (Boolean) getAttributeInternal(CHECKBOX);\n }", "private CheckBox getCheckbox_recommended() {\n\t\treturn checkbox_recommended;\n\t}", "public void selectCheckBox(By locator,String option){\n\n\t\tWebElement element = findElementClickable(locator);\n try {\n\n if(option.equalsIgnoreCase(\"ON\")) {\n if (!element.isSelected()) {\n element.click();\n }\n }\n else if(option.equalsIgnoreCase(\"OFF\"))\n {\n if(element.isSelected())\n {\n element.click();\n }\n }\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"Exception \"+ e +\" thrown while setting the checkbox \"+option+\" using locator \"+locator);\n\n\t\t\t}\n }", "public static void main(String[] args) {\n\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\\\\\selenium3\\\\\\\\chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://www.leafground.com/pages/checkbox.html\");\r\n\r\n\t\tWebElement java = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[1]/div[1]/input\"));\r\n\t\tjava.click();\r\n\t\t// verifiying the selected one \r\n\t\tWebElement seleniumButton = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[2]/div/input\"));\r\n\r\n\t\tboolean seleniumSelected = seleniumButton.isSelected();\r\n\r\n\t\tSystem.out.println(seleniumSelected);\r\n\r\n\t\t// de select the selected one\r\n\t\tWebElement firstelement = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[3]/div[1]/input\"));\r\n\r\n\t\tif(firstelement.isSelected())\r\n\t\t{\r\n\t\t\tfirstelement.click();\r\n\t\t}\r\n\r\n\t\tWebElement secoundElement = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[3]/div[2]/input\"));\r\n\r\n\t\tif(secoundElement.isSelected())\r\n\t\t{\r\n\t\t\tsecoundElement.click();\r\n\t\t}\r\n\r\n\t}", "public static WebElement chkbx_selectUpcomingTradeShow(String value) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> allChkbx = driver.findElements(By.xpath(\"//*[@id='tradeShow_overlay']/ul/li//input\"));\r\n \t\tList<String> list = new ArrayList <String> (Arrays.asList(value.split(\", \")));\r\n \t\t\r\n \t\tfor(String check : list){\r\n \t\t\tfor(WebElement chk : allChkbx){\r\n \t\t\t\tif(chk.getAttribute(\"value\").equalsIgnoreCase(check))\r\n \t\t\t\t\tchk.click();\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tdriver.findElement(By.xpath(\"//*[@id='tradeShow_overlay']//a[contains(text(),'Confirm')]\")).click();\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public int searchProduct1() throws IOException {\n\t\tString option = CommonUtil.getPropertyValue(\"reg\", \"option1\");\n\t\tWebDriverWait ww = new WebDriverWait(driver, 50);\n\t\tList<WebElement> isChecked = ww.until(ExpectedConditions.presenceOfAllElementsLocatedBy(\n\t\t\t\tBy.xpath(\"//p[@class='product-title ' and contains(@title,'\" + option + \"')]\")));\n\t\t// WebElement ele=driver.findElement(By.xpath(\"//p[@class='product-title ' and\n\t\t// contains(@title,'\"+option+\"')]\"));\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tSystem.out.println(isChecked.get(i).getText());\n\t\t}\n\t\tString option1 = CommonUtil.getPropertyValue(\"reg\", \"option2\");\n\t\tWebDriverWait ww1 = new WebDriverWait(driver, 50);\n\t\tList<WebElement> isChecked1 = ww1.until(ExpectedConditions.presenceOfAllElementsLocatedBy(\n\t\t\t\tBy.xpath(\"//p[@class='product-title ' and contains(@title,'\" + option1 + \"')]\")));\n\t\tint totalEle = isChecked.size() + isChecked1.size();\n\t\tSystem.out.println(\"No of products releted to search \" + option + \" in that page is: \" + totalEle);\n\t\treturn totalEle;\n\n\t}", "public void checkTos1()\n\t{\n\t\tdriver.findElement(_tosCheckbox1).click();\n\t\tlog.info(\"Clicked TOS\");\n\t}", "private JCheckBox getEndCapCheckBox() {\n\t\tif (endCapCheckBox == null) {\n\t\t\tendCapCheckBox = new JCheckBox();\n\t\t\tendCapCheckBox.setBounds(new java.awt.Rectangle(209, 69, 235, 21));\n\t\t\tendCapCheckBox.setText(PluginServices.getText(this,\n\t\t\t\t\t\"No_usar_buffer_redondeado\"));\n\t\t}\n\t\treturn endCapCheckBox;\n\t}", "public static WebElement chkbx_selectAllPACatfishBanner() throws Exception{\r\n \ttry{\r\n\t\t\t// Select all chkbx except the 1st \r\n\t\t\tList<WebElement> chkbx = driver.findElements(\r\n\t\t\t\t\tBy.xpath(\"//*[contains(@class, 'catfishPAList')]//input\"));\r\n\t\t\tfor(int i=1; i<chkbx.size(); i++){\r\n\t\t\t\tchkbx.get(i).click();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint checkedCount = 0;\r\n\t\t\tfor(int i=0; i<chkbx.size(); i++){\r\n\t\t\t\tif(chkbx.get(i).isSelected()){\r\n\t\t\t\t\tcheckedCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAdd_Log.info(\"Number of selected chkbx ::\" + checkedCount);\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public VirtualCheckBox createCheckBox ();", "private JCheckBox getJCheckBox() {\r\n\t\tif (jCheckBox == null) {\r\n\t\t\tjCheckBox = new JCheckBox();\r\n\t\t\tjCheckBox.setBounds(new Rectangle(240, 295, 19, 17));\r\n\t\t}\r\n\t\treturn jCheckBox;\r\n\t}", "public static JBCheckBoxFixture findByPartOfText(@NotNull String partOfText, Container root, @NotNull Robot robot, boolean waitUntilFound) {\n\n GenericTypeMatcher<JBCheckBox> matcher = new GenericTypeMatcher<>(JBCheckBox.class) {\n @Override\n protected boolean isMatching(@NotNull JBCheckBox box) {\n return (box.getText() != null && StringUtil.toLowerCase(box.getText()).contains(StringUtil.toLowerCase(partOfText)));\n }\n };\n\n return findWithGenericTypeMatcher(matcher, root, robot, waitUntilFound);\n }", "public void check () {\n // declaring local variables\n WebElement webElement;\n\n if (isStubbed()) {\n log(\"=== This checkbox's locator is currently stubbed out. ===\");\n } else {\n // getting the web element of the check box with the default timeout\n // and then check its status\n\n int MAXRETRIES = 3;\n int tries = 1;\n while (!this.isChecked() && tries <= MAXRETRIES) {\n // need to give a second for the browser to catch up with the web driver\n //sleep(1, TimeUnit.SECONDS);\n\n // Directly get the web element since we know that it exists and is displayed\n webElement = getWebElement ();\n this.clickWebElement (webElement);\n\n\n\n\n tries++;\n if (this.isChecked() == false)\n {\n sleep(1, TimeUnit.SECONDS);\n }\n }\n }\n }", "public void Taxidentificaiton(String itemnum){\t\r\n\t\tString searchitem = getValue(itemnum);\r\n\t\tString countryspecific_tax = \"Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+searchitem);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Taxidentificaiton should be entered in the Tax field\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\tif((countryspecific_tax).contains(countries.get(countrycount))){\r\n\t\t\t\tThread.sleep(3000);\r\n\t\t\t\twaitforElementVisible(locator_split(\"Checkouttax\"));\r\n\t\t\t\tclearWebEdit(locator_split(\"Checkouttax\"));\r\n\t\t\t\tsendKeys(locator_split(\"Checkouttax\"), searchitem);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Item is searched in the search box\");}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Taxidentificaiton is not applicable for this country\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Item is not entered in the search box \"+elementProperties.getProperty(\"Tax\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"Tax\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test\n\tpublic void TC_01_Web_Element() {\n\t\tdriver.findElement(By.id(\"\")); //**\n\t\t\n\t\t//Tim nhieu element\n\t\tdriver.findElements(By.id(\"\"));//**\n\t\t\n\t\t//If chi thao tac vs element 1 lan thi ko can khai bao bien\n\t\tdriver.findElement(By.id(\"small-searchterms\")).sendKeys(\"Apple\");//**\n\t\t\n\t\t//If can thao tac element nhieu lan thi nen khai bao bien\n\t\tWebElement searchTextbox = driver.findElement(By.id(\"small-searchterms\"));\n\t\tsearchTextbox.clear();//**\n\t\tsearchTextbox.sendKeys(\"Apple\");\n\t\tsearchTextbox.getAttribute(\"value\");//**\n\t\t\n\t\t//driver.findElement(By.id(\"small-searchterms\")).clear();\n\t\t//driver.findElement(By.id(\"small-searchterms\")).sendKeys(\"Apple\");\n\t\t//driver.findElement(By.id(\"small-searchterms\")).getAttribute(\"value\");\n\t\t\n\t\t//Count co bao nhieu element thoa dieu kien\n\t\t//Verify so luong element tra ve nhu mong doi\n\t\t//Thao tac vs all cac loai element giong nhau trong 1 page (checkbox/textbox)\n\t\tList<WebElement> checkboxes = driver.findElements(By.xpath(\"//div[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\t\n\t\t//Lay ra so luong\n\t\tAssert.assertEquals(checkboxes.size(), 6);\n\t\t\n\t\tWebElement singleElement = driver.findElement(By.className(\"\"));\n\t\t\n\t\t//Textbox TextArea/ Edittable dropdown\n\t\t//Du lieu duoc toan ven\n\t\tsearchTextbox.clear();\n\t\tsearchTextbox.sendKeys(\"\");\n\t\t\n\t\t//Button/Link/radio/checkbox/custom dropdown/..\n\t\tsingleElement.click();//**\n\t\t\n\t\t//Cac ham co tien to bat dau bang get lun lun tra ve du lieu \n\t\t//getTitle/ getCurrentUrl/ getPageSource/ getAttribute/ getCssValue/ getText/ get...\n\t\tsingleElement = driver.findElement(By.xpath(\"//input[@id='Firstname']\"));\n\t\tsingleElement.getAttribute(\"\");\n\t\t\n\t\t//Automation\n\t\tsingleElement = driver.findElement(By.xpath(\"//input[@id='small-searchterms']\"));\n\t\tsingleElement.getAttribute(\"placeholder\");\n\t\t//Search store\n\t\t\n\t\t//Lay ra gia tri cua cac thuoc tinh css thuong dung de test GUI\n\t\t//Font/Size/Color/Background/...\n\t\tsingleElement = driver.findElement(By.cssSelector(\"search-box-button\"));\n\t\tsingleElement.getCssValue(\"background-color\");//*\n\t\t//#4ab2f1\n\t\tsingleElement.getCssValue(\"text-transform\");\n\t\t//uppercase\n\t\t\n\t\t//Lay ra toa do element so voi page hien tai (get gox ben ngoai)\n\t\tsingleElement.getLocation();\n\t\t\n\t\t//lay ra kich thuoc cua element (rong x cao) -> get goc ben trong element\n\t\tsingleElement.getSize();\n\t\t\n\t\t//Location + size\n\t\tsingleElement.getRect();\n\t\t\n\t\t//Chup hinh loi => dua vao html export\n\t\tsingleElement.getScreenshotAs(OutputType.FILE);//*\n\t\t\n\t\t\n\t\t//id/class/css/name...//tu 1 element ko bik tagname -> lay ra duoc tagname truyen vao cho 1 locator khac\n\t\tsingleElement = driver.findElement(By.xpath(\"//div[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\tString searchButtonTagname = singleElement.getTagName();//*\n\t\t\n\t\tsearchTextbox = driver.findElement(By.xpath(\"//\" + searchButtonTagname + \"[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\t//input\n\t\t\n\t\t//xpath\n\t\t//tagname[@attribute='value']\n\t\t\n\t\t\n\t\t//lay ra text element (header/link/message/...)\n\t\tsingleElement.getText();//**\n\t\t\n\t\t//Cac ham co tien to la isXXX thi tra ve kieu Boolean (100%)\n\t\t//true/false\n\t\t\n\t\t//kiem tra xem 1 element la hien thi cho nguoi dung thao tac hay ko\n\t\t//true: dang hien thi\n\t\t//false: ko hien thi\n\t\tsingleElement.isDisplayed();//**\n\t\t\n\t\t//kiem tra xem 1 element la disable hay ko\n\t\t//disable: user ko thao tac duoc\n\t\t//true: ko thao tac duoc\n\t\t//false: co the thao tac\n\t\tsingleElement.isEnabled();//*\n\t\t\n\t\t//kiem tra xem 1 element da duoc chon roi hay chua\n\t\t//checkbox/ radio/ dropdown\n\t\t//true: da chon roi\n\t\t//false: chua duoc chon\n\t\tsingleElement.isSelected();//*\n\t\t\n\t\t//no thay cho hanh vi ENTER vao textbox/button\n\t\t//chi dung duoc trong form (Login/search/register/...)\n\t\tsingleElement.submit();\n\t\t\n\t\tsingleElement = driver.findElement(By.id(\"small-searchterms\"));\n\t\tsingleElement.sendKeys(\"Apple\");\n\t\tsingleElement.submit();\n\t\t\n\t\t\n\t\t\n\t}", "public void clickCreditCardradio(){\t\t\r\n\t\tString countrygroup_cc = \"PresselAustria\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The CreditCard radio button should be clicked\");\r\n\t\ttry{\r\n\t\t\tif(!(countrygroup_cc).contains(countries.get(countrycount))){\r\n\t\t\t\tclick(locator_split(\"rdcreditcardradiobuton\"));\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The CreditCard radio button is clicked\");\r\n\t\t\t}else{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The CreditCard radio button is not clicked\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- The CreditCard radio button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"rdcreditcardradiobuton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@When(\"I click on checkboxradio\")\n public void i_click_on_checkboxradio() {\n System.out.println(\"checkbox\");\n }", "public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}", "public synchronized WebElement pdp_btn_checkout() throws Exception {\n\n\t\tif (Utils.device.equals(\"mobile\"))\n\t\t\treturn utils.findElementByLocator(driver, \"PDP_btn_FlyoutViewBag\", \"| PDP:Checkout button not present\");\n\n\t\telse if (!Utils.brand.equals(\"LGFP\")) {\n\t\t\tutils.isElementPresent(driver, \"PDP_btn_FlyoutCheckout\");\n\t\t\treturn utils.findElementByLocator(driver, \"PDP_btn_FlyoutCheckout\", \"| PDP:Checkout button not present\");\n\t\t}\n\n\t\telse\n\t\t\treturn utils.findElementByLocator(driver, \"PDP_btn_FlyoutCheckout_LG\", \"| PDP:Checkout button not present\");\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C://Users//NikilaPC//Downloads//geckodriver-v0.24.0-win64//geckodriver.exe\");\t\n\n\t\tWebDriver driver = new FirefoxDriver();\n\t\t\n//\t\tdriver.manage().timeouts().implicitlyWait(3000, TimeUnit.MILLISECONDS);\n//\t\tdriver.navigate().to(\"https://www.calculator.net/mortgage-payoff-calculator.html\");\n//\t\tdriver.manage().window().maximize();\n//\t\tdriver.findElement(By.id(\"cpayoff1\")).click();\n//\t\t\n//\t\tSystem.out.println(\"The output of isSlelected is : \"+driver.findElement(By.id(\"cpayoff1\")).isSelected());\n//\t\t\n//\t\tSystem.out.println(\"The output of isEnabled is : \"+driver.findElement(By.id(\"cpayoff1\")).isEnabled());\n//\n//\t\tSystem.out.println(\"The output of isDisplayed is : \"+driver.findElement(By.id(\"cpayoff1\")).isDisplayed());\n//\n//\t\t\n//\t\tdriver.close();\n\n\t\t\n\t\t//**********for checkbox***********\n\t\tdriver.navigate().to(\"https://www.calculator.net/mortgage-calculator.html\");\n\t\t\t\t\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.findElement(By.id(\"caddoptional\")).click();\n\t\tSystem.out.println(\"The result is:\" +driver.findElement(By.id(\"caddoptional\")).isEnabled());\n\t\tSystem.out.println(\"the result of isSelected :\"+driver.findElement(By.id(\"caddoptional\")).isSelected());\n\t\tdriver.close();\n\t\t\n\t}", "org.apache.xmlbeans.XmlBoolean xgetBox();", "WebElement getOrganizationField();", "public void setStateToCheckbox (String xpath, CheckBoxState checkBoxState) {\r\n WebElement element = webDriver.findElement(By.xpath(xpath));\r\n boolean selected = element.isSelected();\r\n\r\n if (selected && checkBoxState == CheckBoxState.CHECKED){\r\n logger.info(\"Element is checked\");\r\n }else if (selected && checkBoxState == CheckBoxState.UNCHECKED){\r\n clickOnWebElement(element);\r\n }else if (!selected && checkBoxState == CheckBoxState.CHECKED){\r\n clickOnWebElement(element);\r\n }else if (!selected && checkBoxState == CheckBoxState.UNCHECKED){\r\n logger.info(\"Element is unchecked\");\r\n }\r\n }", "public static WebElement chkbx_selectQuickFilters(String value) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> allChkbx = driver.findElements(By.xpath(\"//*[contains(@class, 'qFilter_item')]//input\"));\r\n \t\tList<String> list = new ArrayList <String> (Arrays.asList(value.split(\", \")));\r\n \t\t\r\n \t\tfor(String check : list){\r\n \t\t\tfor(WebElement chk : allChkbx){\r\n \t\t\t\tif(chk.getAttribute(\"value\").equalsIgnoreCase(check))\r\n \t\t\t\t\tchk.click();\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public String verifyCheckBoxIsNotSelected(String object, String data) {\n\t\tlogger.debug(\"Verifying checkbox is not selected\");\n\t\ttry {\n\t\t\t//waitForPageLoad(driver);\n\t\t\tWebElement ele=explictWaitForElementUsingFluent(object);\n\t\t\t\n\t\t\tboolean checked =ele.isSelected();\n\t\t\tif (checked) {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"--Check box is Selected\";\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_PASS + \" Check box is Not selected\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" - Could not find checkbox\";\n\n\t\t}\n\t}", "public InboxPage verifyUiElements(boolean checkChangedDob) {\n\t\tList<WebElement> ele = driver.findElements(By.tagName(\"a\"));\n\t\tfor (WebElement webElement : ele) {\n\t\t\tSystem.out.println(webElement.getText());\n\t\t}\n\n\t\t// Get the xpath of the firstName\n\t\tList<WebElement> ele1 = driver.findElements(By.xpath(\"//section[1]\"));\n\t\tfor (WebElement webElement : ele1) {\n\t\t\tList<WebElement> pTagElements = webElement.findElements(By\n\t\t\t\t\t.tagName(\"p\"));\n\t\t\tfor (int i = 0; i < pTagElements.size(); i++) {\n\t\t\t\tList<WebElement> spanElements = pTagElements.get(i)\n\t\t\t\t\t\t.findElements(By.tagName(\"span\"));\n\t\t\t\tfor (int j = 0; j < spanElements.size(); j++) {\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.ABOUTMEFIRSTNAME)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.ABOUTMENAMEVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.ABOUTMELASTNAME)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.ABOUTMELASTVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText().equals(Constant.LANGUAGE)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.LANGUAGEVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.COUNTRYREGION)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.COUNTRYVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText().equals(Constant.DOB)) {\n\t\t\t\t\t\tif (checkChangedDob) {\n\t\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t\t.equals(Constant.DOBCHANGEDVALUE));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t\t.equals(Constant.DOBVALUE));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}", "public void tickCheckBoxByID(String elementID) throws Exception {\r\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(elementID)));\r\n if(!element.isSelected()){\r\n element.click();\r\n }\r\n }", "public void TermsAndConditionsclickAllCheckBoxes(String tagname, String attribute, String text) {\r\n\t\tList<WebElement> list = driver.findElements(By.tagName(tagname));\r\n\t\tint size = list.size();\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tlist.get(i).getText();\r\n\t\t}\r\n\t\tfor (WebElement webElement : list) {\r\n\t\t\tif (webElement.getAttribute(attribute).equals(text)) {\r\n\t\t\t\tbase.jSClick(webElement);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "PaymentTermsType getPaymentTerms();", "public static WebElement chkbx_selectLastUnvPdt() throws Exception{\r\n \ttry{\r\n \t\t// Locate the last image\r\n \t\tWebElement imgHoverLast = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'supplierPP_img')])[last()]\"));\r\n\t\t\t\r\n \t\t// Hover mouse above the image but DONT click\r\n \t\tActions builderLast = new Actions(driver);\r\n \t\tbuilderLast.moveToElement(imgHoverLast).build().perform();\r\n \t\r\n \t\t// Select the checkbox inside the zoomed image\r\n \t\tWebElement inqNowBtnLast = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'morePP_Pop_img')]//input[@type='checkbox'])[last()]\"));\r\n \t\tinqNowBtnLast.click(); \r\n \t\tAdd_Log.info(\"Last unverified product checkbox is selected on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Last unverified product checkbox is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public static boolean checkbox_DOM(WebElement element, String sLog, boolean bCheck, String sJavaScript,\n\t\t\tboolean bException)\n\t{\n\t\tWebDriver useDriver = Framework.getWebDriver(element);\n\t\tif (useDriver == null)\n\t\t\tLogs.logError(\"Could not get WebDriver from WebElement ('\" + sLog + \"')\");\n\n\t\tboolean bEnabled = Framework.isElementEnabled(element);\n\t\tif (!bEnabled)\n\t\t{\n\t\t\tString sError = \"Check box for '\" + sLog + \"' was not enabled\";\n\t\t\tLogs.logError(new CheckBoxNotEnabled(sError));\n\t\t}\n\n\t\t// Check box\n\t\tboolean bCurrentStateSelected = Framework.isElementSelected(element);\n\t\tboolean bOnChangeTrigger = false;\n\t\tif (bCheck)\n\t\t{\n\t\t\tif (bCurrentStateSelected)\n\t\t\t{\n\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already selected\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFramework.check(element, sLog, false);\n\t\t\t\tbOnChangeTrigger = true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (bCurrentStateSelected)\n\t\t\t{\n\t\t\t\tFramework.uncheck(element, sLog, false);\n\t\t\t\tbOnChangeTrigger = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already unselected\");\n\t\t\t}\n\t\t}\n\n\t\t// Will AJAX be triggered?\n\t\tif (bOnChangeTrigger)\n\t\t{\n\t\t\t// Add Node to DOM\n\t\t\tif (!JS_Util.execute(useDriver, sJavaScript, false))\n\t\t\t{\n\t\t\t\tString sError = \"Could not add node to DOM using the following Javascript: \" + sJavaScript;\n\t\t\t\tLogs.logError(new JavaScriptException(sError));\n\t\t\t}\n\n\t\t\t// TAB away from the element to generate AJAX call\n\t\t\ttry\n\t\t\t{\n\t\t\t\telement.sendKeys(Keys.TAB);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogs.logError(\"Tabbing off element ('\" + sLog + \"') generated the following exception: \"\n\t\t\t\t\t\t+ ex.getMessage());\n\t\t\t}\n\n\t\t\t// Wait for the node to be removed from the DOM which indicates that the AJAX is complete\n\t\t\tboolean bCompleteBeforeTimeout = wasNodeRemovedFromDOM(useDriver, sTempUniqueNode);\n\t\t\tif (bCompleteBeforeTimeout)\n\t\t\t{\n\t\t\t\t// AJAX completed successfully before timeout\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Attempts manual removal (logs error but does not throw an exception)\n\t\t\t\tremoveNodeFromDOM(useDriver, sTempUniqueNode);\n\n\t\t\t\t// AJAX did not complete before timeout & user wants an exception thrown\n\t\t\t\tif (bException)\n\t\t\t\t{\n\t\t\t\t\tString sError = \"AJAX did not complete before timeout occurred.\";\n\t\t\t\t\tLogs.logError(new GenericActionNotCompleteException(sError));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// AJAX did not complete before timeout (and user did not want an exception thrown)\n\t\t\tLogs.log.warn(\"AJAX did not complete before timeout occurred\");\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public void select() {\n checkboxElement.click();\n }", "public static void checkbox_DOM(WebDriver driver, String sLocator, String sLog, String sJavaScript,\n\t\t\tCheckBox checkbox)\n\t{\n\t\t// Is check box enable/selected?\n\t\tWebElement element = Framework.findElementAJAX(driver, sLocator);\n\t\tboolean bEnabled = Framework.isElementEnabled(element);\n\t\tboolean bChecked = Framework.isElementSelected(element);\n\n\t\t// Does user want to skip taking action?\n\t\tif (checkbox.skip)\n\t\t{\n\t\t\tString sMessage = \"Check box for '\" + sLog + \"' was skipped. The check box was \";\n\t\t\tif (bEnabled)\n\t\t\t\tsMessage += \"enabled\";\n\t\t\telse\n\t\t\t\tsMessage += \"disabled\";\n\n\t\t\tif (bChecked)\n\t\t\t\tsMessage += \" and selected\";\n\t\t\telse\n\t\t\t\tsMessage += \" and not selected\";\n\n\t\t\tLogs.log.info(sMessage);\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcheckbox_DOM(driver, sLocator, sLog, checkbox.check, sJavaScript);\n\t\t}\n\t}", "public static boolean isCheckboxChecked(WebElement element) {\n\t\tboolean isChecked = false;\n\t\ttry {\n\t\t\tlogger.info(\"getting class of received element \"\n\t\t\t\t\t+ element.getAttribute(\"class\"));\n\t\t\tif (element.getAttribute(\"class\").contains(\"selected\")) {\n\t\t\t\tlogger.info(\"check box is checked\");\n\t\t\t\tisChecked = true;\n\t\t\t} else {\n\t\t\t\tisChecked = false;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Some exception ocurred while finding if Region Checkbox is checked or not \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\treturn isChecked;\n\t}", "public void verifyCheckboxesAndInputsAreWorking(){\r\n driver.switchTo().defaultContent();\r\n //clicking random checkboxes\r\n WebElement checkbox1 = driver.findElement(By.xpath(randomCheckboxOneXpathLocator));\r\n ((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", checkbox1);\r\n checkbox1.click();\r\n\r\n WebElement checkbox2 = driver.findElement(By.xpath(randomCheckboxTwoXpathLocator));\r\n ((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", checkbox2);\r\n checkbox2.click();\r\n driver.findElement(By.xpath(randomInputAreaXpathLocator)).sendKeys(\"This is a test message.\");\r\n }", "public Iterator getCheckboxes() {\r\n return childrenCheckboxes.iterator();\r\n }", "private JCheckBox getJCheckBox() {\r\n\t\tif (jCheckBox == null) {\r\n\t\t\tjCheckBox = new JCheckBox();\r\n\t\t\tjCheckBox.setBounds(new Rectangle(15, 291, 107, 21));\r\n\t\t\tjCheckBox.setText(\"Write to file\");\r\n\t\t\tjCheckBox.setToolTipText(\"If checked, biclustering results will be stored in the selected path\");\r\n\t\t\tjCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {\r\n\t\t\t\tpublic void stateChanged(javax.swing.event.ChangeEvent e) {\r\n\t\t\t\t\tif(jCheckBox.isSelected())\t\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tBufferedReader pathReader=new BufferedReader(new FileReader(\"es/usal/bicoverlapper/data/groupsPath.txt\"));\r\n\t\t\t\t\t\t\tdefaultPath=pathReader.readLine();\r\n\t\t\t\t\t\t\t}catch(IOException ex){System.err.println(\"pathReader has no information\"); defaultPath=\"\";}\r\n\t\t\t\t\t\tjCheckBox1.setEnabled(true);\r\n\t\t\t\t\t\tjButton.setEnabled(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tdefaultPath=\"\";\r\n\t\t\t\t\t\tjButton.setEnabled(false);\r\n\t\t\t\t\t\tjCheckBox1.setEnabled(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jCheckBox;\r\n\t}", "public static void checkbox_DOM(WebElement element, String sLog, String sJavaScript, CheckBox checkbox)\n\t{\n\t\t// Is check box enable/selected?\n\t\tboolean bEnabled = Framework.isElementEnabled(element);\n\t\tboolean bChecked = Framework.isElementSelected(element);\n\n\t\t// Does user want to skip taking action?\n\t\tif (checkbox.skip)\n\t\t{\n\t\t\tString sMessage = \"Check box for '\" + sLog + \"' was skipped. The check box was \";\n\t\t\tif (bEnabled)\n\t\t\t\tsMessage += \"enabled\";\n\t\t\telse\n\t\t\t\tsMessage += \"disabled\";\n\n\t\t\tif (bChecked)\n\t\t\t\tsMessage += \" and selected\";\n\t\t\telse\n\t\t\t\tsMessage += \" and not selected\";\n\n\t\t\tLogs.log.info(sMessage);\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Do we need to take action based on current state?\n\t\t\tboolean bTakeAction = false;\n\t\t\tif (checkbox.check)\n\t\t\t{\n\t\t\t\tif (bChecked)\n\t\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already selected\");\n\t\t\t\telse\n\t\t\t\t\tbTakeAction = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (bChecked)\n\t\t\t\t\tbTakeAction = true;\n\t\t\t\telse\n\t\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already unselected\");\n\t\t\t}\n\n\t\t\t// Only click the check box if it is necessary to make it the desired state by the user\n\t\t\tif (bTakeAction)\n\t\t\t{\n\t\t\t\tclick_DOM(element, sLog, sJavaScript, bException);\n\t\t\t}\n\t\t}\n\t}", "public void check (boolean doNotVerify) {\n // declaring local variables\n WebElement webElement;\n\n if (isStubbed()) {\n log(\"=== This checkbox's locator is currently stubbed out. ===\");\n } else if (doNotVerify) {\n // Only click the element and immediately return.\n // Directly get the web element since we know that it exists and is displayed\n webElement = getWebElement ();\n this.clickWebElement (webElement);\n } else {\n // getting the web element of the check box with the default timeout\n // and then check its status\n\n int MAXRETRIES = 3;\n int tries = 1;\n while (!this.isChecked() && tries <= MAXRETRIES) {\n // need to give a second for the browser to catch up with the web driver\n //sleep(1, TimeUnit.SECONDS);\n\n // Directly get the web element since we know that it exists and is displayed\n webElement = getWebElement ();\n this.clickWebElement (webElement);\n\n\n tries++;\n if (this.isChecked() == false)\n {\n sleep(1, TimeUnit.SECONDS);\n }\n }\n }\n }", "public String getText() {\n // declaring local variables\n String returnValue = \"VALUE\";\n\n if (isStubbed()) {\n log(\"=== This checkbox's locator is currently stubbed out. Returning value '\" + returnValue + \"' ===\");\n } else {\n // If a locator for this checkbox was given\n if(labelLocator != null) {\n returnValue = new Text(labelLocator).getText();\n } else {\n returnValue = getWebElement().getText();\n\n if (returnValue.isEmpty()) {\n // getting the web element with the default timeout and then get its parent which has the label associated\n // with the check box\n returnValue = getWebElement().findElement(By.xpath(\"../label\")).getText();\n }\n }\n }\n\n return returnValue;\n }", "org.apache.xmlbeans.XmlBoolean xgetKeyBox();", "private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservation.setText(\"Reservation\");\n\n //listener for 3 checkboxes\n deliver.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n pick_up.setSelected(false);\n reservation.setSelected(false);\n }\n });\n pick_up.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n reservation.setSelected(false);\n }\n });\n reservation.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n pick_up.setSelected(false);\n\n }\n });\n\n //add all\n checkbox.getChildren().addAll(deliver,pick_up,reservation);\n return checkbox;\n }", "public void selectCheckboxFromDD( By element, WebDriver driver, String class_name, String list_element)\n\t{\n\t\tList<String> xls_col_names = ExcelCache.getExpectedListData(class_name , list_element );\n\t\tList<WebElement> listelement = driver.findElements(element);\n\t\tlogger.info(\"Selecting the following values from Column customization list :\"+xls_col_names);\n\t\tfor (int i=0;i<xls_col_names.size();i++)\n\t\t{\n\t\t\tfor (int j=0;j<listelement.size();j++)\n\t\t\t{\n\t\t\t\tif(listelement.get(j).getAttribute(\"value\").equals(xls_col_names.get(i)) && !listelement.get(j).isSelected() )\n\t\t\t\t{\n\t\t\t\t\tlistelement.get(j).click();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\t\n\n\t}", "public Object getCheckedValue();", "public void clickCashondeliveryradiobutton(){\r\n\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cashondelivery Radio button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"Cashondelivery_Spain\"));\r\n\t\t\tclick(locator_split(\"Cashondelivery_Spain\"));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\twaitforElementVisible(locator_split(\"Submitorder_Spain\"));\r\n\t\t\tclick(locator_split(\"Submitorder_Spain\"));\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Cashondelivery radio button clicked \");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Cashondelivery Radio button is not clicked \"+elementProperties.getProperty(\"Cashondelivery_Spain\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"Cashondelivery_Spain\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public String isCheckboxUncheck(String object, String data) {\n\t\tlogger.debug(\"isCheckbobUncheck\");\n\t\ttry {\n\t\t\t//waitForPageLoad(driver);\n\t\t\tboolean checked = wait.until(explicitWaitForElement((By.xpath(OR.getProperty(object))))).isSelected();\n\t\t\tif (checked)\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- checkbox is selected,it shouldn't hav been\";\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_PASS + \" -- checkbox is not selected\";\n\t\t} \n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" - Could not find checkbox\";\n\t\t}\n\n\t}" ]
[ "0.62885684", "0.62347287", "0.6171135", "0.6141934", "0.5937335", "0.58486927", "0.58162796", "0.5772733", "0.5678058", "0.5673434", "0.5640049", "0.56084526", "0.56042784", "0.5594971", "0.5589486", "0.5578765", "0.5566441", "0.55555296", "0.553405", "0.55287266", "0.5513639", "0.548309", "0.54335874", "0.5411697", "0.53526974", "0.5348724", "0.5328267", "0.5323029", "0.53123796", "0.52685356", "0.5233939", "0.52271605", "0.52148336", "0.52022487", "0.52008885", "0.51972073", "0.5193999", "0.5171283", "0.5152806", "0.5131891", "0.51286584", "0.51099664", "0.51020277", "0.50906926", "0.506437", "0.5052553", "0.5052215", "0.5042127", "0.50360006", "0.50314105", "0.5030823", "0.5025183", "0.50198054", "0.50089717", "0.49928367", "0.4992212", "0.49802166", "0.4977087", "0.49719143", "0.49700335", "0.49690965", "0.4956799", "0.49559614", "0.49442574", "0.49406928", "0.49385142", "0.49335828", "0.491264", "0.49028918", "0.48937544", "0.48759976", "0.4874183", "0.48626447", "0.48557273", "0.48452902", "0.48421508", "0.48419195", "0.48347834", "0.48339474", "0.48308757", "0.4821096", "0.48135144", "0.48116434", "0.4796043", "0.47908455", "0.47905615", "0.47770363", "0.4760161", "0.47584176", "0.4756008", "0.47508082", "0.4746598", "0.47444376", "0.47438645", "0.4735466", "0.4734099", "0.4727784", "0.47151554", "0.47100008", "0.47052363" ]
0.66702276
0
Added for , Payment Page for Country HK...
public WebElement HKBankingSelection(String hkBank) { return findElement(modifyPageElement(repositoryParser, PAGE_NAME, "HKBankingSelection", hkBank)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void PaymentPage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "String getPaymentInformation();", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "public String getLBR_PartialPayment();", "public IBankTransfert payment();", "void pay(Payment payment) {\n\n\t}", "public void getPaymentInfo (View view) {\n Utility.showMyToast(\"Give me your payment info\", this);\n\n // Also send an Analytics hit\n sendPaymentInfoHit();\n\n // Show and hide buttons appropriately\n Button button = (Button) findViewById(R.id.checkout_step_2_btn);\n button.setVisibility(View.INVISIBLE);\n\n button = (Button) findViewById(R.id.purchase_btn);\n button.setVisibility(View.VISIBLE);\n }", "java.lang.String getPaymentUrl();", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "private void returnDeposit(String paymentInfo) {\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public void setAddressCountry(String addressCountry) {\n this.addressCountry = addressCountry;\n }", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "void fetchCountryInformation();", "public void CashPayment()\n {\n }", "public MentorConnectRequestCompose addIndCountry(){\n\t\tmentorConnectRequestObjects.allCountries.click();\n\t\tmentorConnectRequestObjects.algeriaCountry.click();\n\t\tmentorConnectRequestObjects.allIndustries.click();\n\t\tmentorConnectRequestObjects.agriIndustry.click();\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "public void calculatePayment() {}", "public String _paymentpage_pagefinished(String _url) throws Exception{\n__c.ProgressDialogHide();\n //BA.debugLineNum = 158;BA.debugLine=\"Loaded = True\";\n_loaded = __c.True;\n //BA.debugLineNum = 159;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}", "@Override\r\npublic int defaultPaymentInfo(int no) {\n\treturn session.insert(\"payments.defaultPayment\",no);\r\n}", "public void setCountry(Country country) {\n this.country = country;\n }", "@Override\r\n public void pay() {\n }", "CarPaymentMethod processPayPal();", "private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "@Override\n\tpublic String showTypeCard() {\n\t\treturn \"It's payment by Visa\";\n\t}", "@Override\n public String getDescription() {\n return \"Digital goods purchase\";\n }", "private PaymentType(String payment) {\n this.payment = payment;\n }", "public void setCountry(java.lang.String country) {\r\n this.country = country;\r\n }", "void paymentOrder(long orderId);", "private void checkPaymentMethod() {\n toolbar.setTitle(R.string.payment_method);\n PaymentMethodFragment paymentMethodFragment = new PaymentMethodFragment();\n displaySelectedFragment(paymentMethodFragment);\n }", "public void autoPay() {}", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "public void setCountry(java.lang.String country) {\n this.country = country;\n }", "public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}", "public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }", "@Override\n\t\t\t\t\tpublic void onSelectCountry(String name, String code) {\n\t\t\t\t\t\tIntent intent = new Intent(contry.this, SignUpActivity.class);\n\t\t\t\t\t\t intent.putExtra(\"pays_iso\",code); \n\t\t\t\t\t\t intent.putExtra(\"pays_name\",name); \n\t\t\t\t\t\t intent.putExtra(\"device_key\",registrationId); \n\t\t\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\t\t\toverridePendingTransition(R.anim.slidein, R.anim.slideout);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override\r\n\tpublic void addUserHopedGetProductDate(PaymentDetails paymentDetails) {\n\r\n\t}", "@Override\n public String getDescription() {\n return \"Buy currency\";\n }", "public CreditCard getDefaultPaymentInfo();", "public String getCountry() {\r\n return this.country;\r\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }", "BillingSource billingSource();", "String getBilling() {\r\n return null;\r\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(String country) {\n\t\tthis.country = country;\n\t}", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "@Override\n public String toString() {\n return payment; \n }", "@Override\n public String getDescription() {\n return \"Digital goods delivery\";\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "boolean hasPayment();", "boolean hasPayment();", "public void pay (View view){\n String url = \"https://www.paypal.me/Pmwallet/1\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n setContentView(R.layout.webclient);\n WebView webView = (WebView) findViewById(R.id.webview);\n webView.getSettings().setJavaScriptEnabled(true);\n\n webView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int progress)\n {\n activity.setTitle(\"Loading...\");\n activity.setProgress(progress * 100);\n\n if(progress == 100)\n activity.setTitle(R.string.app_name);\n }\n });\n\n webView.setWebViewClient(new WebViewClient() {\n @Override\n public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)\n {\n // Handle the error\n }\n\n @Override\n public boolean shouldOverrideUrlLoading(WebView view, String url)\n {\n view.loadUrl(url);\n return true;\n }\n });\n\n webView.loadUrl(\"https://io.adafruit.com/pagman/dashboards/parkease\");\n }", "public abstract PaymentType getPaymentType();", "public void paypal(View view){\n\n\n }", "@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}", "public int getC_Payment_ID();", "public PUKEHandlerCallBanker_ABZ_FOUR(){\r\n\t}", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "private String getCountryName(String name)\r\n {\r\n }", "public void setCountry_id(String country_id) {\n this.country_id = country_id;\n }", "@Override\n public String getDescription() {\n return \"Transfer currency\";\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:06.410 -0500\", hash_original_method = \"BFC255CAA5852747525F7A463403B75F\", hash_generated_method = \"5E246E1D734705125312F8B71BE424A7\")\n \nprivate String getCountryNameForNumber(PhoneNumber number, Locale language) {\n String regionCode = phoneUtil.getRegionCodeForNumber(number);\n return (regionCode == null || regionCode.equals(\"ZZ\"))\n ? \"\" : new Locale(\"\", regionCode).getDisplayCountry(language);\n }", "@Override\n\tpublic java.lang.String getPayment() {\n\t\treturn _esfShooterAffiliationChrono.getPayment();\n\t}", "public void mo38838a(PaymentError paymentError) {\n }", "public String getJP_BankDataCustomerCode2();", "@Override\n\t\t\tpublic void onSelectCountry(String name, String code) {\n\t\t\t\tIntent intent = new Intent(contry.this, SignUpActivity.class);\n\t\t\t\t intent.putExtra(\"pays_iso\",code); \n\t\t\t\t intent.putExtra(\"pays_name\",name); \n\t\t\t\t intent.putExtra(\"device_key\",registrationId); \n\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\toverridePendingTransition(R.anim.slidein, R.anim.slideout);\n\t\t\t\tfinish();\n\t\t\t}", "public String getCountry()\n {\n return country;\n }", "public void setLBR_PartialPayment (String LBR_PartialPayment);", "public CustomerPaymentList getCustomerPayments(String response) throws Exception {\n\n CustomerPaymentList customerPaymentList = new CustomerPaymentList();\n\n JSONObject jsonObject = new JSONObject(response.trim());\n\n JSONArray customerpayments = jsonObject.getJSONArray(\"customerpayments\"); //No I18N\n\n for (int i = 0; i < customerpayments.length(); i++) {\n CustomerPayment customerPayment = new CustomerPayment();\n\n customerPayment.setPaymentId(customerpayments.getJSONObject(i).getString(\"payment_id\"));\n customerPayment.setPaymentNumber(customerpayments.getJSONObject(i).getString(\"payment_number\"));\n customerPayment.setInvoiceNumbers(customerpayments.getJSONObject(i).getString(\"invoice_numbers\"));\n customerPayment.setDate(customerpayments.getJSONObject(i).getString(\"date\"));\n customerPayment.setPaymentMode(customerpayments.getJSONObject(i).getString(\"payment_mode\"));\n customerPayment.setAmount(customerpayments.getJSONObject(i).getDouble(\"amount\")); //No I18N\n customerPayment.setBcyAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_amount\")); //No I18N\n customerPayment.setUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"unused_amount\")); //No I18N\n customerPayment.setBcyUnusedAmount(customerpayments.getJSONObject(i).getDouble(\"bcy_unused_amount\")); //No I18N\n customerPayment.setAccountId(customerpayments.getJSONObject(i).getString(\"account_id\"));\n customerPayment.setAccountName(customerpayments.getJSONObject(i).getString(\"account_name\"));\n customerPayment.setDescription(customerpayments.getJSONObject(i).getString(\"description\"));\n customerPayment.setReferenceNumber(customerpayments.getJSONObject(i).getString(\"reference_number\"));\n customerPayment.setCustomerId(customerpayments.getJSONObject(i).getString(\"customer_id\"));\n customerPayment.setCustomerName(customerpayments.getJSONObject(i).getString(\"customer_name\"));\n\n customerPaymentList.add(customerPayment);\n }\n\n PageContext pageContext = new PageContext();\n\n JSONObject pagecontext = jsonObject.getJSONObject(\"page_context\"); //No I18N\n\n pageContext.setPage(pagecontext.getInt(\"page\")); //No I18N\n pageContext.setPerPage(pagecontext.getInt(\"per_page\")); //No I18N\n pageContext.setHasMorePage(pagecontext.getBoolean(\"has_more_page\")); //No I18N\n pageContext.setReportName(pagecontext.getString(\"report_name\"));\n pageContext.setAppliedFilter(pagecontext.getString(\"applied_filter\"));\n pageContext.setSortColumn(pagecontext.getString(\"sort_column\"));\n pageContext.setSortOrder(pagecontext.getString(\"sort_order\"));\n\n customerPaymentList.setPageContext(pageContext);\n\n return customerPaymentList;\n }", "public static URL getUrlForGetCountries()\r\n {\r\n String strUrl = getBaseURL() + \"account_services/api/1.0/static_content/countries/client_type/3/language/\"+\r\n \t\tA.getContext().getString( R.string.backend_language_code )+\"?brand=\"+Config.BRAND_NAME_URL;\r\n return str2url( strUrl );\r\n }", "public void setPaymentCurrency(String paymentCurrency) {\n _paymentCurrency = paymentCurrency;\n }", "public PaymentDetails getPaymentDetails(Order order, PaymentInfo info) throws Exception\r\n {\r\n StaticData sd = staticDataHM.get(getStoreId());\r\n /*\r\n * The CyberSourceZone zone, if greater than zero, should reference a GeoZone. If the\r\n * DeliveryAddress of the order isn't within that GeoZone, then we throw an exception\r\n */\r\n if (sd.getZone() > 0)\r\n {\r\n checkZone(info, sd.getZone());\r\n }\r\n\r\n // Get the scale for currency calculations\r\n int scale = new Integer(order.getCurrency().getDecimalPlaces()).intValue();\r\n\r\n // Get the resource bundle\r\n ResourceBundle rb = getResourceBundle(mutex, bundleName, resourceBundleMap,\r\n info.getLocale());\r\n if (rb == null)\r\n {\r\n throw new KKException(\"A resource file cannot be found for the country \"\r\n + info.getLocale().getCountry());\r\n }\r\n\r\n PaymentDetails pDetails = new PaymentDetails();\r\n pDetails.setCode(CYBERSOURCESA_GATEWAY_CODE);\r\n pDetails.setSortOrder(sd.getSortOrder());\r\n pDetails.setPaymentType(PaymentDetails.BROWSER_PAYMENT_GATEWAY);\r\n pDetails.setDescription(rb.getString(MODULE_PAYMENT_CYBERSOURCESA_TEXT_DESCRIPTION));\r\n pDetails.setTitle(rb.getString(MODULE_PAYMENT_CYBERSOURCESA_TEXT_TITLE));\r\n\r\n // Return now if the full payment details aren't required. This happens when the manager\r\n // just wants a list of payment gateways to display in the UI.\r\n if (info.isReturnDetails() == false)\r\n {\r\n return pDetails;\r\n }\r\n\r\n pDetails.setPostOrGet(\"post\");\r\n pDetails.setRequestUrl(sd.getRequestUrl());\r\n\r\n // This gateway only requires details of the final price. No tax, sub-total etc.\r\n BigDecimal total = null;\r\n for (int i = 0; i < order.getOrderTotals().length; i++)\r\n {\r\n OrderTotal ot = (OrderTotal) order.getOrderTotals()[i];\r\n if (ot.getClassName().equals(OrderTotalMgr.ot_total))\r\n {\r\n total = ot.getValue().setScale(scale, BigDecimal.ROUND_HALF_UP);\r\n }\r\n }\r\n\r\n if (total == null)\r\n {\r\n throw new KKException(\"An Order Total was not found\");\r\n }\r\n\r\n // total = total.movePointRight(scale);\r\n // total.setScale(0);\r\n\r\n List<NameValueIf> parmList = new ArrayList<NameValueIf>();\r\n\r\n // parmList.add(new NameValue(CYBERSOURCESA_MERCHANT_ACCOUNT, sd.getMerchantAccount()));\r\n parmList.add(new NameValue(CYBERSOURCESA_ACCESS_KEY, sd.getAccessKey()));\r\n parmList.add(new NameValue(CYBERSOURCESA_PROFILE_ID, sd.getProfileId()));\r\n // parmList.add(new NameValue(CYBERSOURCESA_VERSION_NUMBER, sd.getGatewayVersion()));\r\n // parmList.add(new NameValue(CYBERSOURCESA_ALLOW_UPDATES, \"false\"));\r\n parmList.add(new NameValue(CYBERSOURCESA_SIGNED_DATE_TIME, getUTCDateTime()));\r\n\r\n Set<String> signedFieldsSet = new TreeSet<String>();\r\n String signedFieldNames = null;\r\n for (String fld : CYBERSOURCESA_SIGNED_FIELDS)\r\n {\r\n signedFieldsSet.add(fld);\r\n if (signedFieldNames == null)\r\n {\r\n signedFieldNames = fld;\r\n } else\r\n {\r\n signedFieldNames += \",\" + fld;\r\n }\r\n }\r\n parmList.add(new NameValue(CYBERSOURCESA_SIGNED_FIELD_NAMES, signedFieldNames));\r\n\r\n parmList.add(new NameValue(CYBERSOURCESA_REFERENCE_NUM, order.getLifecycleId()));\r\n parmList.add(new NameValue(CYBERSOURCESA_TRAN_UUID, order.getLifecycleId()));\r\n\r\n // Save the shared secret on custom1\r\n pDetails.setCustom1(sd.getSharedSecret());\r\n\r\n // Put the environment on custom2\r\n pDetails.setCustom2(sd.getEnvironment());\r\n\r\n // parmList.add(new NameValue(CYBERSOURCESA_3D_STATUS, sd.isCheck3dSecure() ? \"true\" :\r\n // \"false\"));\r\n\r\n // if (sd.isCheck3dSecure())\r\n // {\r\n // parmList.add(new NameValue(CYBERSOURCESA_3D_RESPONSE_URL, sd.getResponseUrl()\r\n // .replaceFirst(hostPortSubstitute, info.getHostAndPort())));\r\n // }\r\n\r\n parmList.add(new NameValue(CYBERSOURCESA_RESPONSE_RECEIPT_URL, sd.getResponseUrl()\r\n .replaceFirst(hostPortSubstitute, info.getHostAndPort())));\r\n // parmList.add(new NameValue(CYBERSOURCESA_RESPONSE_DECLINE_URL, sd.getResponseUrl()\r\n // .replaceFirst(hostPortSubstitute, info.getHostAndPort())));\r\n // parmList.add(new NameValue(CYBERSOURCESA_CUST_EMAIL, order.getCustomerEmail()));\r\n\r\n // parmList.add(new NameValue(\"product_id\", sd.getProductId()));\r\n // parmList.add(new NameValue(\"product_name\", \"Order #\" + order.getId() + \" from \"\r\n // + info.getStoreName()));\r\n\r\n parmList.add(new NameValue(CYBERSOURCESA_PAYMENT_AMOUNT, total.toString()));\r\n parmList.add(new NameValue(CYBERSOURCESA_CURRENCY, order.getCurrencyCode()));\r\n\r\n if (!Utils.isBlank(info.getLocale().getVariant()))\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_LOCALE, info.getLocale().getLanguage() + \"-\"\r\n + info.getLocale().getVariant()));\r\n } else\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_LOCALE, info.getLocale().getLanguage()));\r\n }\r\n\r\n // ---------------------------------------------------------------------------------------\r\n // Set the billing details\r\n\r\n // Set the billing name from the billing address Id\r\n\r\n String[] bNames = getFirstAndLastNamesFromAddress(order.getBillingAddrId());\r\n if (bNames != null)\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_FNAME, bNames[0]));\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_LNAME, bNames[1]));\r\n }\r\n\r\n if (!Utils.isBlank(order.getBillingCompany()))\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_COMP, order.getBillingCompany()));\r\n }\r\n\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_STREET1, order.getBillingStreetAddress()));\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_CITY, order.getBillingCity()));\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_STATE, getZoneCodeForZoneName(order\r\n .getBillingState())));\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_POSTCODE, order.getBillingPostcode()));\r\n\r\n CountryIf country = getEng().getCountryPerName(order.getBillingCountry());\r\n if (country != null)\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_COUNTRY, country.getIsoCode2()));\r\n }\r\n\r\n if (!Utils.isBlank(order.getBillingTelephone()))\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_PHONE, order.getBillingTelephone()));\r\n }\r\n\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_EMAIL, order.getCustomerEmail()));\r\n\r\n // ---------------------------------------------------------------------------------------\r\n // Set the delivery details\r\n\r\n // Set the delivery names from the delivery address Id\r\n\r\n String[] dNames = getFirstAndLastNamesFromAddress(order.getDeliveryAddrId());\r\n if (dNames != null)\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_SHIPTO_FNAME, dNames[0]));\r\n parmList.add(new NameValue(CYBERSOURCESA_SHIPTO_LNAME, dNames[1]));\r\n }\r\n\r\n if (!Utils.isBlank(order.getDeliveryCompany()))\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_SHIPTO_COMP, order.getDeliveryCompany()));\r\n }\r\n\r\n parmList.add(new NameValue(CYBERSOURCESA_SHIPTO_STREET1, order.getDeliveryStreetAddress()));\r\n parmList.add(new NameValue(CYBERSOURCESA_SHIPTO_CITY, order.getDeliveryCity()));\r\n parmList.add(new NameValue(CYBERSOURCESA_SHIPTO_STATE, getZoneCodeForZoneName(order\r\n .getDeliveryState())));\r\n parmList.add(new NameValue(CYBERSOURCESA_SHIPTO_POSTCODE, order.getDeliveryPostcode()));\r\n\r\n country = getEng().getCountryPerName(order.getDeliveryCountry());\r\n if (country != null)\r\n {\r\n parmList.add(new NameValue(CYBERSOURCESA_BILLTO_COUNTRY, country.getIsoCode2()));\r\n }\r\n\r\n // Set the fields that should be visible in the UI when gathering Credit Card details\r\n // pDetails.setShowAddr(false);\r\n // pDetails.setShowCVV(true);\r\n // pDetails.setShowPostcode(false);\r\n // pDetails.setShowType(true);\r\n // pDetails.setShowOwner(true);\r\n\r\n String storeId = \"?\";\r\n StoreIf store = getEng().getStore();\r\n if (store != null)\r\n {\r\n storeId = store.getStoreId();\r\n }\r\n\r\n int engineMode = getEng().getEngConf().getMode();\r\n boolean customersShared = getEng().getEngConf().isCustomersShared();\r\n boolean productsShared = getEng().getEngConf().isProductsShared();\r\n boolean categoriesShared = getEng().getEngConf().isCategoriesShared();\r\n String countryCode = order.getLocale().substring(0, 2);\r\n\r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(\"Used to create merchant defined data: \\n\"\r\n + \" OrderId = \"\r\n + order.getId()\r\n + \"\\n\"\r\n + \" OrderNumber = \"\r\n + order.getOrderNumber()\r\n + \"\\n\"\r\n + \" StoreId = \"\r\n + storeId\r\n + \"\\n\"\r\n + \" EngineMode = \"\r\n + engineMode\r\n + \"\\n\"\r\n + \" CustomersShared = \"\r\n + customersShared\r\n + \"\\n\"\r\n + \" ProductsShared = \"\r\n + productsShared\r\n + \"\\n\"\r\n + \" CategoriesShared = \"\r\n + categoriesShared\r\n + \"\\n\"\r\n + \" CountryCode = \" + countryCode);\r\n }\r\n\r\n String merchantReference = order.getId() + \"~\" + order.getOrderNumber() + \"~\" + storeId\r\n + \"~\" + engineMode + \"~\" + customersShared + \"~\" + productsShared + \"~\"\r\n + categoriesShared + \"~\" + countryCode;\r\n\r\n parmList.add(new NameValue(CyberSourceSA.CYBERSOURCESA_MERCHANT_DATA1, merchantReference));\r\n parmList.add(new NameValue(CyberSourceSA.CYBERSOURCESA_MERCHANT_DATA2, sd.getEnvironment()));\r\n\r\n parmList.add(new NameValue(CyberSourceSA.CYBERSOURCESA_TRAN_TYPE, \"sale\"));\r\n parmList.add(new NameValue(CyberSourceSA.CYBERSOURCESA_IGNORE_AVS, \"true\"));\r\n\r\n // String time = String.valueOf(System.currentTimeMillis());\r\n\r\n // parmList.add(new NameValue(CyberSourceSA.CYBERSOURCESA_TIMESTAMP, time));\r\n\r\n // Calculate the signature\r\n HashMap<String, String> hp = hashParameters(pDetails, parmList);\r\n\r\n // Now add the list of unsigned fields that we have\r\n\r\n String unsignedFieldNames = null;\r\n\r\n log.info(\"Unsigned fields:\");\r\n\r\n for (Map.Entry<String, String> entry : hp.entrySet())\r\n {\r\n if (!signedFieldsSet.contains(entry.getKey()))\r\n {\r\n log.info(entry.getKey());\r\n if (unsignedFieldNames == null)\r\n {\r\n unsignedFieldNames = entry.getKey();\r\n } else\r\n {\r\n unsignedFieldNames += \",\" + entry.getKey();\r\n }\r\n }\r\n }\r\n\r\n parmList.add(new NameValue(CyberSourceSA.CYBERSOURCESA_UNSIGNED_FIELD_NAMES,\r\n unsignedFieldNames));\r\n\r\n // Calculate the signature\r\n hp.put(CyberSourceSA.CYBERSOURCESA_UNSIGNED_FIELD_NAMES, unsignedFieldNames);\r\n\r\n String data = null;\r\n\r\n for (String field : CYBERSOURCESA_SIGNED_FIELDS)\r\n {\r\n if (data == null)\r\n {\r\n data = field + \"=\" + hp.get(field);\r\n } else\r\n {\r\n data += \",\" + field + \"=\" + hp.get(field);\r\n }\r\n }\r\n\r\n log.info(\"Sign this: \\n\" + data);\r\n log.info(\"Secret Key: \\n\" + pDetails.getCustom1());\r\n\r\n parmList.add(new NameValue(CyberSourceSA.CYBERSOURCESA_SIGNATURE, CyberSourceSAHMACTools\r\n .getBase64EncodedSignature(pDetails.getCustom1(), data)));\r\n\r\n // addParameters(pDetails, parmList);\r\n\r\n // Put the parameters into an array\r\n NameValue[] nvArray = new NameValue[parmList.size()];\r\n parmList.toArray(nvArray);\r\n pDetails.setParameters(nvArray);\r\n\r\n // Remove shared secret for security\r\n // pd.setCustom1(null);\r\n\r\n if (log.isDebugEnabled())\r\n {\r\n // to show what we're about to post to CyberSource\r\n\r\n String postStr = pDetails.getRequestUrl() + \"?\";\r\n\r\n for (int p = 0; p < pDetails.getParameters().length; p++)\r\n {\r\n if (p > 0)\r\n {\r\n postStr += \"&\";\r\n }\r\n\r\n if (pDetails.getParameters()[p].getValue() == null)\r\n {\r\n if (pDetails.getParameters()[p].getName() != null)\r\n {\r\n log.debug(\"Value for \" + pDetails.getParameters()[p].getName() + \" is null\");\r\n }\r\n } else\r\n {\r\n postStr += pDetails.getParameters()[p].getName() + \"=\"\r\n + URLEncoder.encode(pDetails.getParameters()[p].getValue(), \"UTF-8\");\r\n }\r\n }\r\n\r\n log.debug(\"\\n\" + postStr);\r\n }\r\n\r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(pDetails.toString());\r\n }\r\n\r\n return pDetails;\r\n }", "@Override\r\n\tpublic void setPaymentType() {\n\t\tthis.paymentType = PaymentType.YINLIAN;\r\n\t}", "void pay(Order order);", "public String getCountry() {\n return country;\n }", "static public void set_country_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3), Edit_row_window.selected[0].getText(4), \n\t\t\t\tEdit_row_window.selected[0].getText(5), Edit_row_window.selected[0].getText(6)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_locations l, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.location_id=l.id and lc.country_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\" from curr_places_locations l \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"location name\", \"rating\", \"population\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"LOCATIONS\";\n\t}", "@Test\n public void defineShippingmethod()\n {\n library.agreeCheckbox();\n library.isAlertPresent1();\n library.enterCountryToCheckout(country);\n //Verify product added to shopping cart successfully\n library.verifyBillingAddressWindow();\n library.definingTheAddress(country,city,address1,postalCode,phone);\n library.shippingAddressSelect();\n library.verifyShippingMethodWindow();\n\n\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "public String getJP_BankDataCustomerCode1();", "public void setCountry(java.lang.String Country) {\n this.Country = Country;\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "PaymentHandler createPaymentHandler();", "private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }", "public void nextCountry(View view) {\n if (!countryList.getCountryList().isEmpty() && index < countryList.getCountryList().size()) {\n index += 1;\n displayCountry();\n }\n }", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "public CountryCode getCountry() {\n return country;\n }", "public final void onStart() {\n int i;\n super.onStart();\n asjl.m74236a(this, \"Choose Type of Payment\");\n String string = asjw.m74255a() ? getString(C0126R.string.tp_paypal_payment_option_sub_label) : getString(C0126R.string.tp_paypal_payment_option_non_hce_sub_label);\n this.f108828c.clear();\n if (cgxf.m147444b()) {\n this.f108828c.add(new atqm(getString(C0126R.string.tp_paypal), string, getResources().getDrawable(C0126R.C0127drawable.tp_paypal_color_48dp), new atql(this)));\n }\n this.f108828c.notifyDataSetChanged();\n if (!cgxf.m147444b()) {\n i = 3;\n } else {\n i = 2;\n }\n this.f108830e = i;\n mo59452a(2);\n }", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }" ]
[ "0.6022878", "0.59744626", "0.5910876", "0.5877741", "0.57673514", "0.57212615", "0.57046556", "0.5692044", "0.56736046", "0.5665111", "0.5653418", "0.5653418", "0.5653418", "0.5653418", "0.5653418", "0.5653418", "0.5607658", "0.5600123", "0.55528945", "0.5552874", "0.55443406", "0.5528171", "0.5524391", "0.5521897", "0.55066806", "0.5503111", "0.5487418", "0.5479074", "0.5468335", "0.5465931", "0.5445321", "0.54438835", "0.54359704", "0.5422491", "0.5422491", "0.5422491", "0.5401898", "0.5394775", "0.53934205", "0.53898954", "0.53871006", "0.5386641", "0.536894", "0.536236", "0.53597903", "0.53585255", "0.53556144", "0.53517866", "0.534481", "0.53424054", "0.53409934", "0.53350586", "0.53281075", "0.53224516", "0.5320803", "0.53201437", "0.53201437", "0.5319402", "0.5317088", "0.5313926", "0.531329", "0.5311675", "0.5305645", "0.5305645", "0.5302964", "0.52710587", "0.5262695", "0.5260142", "0.5249386", "0.52478206", "0.5247211", "0.52413154", "0.5240293", "0.5240268", "0.52396363", "0.52320504", "0.5223434", "0.5222482", "0.52129924", "0.52114356", "0.52096695", "0.5206686", "0.52059793", "0.52057403", "0.5199408", "0.51983106", "0.5198179", "0.5195966", "0.5195619", "0.5195035", "0.5191515", "0.5189932", "0.51839876", "0.5180124", "0.5180093", "0.5176461", "0.5171819", "0.5163803", "0.51637566", "0.51532227", "0.5146428" ]
0.0
-1
getting 123banking cancel button
public WebElement get123BankingCancelBtn() { WebDriverWait wait = new WebDriverWait(driver, 20); return wait.until(ExpectedConditions.elementToBeClickable(findElement( repositoryParser, PAGE_NAME, "123BankingCancelBtn"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void btnCancel();", "HasClickHandlers getCancelButton();", "private javax.swing.JButton getBtnCancel() {\r\n\tif (ivjBtnCancel == null) {\r\n\t\ttry {\r\n\t\t\tivjBtnCancel = new javax.swing.JButton();\r\n\t\t\tivjBtnCancel.setName(\"BtnCancel\");\r\n\t\t\tivjBtnCancel.setText(\"Cancel\");\r\n\t\t\t// user code begin {1}\r\n\t\t\t// user code end\r\n\t\t} catch (java.lang.Throwable ivjExc) {\r\n\t\t\t// user code begin {2}\r\n\t\t\t// user code end\r\n\t\t\thandleException(ivjExc);\r\n\t\t}\r\n\t}\r\n\treturn ivjBtnCancel;\r\n}", "private BButton getBtnCancel() {\r\n\t\tif (btnCancel == null) {\r\n\t\t\tbtnCancel = new BButton();\r\n\t\t\tbtnCancel.setText(\"Cancel\");\r\n\t\t\tbtnCancel.setPreferredSize(new Dimension(100, 29));\r\n\t\t}\r\n\t\treturn btnCancel;\r\n\t}", "public void onCancelClick()\r\n {\r\n\r\n }", "@Override\r\n\tprotected void onBoCancel() throws Exception {\n\t\tsuper.onBoCancel();\r\n\t\t// 修改按钮属性\r\n\t\tif(myaddbuttun){\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tmyaddbuttun=true;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}else{\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tmyaddbuttun=false;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}\r\n\t}", "private JButton getRejectButton() {\n return ((OkCancelButtonPanel) getButtonPanel()).getCancelButton();\n }", "@Override\n public void OnCancelButtonPressed() {\n }", "public Object getBtnCancel() {\n return btnCancel;\n }", "void onCancelButtonPressed();", "private JButton getBcancel() {\n if( Bcancel == null ) {\n Bcancel = new JButton();\n Bcancel.setText(\"Cancel\");\n Bcancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n setVisible(false);\n dispose();\n }\n });\n }\n return Bcancel;\n }", "@Override\n public void OnCancelButtonPressed() {\n }", "public void cancel() { Common.exitWindow(cancelBtn); }", "private JButton getBtnCancel() {\n if (btnCancel == null) {\n btnCancel = new JButton();\n btnCancel.setText(\"Odustani\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n selected = false;\n setVisible(false);\n }\n });\n }\n return btnCancel;\n }", "void onCancelClicked();", "private JButton getBCancelar() {\r\n if (bCancelar == null) {\r\n bCancelar = new JButton();\r\n bCancelar.setBounds(new Rectangle(250, 200, 100, 30));\r\n bCancelar.setText(\"Cerrar\");\r\n bCancelar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent e) {\r\n limpiarCampos();\r\n dAbmGrupos.setVisible(false);\r\n }\r\n });\r\n }\r\n return bCancelar;\r\n }", "private JButton getJButtonCancel() {\n\t\tif (jButtonCancel == null) {\n\t\t\tjButtonCancel = new JButton();\n\t\t\tjButtonCancel.setText(\"I disagree\");\n\t\t\tjButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = false;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonCancel;\n\t}", "private JButton getCancelButton() {\r\n\t\tif (cancelButton == null) {\r\n\t\t\tcancelButton = new JButton();\r\n\t\t\tcancelButton.setText(\"Cancel\");\r\n\t\t\tcancelButton.addActionListener(new java.awt.event.ActionListener() { \r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) { \r\n\t\t\t\t\tdispose();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cancelButton;\r\n\t}", "public JButtonOperator btCancel() {\n if (_btCancel==null) {\n _btCancel = new JButtonOperator(this, Bundle.getStringTrimmed(\"org.openide.Bundle\", \"CTL_CANCEL\"));\n }\n return _btCancel;\n }", "public void clickOnCancelButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Cancel\"));\r\n\t}", "private void cancelButtonActionPerformed(ActionEvent e) {\n }", "public javax.swing.JButton getBtnCancel() {\n return btnCancel;\n }", "private void jCancelBookingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCancelBookingActionPerformed\n if(bookingNr != -1)\n bm.cancel(bookingNr);\n \n \n }", "public javax.swing.JButton getCancelBtn() {\n\t\treturn cancelBtn;\n\t}", "private JButton getJButtonCancel() {\r\n\t\tif (jButtonCancel == null) {\r\n\t\t\tjButtonCancel = new JButton();\r\n\t\t\tjButtonCancel.setBounds(new Rectangle(220, 215, 90, 30));\r\n\t\t\tjButtonCancel.setText(\"取消\");\r\n\t\t\tjButtonCancel.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tjColorChooser.setVisible(false);\r\n\t\t\t\t\tchooserColor = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonCancel;\r\n\t}", "private Component cancelButton(){\n cancelButton = new Button(\"cancelButton\"){\n @Override\n public void onSubmit() {\n super.onSubmit();\n personFormPanel.clearFormValues();\n }\n };\n //Reset default form processing: validation and model update\n cancelButton.setDefaultFormProcessing(false);\n return cancelButton;\n }", "public void cancelButton() {\n this.setMultQuestionSet(null);\n this.setSingleQuestionSet(null);\n this.setTextQuestionSet(null);\n this.setDateQuestionSet(null);\n System.out.println(\"Done pressing cancel button\");\n }", "private JButton getAcceptButton() {\n return ((OkCancelButtonPanel) getButtonPanel()).getOkayButton();\n }", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "public void cancelCard() {}", "private JButton getCancelButton() {\n if (cancelButton == null) {\n cancelButton = new JButton();\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n canceled = true;\n dispose();\n }\n });\n }\n return cancelButton;\n }", "public void clickOnCancelButtonInMarkAsCompletePopup() {\n getLogger().info(\"Click on cancel button in mark as complete button\");\n try {\n waitForClickableOfElement(eleCancelBtn, \"Wait for click on cancel button\");\n clickElement(eleCancelBtn, \"Click on cancel button\");\n NXGReports.addStep(\"Verify click on cancel button in mark as complete popup successful \", LogAs.PASSED, null);\n } catch (Exception ex) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify click on cancel button in mark as complete popup fail\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "private JButton getJButtonCancelar() {\r\n\t\tif (jButtonCancelar == null) {\r\n\t\t\tjButtonCancelar = new JButton();\r\n\t\t\tjButtonCancelar.setText(CANCELAR);\r\n\t\t}\r\n\t\treturn jButtonCancelar;\r\n\t}", "public void setCancelButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_cancelButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_cancelButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_cancelButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setCancelButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private Component getCancelButton() {\n\t\tif (cancelButton == null) {\r\n\t\t\tcancelButton = new JButton();\r\n\t\t\tcancelButton.setText(\"Cancel\");\r\n\t\t\tcancelButton.addActionListener(new ActionListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t \r\n\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cancelButton;\r\n\t}", "private void decorateCancelButton() {\n cancelButton.setVisible(false);\n ResourceUtils.resButton(cancelButton, Res.getString(\"cancel\"));\n cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196)));\n cancelButton.setForeground(new Color(73, 113, 196));\n cancelButton.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n \n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n cancelTransfer();\n }\n });\n \n cancelButton.addMouseListener(new MouseAdapter() {\n public void mouseEntered(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\n \n }\n \n public void mouseExited(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }\n });\n \n }", "public String cancel()\n {\n if (!\"list\".equals(from))\n {\n return \"mainMenu\";\n }\n return \"cancel\";\n }", "void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }", "public static int cancel() {\n\t\tUIManager.put(\"OptionPane.warningIcon\", icon);\n\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\treturn 1;\n\t}", "public void cancelCard(String cardNumber) {}", "public void handleCancelButton(ActionEvent actionEvent) throws IOException {\n ScreenLoader.display(\"customerSearchScreen\",\"Customer Search\",actionEvent);\n }", "@Override\n public void onClick(View v) {\n buttonCancelClicked();\n }", "public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}", "private JButton getJButtonCancelHTML() {\r\n\r\n\t\tif (jButtonCancelHTML == null) {\r\n\t\t\tjButtonCancelHTML = new JButton();\r\n\t\t\tjButtonCancelHTML.setBounds(new Rectangle(306, 258, 106, 21));\r\n\t\t\tjButtonCancelHTML.setText(StringDatabase.getUniqueInstance ()\r\n\t\t\t\t.getString(\"HTMLTextEditor.jButtonCancelHTML.Text\"));\r\n\t\t\t// setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\r\n\t\t\tjButtonCancelHTML\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\r\n\t\t\t\t\t\textendedHTMLEditorKit =\r\n\t\t\t\t\t\t\tekitCoreEditorHTMLPanel.gethtmlKit();\r\n\t\t\t\t\t\textendedHTMLDocument =\r\n\t\t\t\t\t\t\tekitCoreEditorHTMLPanel.gethtmlDoc();\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t}\r\n\t\treturn jButtonCancelHTML;\r\n\t}", "public String getText_click_ActivateCoupon_Button(){\r\n\t\treturn click_ActivateCoupon_Button.getText();\r\n\t}", "CancelAction getCancelAction();", "private javax.swing.JButton getJButtonCancel() {\n\t\tif(jButton1 == null) {\n\t\t\tjButton1 = new javax.swing.JButton();\n\t\t\tjButton1.setText(\"Cancel\");\n\t\t\tjButton1.setMnemonic(java.awt.event.KeyEvent.VK_C);\n\t\t\tjButton1.setName(\"Cancel\");\n\t\t\tjButton1.setPreferredSize(new java.awt.Dimension(85,25));\n\t\t\tjButton1.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) { \n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButton1;\n\t}", "public String btn_cancel_delete_action()\n {\n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n return null;\n }", "public void OnOkClick()\r\n {\r\n\r\n }", "private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n okButton.setName(\"okButton\");\n }\n return okButton;\n }", "@Override\n public JButton get_default_button()\n {\n return BT_OK;\n }", "void onCancel(int key);", "private void actionCancel() {\n\t\tselectedDownload.cancel();\n\t\tupdateButtons();\n\t}", "private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private javax.swing.JButton getJButtonCancelar() {\n\t\tif(jButtonCancelar == null) {\n\t\t\tjButtonCancelar = new JHighlightButton();\n\t\t\tjButtonCancelar.setText(\"Cancelar\");\n\t\t\tjButtonCancelar.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButtonCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/becoblohm/cr/gui/resources/icons/ix16x16/delete2.png\")));\n\t\t}\n\t\treturn jButtonCancelar;\n\t}", "public String getCancelButtonCaption() {\r\n\t\tif (_cancelButton == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn _cancelButton.getDisplayName();\r\n\t}", "protected void onCancelRequestReceipts() {\n \tmTxtStatus.setText(\"requestReceipts onCancel\");\n }", "@Override\r\n\tprotected void onBoEdit() throws Exception {\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tsuper.onBoEdit();\r\n\t}", "protected String buttonContlor(ScheduleParams searchParam)\n throws CommonException\n {\n //Receiving plan search\n ReceivingPlanHandler receivingHandler = new ReceivingPlanHandler(this.getConnection());\n ReceivingPlanSearchKey lowSearchKey = new ReceivingPlanSearchKey();\n ReceivingPlanSearchKey highSearchKey = new ReceivingPlanSearchKey();\n\n lowSearchKey.setPlanDayCollect();\n lowSearchKey.setPlanDayGroup();\n lowSearchKey.setStatusFlag(ReceivingPlan.STATUS_FLAG_DELETE, \"!=\");\n lowSearchKey.setConsignorCode(WmsParam.DEFAULT_CONSIGNOR_CODE);\n\n highSearchKey.setPlanDayCollect();\n highSearchKey.setPlanDayGroup();\n highSearchKey.setStatusFlag(ReceivingPlan.STATUS_FLAG_DELETE, \"!=\");\n highSearchKey.setConsignorCode(WmsParam.DEFAULT_CONSIGNOR_CODE);\n\n //Gets the number of data\n int lowDayCount = 0;\n int highDayCount = 0;\n\n // Gets the number of the previous/next data due to Button control\n lowSearchKey.setPlanDay(searchParam.getString(PLAN_DAY), \"<\");\n lowDayCount = receivingHandler.find(lowSearchKey).length;\n\n highSearchKey.setPlanDay(searchParam.getString(PLAN_DAY), \">\");\n highDayCount = receivingHandler.find(highSearchKey).length;\n\n //Button control flag\n String btnControl = null;\n\n //When a display button on an initial or auto display is pushed \n if (ReceivingInParameter.PROCESS_FLAG_VIEW.equals(searchParam.get(PROCESS_FLAG)))\n {\n if (lowDayCount == 0 && highDayCount < 2)\n {\n //Disables the previous/next pages\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_ALL_OFF;\n }\n else if (lowDayCount == 0)\n {\n //Disables the previous page\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_PREVIOUS_OFF;\n }\n else if (highDayCount < 2)\n {\n //Disables the next page\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_NEXT_OFF;\n }\n else\n {\n //Enables the previous/next pages\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_ALL_ON;\n }\n }\n //When the next button is pushed\n else if (ReceivingInParameter.PROCESS_FLAG_NEXT_PAGE.equals(searchParam.get(PROCESS_FLAG)))\n {\n if (highDayCount <= 2)\n {\n //Disables the next page\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_NEXT_OFF;\n }\n else\n {\n //Enables the previous/next pages\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_ALL_ON;\n }\n }\n //When the previous button is pushed\n else if (ReceivingInParameter.PROCESS_FLAG_PREVIOUS_PAGE.equals(searchParam.get(PROCESS_FLAG)))\n {\n if (lowDayCount <= 2)\n {\n //Disables the previous page\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_PREVIOUS_OFF;\n }\n else\n {\n //Enables the previous/next pages\n btnControl = ReceivingOutParameter.BUTTON_CONTROL_FLAG_ALL_ON;\n }\n }\n return btnControl;\n }", "public void cancel() {\n writeData(ESC.CMD_CANCEL);\n }", "@Override\n public String getDescription() {\n return \"Ask order cancellation\";\n }", "private JButton getBok() {\n if( Bok == null ) {\n Bok = new JButton();\n Bok.setText(\"Ok\");\n Bok.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n ComboBoxEntry cbe;\n cbe = (ComboBoxEntry) getCBoxSourceLanguage().getSelectedItem();\n String sourceLanguageName = cbe.getLocale().getLanguage();\n boolean isSourceExternal = cbe.isExternal();\n \n cbe = (ComboBoxEntry) getCBoxTargetLanguage().getSelectedItem();\n String targetLanguageName = cbe.getLocale().getLanguage();\n boolean isTargetExternal = cbe.isExternal();\n boolean isTargetNew = cbe.isNew();\n \n startTranslation(\n sourceLanguageName, \n isSourceExternal, \n targetLanguageName,\n isTargetExternal,\n isTargetNew);\n }\n });\n }\n return Bok;\n }", "Button getBtn();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(cancel.getText());\n\t\t\t}", "public void onCancelButtonClick() {\n close();\n }", "public void uiVerifyButtonUndoExist() {\n try {\n getLogger().info(\"Verify button Undo Todo exist.\");\n btnToDoUndo.getAttribute(\"class\");\n NXGReports.addStep(\"Verify button Undo Todo exist.\", LogAs.PASSED, null);\n } catch (Exception ex) {\n getLogger().info(ex);\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"verify button Undo Todo exist.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "private JButton addCancelButton(){\n\t\tJButton cancelButton = new JButton(\"Cancel\");\n\n\t\tcancelButton.addActionListener(arg0 -> setVisible(false));\n\t\treturn cancelButton;\n\t}", "void okButtonClicked();", "private JButton getBtnCancelarDoc() {\r\n\t\tif (btnCancelarDoc == null) {\r\n\t\t\tbtnCancelarDoc = new JButton();\r\n\t\t\tbtnCancelarDoc.setBounds(new Rectangle(296, 237, 91, 21));\r\n\t\t\tbtnCancelarDoc.setText(\"Cancelar\");\r\n\t\t\tbtnCancelarDoc.setToolTipText(\"Cancelar documento pendente do aluno e fechar\");\r\n\t\t\tbtnCancelarDoc.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tdispose();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn btnCancelarDoc;\r\n\t}", "public void captureTransactionDetailsWithExitOkButton(String getPolicyNo) {\r\n\r\n captureTransactionDetails(getPolicyNo);\r\n sleep(10000);\r\n switchToFrameUsingElement(driver,\r\n driver.findElement(By.xpath(\"//iframe[contains(@src,'policyNo=\" + getPolicyNo + \"')]\")));\r\n invisibilityOfLoader(driver);\r\n ExtentReporter.logger.log(LogStatus.INFO,\r\n \"Click [OK]. Verify Policy folder shows a new number, Phase show Submission.\");\r\n click(driver, Exit_Ok, \"OK button\");\r\n sleep(2000);\r\n switchToParentWindowfromframe(driver);\r\n }", "public void cancel() {\n btCancel().push();\n }", "@Override\n public void onClick(View v)\n {\n int which = v.getId();\n \n if (which == R.id.burn)\n {\n \n }\n else if (which == R.id.cancel)\n {\n cancel();\n }\n }", "private BButton getBtnOK() {\r\n\t\tif (btnOK == null) {\r\n\t\t\tbtnOK = new BButton();\r\n\t\t\tbtnOK.setText(\"OK\");\r\n\t\t\tbtnOK.setPreferredSize(new Dimension(100, 29));\r\n\t\t}\r\n\t\treturn btnOK;\r\n\t}", "public static void setupCancelButton() {\n if (imageAdapter.getSelectedSize() == 0) {\n // always set to invisible\n cancel.hide();\n return;\n }\n // set button to be visible\n cancel.show();\n }", "@Override\n\tpublic String textoVerificarCancelar() {\n\t\treturn null;\n\t}", "@Override\n public String getDescription() {\n return \"Bid order cancellation\";\n }", "@Override\n public void onOkButtonClicked() {\n\n\n String reasonMsg1 = backToOrderView.editText.getText().toString();\n reasonMsg = reasonMsg1.trim();\n\n if (reasonMsg.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Please give reason...\", Toast.LENGTH_LONG).show();\n\n } else {\n\n\n // sendNotificationToUser(\"driver_cancel\");\n updateTripStatusApi(\"driver_cancel_at_pickup\", controller.pref.getTRIP_ID(), reasonMsg);\n\n\n }\n }", "private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }", "@Override\n public void onSureClick(String value) {\n tenPayPopWindow.dismiss();\n checkPresenterImpl.addTenPayPayment(cashierResult.bill.unpaid, value);\n }", "private javax.swing.JButton getBtnOK() {\r\n\tif (ivjBtnOK == null) {\r\n\t\ttry {\r\n\t\t\tivjBtnOK = new javax.swing.JButton();\r\n\t\t\tivjBtnOK.setName(\"BtnOK\");\r\n\t\t\tivjBtnOK.setText(\"OK\");\r\n\t\t\t// user code begin {1}\r\n\t\t\t// user code end\r\n\t\t} catch (java.lang.Throwable ivjExc) {\r\n\t\t\t// user code begin {2}\r\n\t\t\t// user code end\r\n\t\t\thandleException(ivjExc);\r\n\t\t}\r\n\t}\r\n\treturn ivjBtnOK;\r\n}", "pb4server.CancelCureSoliderAskReq getCancelCureSoliderAskReq();", "public String getText_click_Digital_coupons_button(){\r\n\t\treturn click_Digital_coupons_button.getText();\r\n\t}", "private void jButton_CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_CancelActionPerformed\n // TODO add your handling code here:\n }", "@Override\n\t\t\t\t public void onCancel() {\n\t\t\t\t\t errorMessage = \"You cancelled Operation\";\n\t\t\t\t\t getResponse();\n\t\t\t\t }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyCancelButtonOnElecYourDetails()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Elec meter read Your details Back button\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t.yourdetailsCancelButton();\n\t\t\n}", "@RequestMapping(value = \"/cancel\", method = RequestMethod.GET)\n public String cancel()\n {\n return \"cancel\";\n }", "public boolean isCancelButtonPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Cancel\"), SHORTWAIT);\r\n\t}", "@Test\n\tpublic void testClickOnCancelButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getCancelButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputNotApplied();\n\t}", "private JButton getCmdStop() {\r\n\t\tif (cmdStop == null) {\r\n\t\t\tcmdStop = new JButton();\r\n\t\t\tcmdStop.setText(\"\");\r\n\t\t\tcmdStop.setIcon(new ImageIcon(getClass().getResource(\"/Stop-48.png\")));\r\n\t\t\tcmdStop.setToolTipText(\"Stop all current operation.\");\r\n\t\t\tcmdStop.setEnabled(false);\r\n\t\t\tcmdStop.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tchkproxy.cancel(true);\r\n\t\t\t\t\tcmdStart.setEnabled(true);\r\n\t\t\t\t\tcmdPause.setEnabled(false);\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdStop;\r\n\t}", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onBtnClick() {\n dialog.dismiss();\n getMusicID(\"cancel\");\n }", "@Override\n\tpublic void onNegativeButtonClicked(int requestCode) {\n\n\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t\ttoastMessage(\"Bill Out Cancelled\");\n\t\t\t}", "public void submit_intsatpos(View button) {\n }", "@Override\r\n public void cancelMsg() {\n System.out.println(\"Transaction has been cancelled for gas pump #1..\");\r\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(), \"payment not confirmed\",\n Toast.LENGTH_SHORT).show();\n }", "private void cancel(ActionEvent e){\r\n // Clear textfields\r\n clearFields();\r\n // If coming from appt management screen, go back there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n // Otherwise, set the current client to null and go to the landing page \r\n else {\r\n currClient = null;\r\n LandingPage.returnToLandingPage();\r\n }\r\n }", "@Test\n\tpublic void checking_thirdalertbtn_withcancel()throws IOException, InterruptedException\n\t{\n\t\tgetlogin();\n\t\tSwitchtoPage sp=new SwitchtoPage(driver);\n\t\tsp.getswitchtolink().click();\n\t\tsp.getAlertlink().click();\n\t\tsp.getalTextbox().click();\n\t\tsp.getPrompt().click();\n \t Alert al=driver.switchTo().alert();\n \t al.dismiss();\n\t}", "public boolean CancelComputer()\n\t{\n\t\t//Click on Add a new Computer on Home Page to Navigate to Creation of Computer Page\n\t\tAddComputer.click();\n\t\t\n\t\t//Wait Time after each transaction\n\t\tWebDriverWait wait = new WebDriverWait(driver,2);\n\t\t\n\t\tboolean Cancelbutt = CancelButt.isEnabled();\n\t\treturn Cancelbutt;\n\t}", "public void onClick$cancelEditClientButton() {\n\t\tExecutions.sendRedirect(\"queryClients.zul\");\n\t}" ]
[ "0.69512486", "0.67548877", "0.66955876", "0.6620919", "0.6605942", "0.65614706", "0.65566945", "0.6393378", "0.6389032", "0.63798386", "0.6376244", "0.63753885", "0.63498837", "0.63414925", "0.63097423", "0.6287853", "0.62857646", "0.62708014", "0.62420094", "0.62383515", "0.62113786", "0.6208161", "0.6148652", "0.61358845", "0.6126608", "0.6125493", "0.6108695", "0.61018384", "0.6098277", "0.6096315", "0.60918736", "0.606062", "0.60552716", "0.60508794", "0.6049569", "0.6032118", "0.60300744", "0.6020366", "0.6014924", "0.59756166", "0.59673744", "0.5956921", "0.5949884", "0.5935597", "0.5934802", "0.5914625", "0.5877454", "0.58766526", "0.5861554", "0.5851897", "0.58464175", "0.58363074", "0.5827928", "0.5811208", "0.58099025", "0.5809719", "0.58053005", "0.58040357", "0.57855624", "0.5769292", "0.5768757", "0.5759756", "0.5754444", "0.5752787", "0.5711853", "0.57075757", "0.5704339", "0.57033235", "0.56957823", "0.56932396", "0.5680916", "0.5680244", "0.56624836", "0.56600034", "0.5659564", "0.5658819", "0.5655962", "0.564604", "0.56441945", "0.56337994", "0.56321687", "0.5629847", "0.56236196", "0.56217164", "0.5615651", "0.56087625", "0.56073433", "0.5601945", "0.5600136", "0.55965745", "0.55851775", "0.55811214", "0.5576327", "0.5574385", "0.5564805", "0.55586874", "0.5557605", "0.55536324", "0.55519664", "0.55435556" ]
0.78899306
0
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(ActivityLanguage.lang.equals("English")) { getCitizenCharterEnglish(); }else{ getCitizenCharter(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onBackPressed() { finish(); super.onBackPressed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
An assumption which was made was that when the cancel or x button was hit the user wanted to exit There progress up till then is saved
public static void main(String args[]) throws IOException { populateLists(); loadArrayList(); //boolean loggedIn; String selection=""; acceptLogin(); displayTopics(); //userXpLog(username.getText(),xPerience); // String info="Username:,XP:,"; // overwriteFile("UsersXP.txt",info); // loadXP(); if(loggedin) { // while(selection != null) //{ // selection = // overallScore += questionsAndScore(selection); // } //JOptionPane.showMessageDialog(null, "Your overall score was: "+overallScore, "Overall Score",1); System.out.println("updating ...."); updatexp(); // leaderboardGeneration(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }", "private void confirmExit () {\n\t\tint ret = JOptionPane.showConfirmDialog(this, \"Save game before exiting?\");\n\t\tif (ret == 0) {\n\t\t\tcloseAfterSave = true;\n\t\t\tEngine.requestSync();\n\t\t} else if (ret == 1) {\n\t\t\tkill();\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\n \t \tcheckSaveOnExit();\n \t }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (askUserYesNo(\"Do you really want to quit?\")) {\n if(askUserYesNo(\"Do you want to save game?\")){\n game.saveGame();\n }\n System.exit(0);\n }\n }", "private void promptToSaveBeforeClosing() {\r\n int userChoice = JOptionPane.showConfirmDialog(this,\r\n \"You have unsaved work. Would you like to save before exiting?\",\r\n \"Save before quitting?\",\r\n JOptionPane.YES_NO_CANCEL_OPTION);\r\n\r\n if (userChoice == JOptionPane.YES_OPTION) {\r\n String saveFile = graph.getFilename();\r\n if (saveFile == null || saveFile.length() == 0)\r\n saveFile = GraphIO.chooseSaveFile(graph.getFilename());\r\n GraphIO.saveGraph(graph, saveFile);\r\n }\r\n\r\n if (userChoice != JOptionPane.CANCEL_OPTION)\r\n dispose();\r\n }", "public void cancel() { Common.exitWindow(cancelBtn); }", "private static void checkSaveOnExit() {\n\t\tif(!saved && !config.isUpdateDB()) {\n \t\tint option = JOptionPane.showOptionDialog(frame,\n \t\t\t\t\"There are unsaved changes\\nDo you want to save them now?\",\n \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n \t\tswitch(option) {\n \t\tcase 0:\n \t\t\tportfolio.save(WORKING_FILE);\n \t\tcase 1:\n \t\t\tframe.dispose();\n \t\tdefault:\n \t\t\tbreak; \t \t\t\n \t\t}\n \t\tSystem.out.println(\"unsaved changes \" + option);\n \t} else {\n \t\tframe.dispose();\n \t}\n\t\t\n\t}", "private void confirmExit() {\n if (hasChanges()) {\n new AlertDialog.Builder(this).\n setMessage(R.string.dialog_discard_msg).\n setNegativeButton(R.string.dialog_discard_neg, (dialog, which) -> {}).\n setPositiveButton(R.string.dialog_discard_pos, (dialog, which) -> finish()).\n create().\n show();\n }\n else {\n showToast(R.string.toast_no_changes);\n finish();\n }\n }", "public void windowClosing(WindowEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }", "@Override\n public void onBackPressed() {\n if(!databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.STATE).equals(DatabaseHandler.FINISHED)) {\n new AlertDialog.Builder(this)\n .setTitle(\"Cancel experiment?\")\n .setCancelable(false)\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n return;\n }\n }).show();\n } else {\n finish();\n }\n }", "public void requestExit()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToExit = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToExit = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToExit)\r\n {\r\n // EXIT THE APPLICATION\r\n System.exit(0);\r\n }\r\n }", "private void onCancel() {\n System.exit(0);\r\n dispose();\r\n }", "private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}", "private void onCancelButtonPressed() {\r\n disposeDialogAndCreateNewGame(); // Reset board,\r\n game.setCanPlaceMarks(false); // But don't start a new game.\r\n }", "private void ExitProc()\r\n\t{\r\n\t\tint n = JOptionPane.showConfirmDialog(\r\n\t\t\t frame ,\r\n\t\t\t \"EXIT NOF FreeWare ???\",\r\n\t\t\t \"--NOF--\",\r\n\t\t\t JOptionPane.YES_NO_OPTION);\r\n\t\t\r\n\t\t//user pressed result.\r\n\t\tswitch (n) \r\n\t\t{\r\n\t\tcase 0: //yes\r\n\r\n\t\t\tframe.dispose();\r\n\t\t\tl = new log(\"event\",\"Exit Software\",\"Exit Pressed - Thank you for using NOF Software.\");\r\n\t\t\terase del = new erase(StStr); //StStr);\r\n\t\t\t//del.erase_output(StStr);\r\n\t\t\tSystem.exit(0); // Exit Program\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase 1: //no\r\n\t\t\tl = new log(\"event\",\"Exit_option\",\"Exit - have been canceled\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}", "private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {\r\n if (dataChanged) {\r\n /* Ask for confirmation by the user to save the information entered\r\n * in the database */\r\n int resultConfirm = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (resultConfirm == 0) {\r\n try {\r\n saveRolodexInfo();\r\n }catch(Exception e){\r\n releaseUpdateLock();\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else if (resultConfirm == 1) {\r\n dataSaved = false;\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }else {\r\n return;\r\n }\r\n }else{\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n \n }", "public boolean promptToSave()\r\n {\r\n // PROMPT THE USER TO SAVE UNSAVED WORK\r\n AnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI();\r\n int selection =JOptionPane.showOptionDialog(gui, \r\n PROMPT_TO_SAVE_TEXT, PROMPT_TO_SAVE_TITLE_TEXT, \r\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \r\n null, null, null);\r\n \r\n // IF THE USER SAID YES, THEN SAVE BEFORE MOVING ON\r\n if (selection == JOptionPane.YES_OPTION)\r\n {\r\n poseIO.savePose(currentFile, false);\r\n poseIO.savePoseImage(currentPoseName, poseID);\r\n saved = true;\r\n }\r\n \r\n // IF THE USER SAID CANCEL, THEN WE'LL TELL WHOEVER\r\n // CALLED THIS THAT THE USER IS NOT INTERESTED ANYMORE\r\n else if (selection == JOptionPane.CANCEL_OPTION)\r\n {\r\n return false;\r\n }\r\n\r\n // IF THE USER SAID NO, WE JUST GO ON WITHOUT SAVING\r\n // BUT FOR BOTH YES AND NO WE DO WHATEVER THE USER\r\n // HAD IN MIND IN THE FIRST PLACE\r\n return true;\r\n }", "public void cancel(){\n cancelled = true;\n }", "private void jButtonCancelActionPerformed() {\r\n\t\texit();\r\n\t}", "public void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\tcModel.saveData();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}", "private void cancel() {\n\t\tfinish();\n\t}", "public void cancelButton() {\n this.setMultQuestionSet(null);\n this.setSingleQuestionSet(null);\n this.setTextQuestionSet(null);\n this.setDateQuestionSet(null);\n System.out.println(\"Done pressing cancel button\");\n }", "private void dialogExit() {\n\t\tint result = showConfirmDialog(frmRentCalc, \"Вы действительно ходите выйти?\", \"Окно подтверждения\", YES_NO_OPTION, QUESTION_MESSAGE);\r\n\t\tif (result == YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t} else {\r\n\t\t\tif (result == NO_OPTION) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@FXML\n public void exit(){\n try {\n InventoryData.getInstance().storePartIdIndex();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Stage stage = (Stage) cancelButton.getScene().getWindow();\n stage.close();\n PassableData.setIsModifyPart(false);\n }", "@Override\n public void windowClosing(WindowEvent e) {\n synchronized(USER) {\n// USER[CANCELLED] = true;\n exit(1);\n }\n }", "private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}", "public void cbNext2_actionListener(ActionEvent actionEvent) throws IdeamException{\n boolean continuar = true;\n if(continuar){ \n this.save(); \n } \n }", "private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }", "public void actionPerformed(java.awt.event.ActionEvent evt) {\n if (!askSave()) {\n return;\n }\n setSaveTitle(\"*untilted\");\n text.setText(\"\");\n file = null;\n }", "public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t\t}\n\t\t\t\t}", "public void cancelTask() {\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save?\", null,\r\n JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTask();\r\n }\r\n todoListGui();\r\n }", "private void exitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitButtonActionPerformed\n saveDataToFile();\n System.exit(0);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "private void exitListener() {\n buttonPanel.getQuit().addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n toDoList.saveAll(fileLocation);\n System.exit(0);\n }\n });\n }", "public void handleExit(){\n if(JOptionPane.showConfirmDialog(null,\"Do you really wanna exit\",\"Confirm\",JOptionPane.WARNING_MESSAGE,\n JOptionPane.YES_OPTION)==JOptionPane.YES_OPTION){System.exit(0);}\n else{\n return;\n }\n\n\n\n }", "private void performWindowClosing() {\r\n if (dataChanged) {\r\n try {\r\n int result = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (result == JOptionPane.YES_OPTION) {\r\n saveRolodexInfo();\r\n }else if (result == JOptionPane.NO_OPTION){\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }catch(Exception e){\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else {\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.out.println(\"Window Closing\");\n\t\t\t\tcheckSaveOnExit();\n\t\t\t}", "@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "public void cancelOperation() {\n\n System.out.println(\"Sorry, a problem occurred, deposit money operation is unsuccessful\");\n System.out.println(\"Current information : \");\n while (!storage.isEmpty()) {\n Command command = storage.pop();\n command.undo();\n }\n }", "@Override\n public boolean canBeTerminatedNow() {\n logger.debug(\"OifitsExplorerGui.finish() handler called.\");\n\n // Can't exit if a job is running\n if (IRModelManager.getInstance().getIRModel().isRunning()) {\n MessagePane.showMessage(\"A job is running... Please wait for its completion or cancel it before quitting.\");\n return false;\n }\n\n // Ask the user if he wants to save modifications\n //@TODO replace by code when save will be available.\n MessagePane.ConfirmSaveChanges result = MessagePane.ConfirmSaveChanges.Ignore;\n //MessagePane.ConfirmSaveChanges result = MessagePane.showConfirmSaveChangesBeforeClosing();\n\n // Handle user choice\n switch (result) {\n // If the user clicked the \"Save\" button, save and exit\n case Save:\n /*\n if (this.saveAction != null) {\n return this.saveAction.save();\n }\n */\n break;\n\n // If the user clicked the \"Don't Save\" button, exit\n case Ignore:\n break;\n\n // If the user clicked the \"Cancel\" button or pressed 'esc' key, don't exit\n case Cancel:\n default: // Any other case\n return false;\n }\n\n return true;\n }", "private void btnCancelActionPerformed(ActionEvent e) {\n processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you want to leave us behind, my liege?\", \"Close?\", JOptionPane.YES_NO_OPTION);\n\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n\t}", "public void quitAndSave(final View v) {\n mPhraseCollection.setListTitle(((EditText) findViewById(R.id.edit_list_title)).getText().toString());\n\n // Open layout with ProgressBar while we are processing DriveFile\n setContentView(R.layout.activity_circle);\n\n\t\t// Open a new Thread to save the file and exit back to ListSelectionActivity\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (mPhraseCollection.writeChangesToDrive((EditListActivity)v.getContext())) {\n // Open new Intent to create Bundle to pass back to ListSelectionActivity\n Intent rIntent = new Intent();\n rIntent.putExtra(\"PhraseCollection\", mPhraseCollection);\n rIntent.putExtra(\"position\", mPosition);\n setResult(RESULT_CODE_SAVE, rIntent);\n finish();\n } else {\n // TODO Display error to user when writing changes to Drive is unsuccessful\n }\n\t\t\t}\n\t\t}).start();\n\t}", "public void beforeExit (){\n\t\tsynchronized (this){\n\t\t\tsetChanged ();\n\t\t\tnotifyObservers (ObserverCodes.APPLICATIONEXITING);\n\t\t}\n\t\tUserSettings.getInstance ().storeProperties ();\n\t\t\n\t\tcloseActiveStoreData ();\n\t\t\n\t\tActionPool.getInstance ().getProjectSaveAction ().execute ();\n\t\t/* Forza chiusura logger. */\n\t\t_logger.close ();\n\t}", "public void toExit() {\n int sure=JOptionPane.showConfirmDialog(rootPane,\"Are you sure to Exit?\");\n if(sure==JOptionPane.YES_OPTION)\n { \n System.exit(0);\n } \n }", "protected void exitSafely() {\n for (int i = 0, numberOfTabs = tabs.getTabCount(); i < numberOfTabs; i++) {\n DocumentTab selectedDocument = (DocumentTab)tabs.getComponentAt(i);\n if (selectedDocument.isModified()) {\n tabs.setSelectedIndex(i);\n int answer = JOptionPane.showConfirmDialog(\n appWindow,\n \"File \" + selectedDocument.getName() + \" is modified.\\n\" +\n \"Do you want to save the file before closing?\",\n \"Warning\",\n JOptionPane.YES_NO_CANCEL_OPTION,\n JOptionPane.WARNING_MESSAGE);\n if (answer == JOptionPane.CANCEL_OPTION) {\n return;\n } else if (answer == JOptionPane.YES_OPTION) {\n saveCurrentTab(SaveMode.SAVE);\n }\n }\n }\n\n appWindow.dispose();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n System.exit(1);\n }", "private void performWindowClosing() {\r\n if(getFunctionType() != TypeConstants.DISPLAY_MODE){\r\n if( isSaveRequired() ){\r\n int option = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n switch( option ){\r\n case ( JOptionPane.YES_OPTION ):\r\n try{\r\n saveRatesData();\r\n }catch (CoeusUIException coeusUIException){\r\n //Validation failed\r\n }\r\n break;\r\n case ( JOptionPane.NO_OPTION ):\r\n cleanUp();\r\n dlgRates.dispose();\r\n break;\r\n }\r\n }else{\r\n dlgRates.dispose();\r\n }\r\n }else{\r\n dlgRates.dispose(); \r\n }\r\n \r\n }", "public boolean cancel();", "public boolean checkCancel() {\r\n\t\t\r\n\t\treturn cancel ;\r\n\t\t\t\t\r\n\t}", "public void quit() {\n model.updateFile();\n }", "private void exitWithoutSave()\n {\n String reply = \"\";\n Scanner console = new Scanner(System.in);\n \n do\n {\n boolean valid = false;\n while (!valid)\n {\n System.out.print(\"\\t\\tSo, you want to exit without saving your changes?(y/n) \");\n reply = console.nextLine().trim().toLowerCase();\n valid = validation.checkNoBlank(reply);\n }\n reply = reply.substring(0, 1);\n if (reply.equals(\"y\"))\n exitRegards();\n else\n if (reply.equals(\"n\"))\n return; \n else\n System.out.println(\"\\t\\tPlease enter your answer again (y/n) \");\n }while (!reply.equals(\"n\") && !reply.equals(\"y\")); \n }", "public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent Event) {\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tint reply = JOptionPane.showConfirmDialog(null, getPanel(), \"Exit\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (reply == JOptionPane.NO_OPTION)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t System.exit(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}", "public void stop(boolean save) {}", "public void finish(){\n \t\tString congrats=\"Congratulations, you won in \" + model.getNumberOfSteps()+\" steps! \";\n \t\tJFrame frame = new JFrame();\n\t\tString[] options = new String[2];\n\t\toptions[0] = new String(\"Play again\");\n\t\toptions[1] = new String(\"Quit\");\n\t\tint result= JOptionPane.showOptionDialog(frame.getContentPane(),congrats,\"Won! \", 0,JOptionPane.INFORMATION_MESSAGE,null,options,null);\n\t\tif (result == JOptionPane.NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tif (result == JOptionPane.YES_OPTION) {\n\t\t\t\t\tcontroller.reset(); }\n \t}", "public void cancel()\n\t{\n\t}", "public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tint salir = JOptionPane.showConfirmDialog(null, \"Deseas finalizar el Juego? \", \"Salir\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\n\t\t\t\tif (salir == 0) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} else\n\t\t\t\t\t;\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdialogExit();\r\n\t\t\t}", "public void actionPerformed(ActionEvent ae) {\n controller.beforeQuit();\n System.exit(-1);\n }", "public int windowClosing() {\n if(changed) {\n current = this;\n return JOptionPane.showConfirmDialog(null, \"Do you want to save changes to \" + name + \"?\"); \n }\n return 1;\n }", "private boolean exit(Stage primaryStage) {\n Alert closeConfirmation =\n new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to exit?\");\n Button saveButton = (Button) closeConfirmation.getDialogPane().lookupButton(ButtonType.OK);\n saveButton.setText(\"Save & Exit\");\n closeConfirmation.setHeaderText(\"Confirm Exit\");\n closeConfirmation.initModality(Modality.APPLICATION_MODAL);\n closeConfirmation.initOwner(primaryStage);\n closeConfirmation.getButtonTypes().setAll(ButtonType.YES, ButtonType.OK, ButtonType.CANCEL);\n\n Optional<ButtonType> closeResponse = closeConfirmation.showAndWait();\n if (ButtonType.OK.equals(closeResponse.get())) {\n Stage saveStage = new Stage();\n FileChooser chooser = new FileChooser();\n chooser.getExtensionFilters().add(new ExtensionFilter(\"Text File\", \"*.txt\"));\n File saveFile = chooser.showSaveDialog(saveStage);\n if (saveFile != null) {\n socialNetwork.saveToFile(saveFile);\n ((Labeled) ((VBox) statsBox.getChildren().get(0)).getChildren().get(1))\n .setText(\"Save file written succesfully\");\n }\n Platform.exit();\n }\n if (ButtonType.YES.equals(closeResponse.get())) {\n Platform.exit();\n } else {\n return false;\n }\n return true;\n }", "private int askUserForSaveFile()\n {\n final JOptionPane optionPane = new JOptionPane(this.dialogExitMessage,\n JOptionPane.CLOSED_OPTION, JOptionPane.YES_NO_CANCEL_OPTION, this.dialogExitIcon);\n dialogFactory.showDialog(optionPane, this.dialogExitTitle, true);\n final int decision = getOptionFromPane(optionPane);\n return decision;\n }", "public abstract boolean cancel();", "public void cancel() {\n\t\tcancelled = true;\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t\t\tSystem.exit(0);\r\n\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (getIntent().getExtras() != null && getIntent().getExtras().getBoolean(\"EXIT\", false)) {\n setResult(0);\n finishAndRemoveTask();\n } else {\n finishAndRemoveTask();\n }\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n unsavedChanges = false;\n //continue with back button\n onBackPressed();\n }", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "private void actionCancel() {\n\t\tselectedDownload.cancel();\n\t\tupdateButtons();\n\t}", "void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }", "@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n if (v == save_data) {\n saveData();\n } else if (v == cancel) {\n exit();\n }\n }", "public boolean backPressedSimple(){\n String title = \"Save?\";\n String msg = \"Do you want to save the note before exit?\";\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext(), R.style.AppDialogTheme);\n builder.setTitle(title);\n if (StaticFields.darkThemeSet) {\n builder.setIcon(R.drawable.dialog_warning_dark);\n }else{\n builder.setIcon(R.drawable.dialog_warning);\n }\n builder.setMessage(msg);\n builder.setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n if (!noteTitle.getText().toString().isEmpty()) {\n exit = true;\n //save the data\n StaticFields.noteTitle = noteTitle.getText().toString();\n StaticFields.noteContent = noteContent.getText().toString();\n getActivity().onBackPressed();\n }else{\n new PortableContent(getContext()).showSnackBar(Type.WARNING,\"Title can't be empty.\",\n Duration.SHORT);\n }\n }\n });\n builder.setNegativeButton(\"Discard\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n exit = true;\n StaticFields.noteTitle = StaticFields.noteContent = \"\";\n getActivity().onBackPressed();\n }\n });\n if (!exit) {\n builder.show();\n }\n return exit;\n }", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\n\t\t\t}", "protected void actionPerformedCancel ()\n {\n Preferences rootPreferences = Preferences.systemRoot ();\n PreferencesTableModel rootPrefTableModel = new PreferencesTableModel (rootPreferences);\n rootPrefTableModel.undo ();\n Preferences userPreferences = Preferences.userRoot ();\n PreferencesTableModel userPrefTableModel = new PreferencesTableModel (userPreferences);\n userPrefTableModel.undo ();\n this.setVisible (false);\n this.dispose ();\n }", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //release_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "@FXML\n\tprivate void cancelButtonAction(ActionEvent clickEvent) throws IOException {\n\t\t\n\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will exit to the Main Screen without Saving input.\\n\\n\" + \"Are you sure you want to exit?\");\n\t\t\n\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\tString buttonId = ((Button)clickEvent.getSource()).getId();\n\t\t\tSceneSelector.loadScene(buttonId);\n\t\t}\n\t}", "public void onSaveButtonClick(ActionEvent e){\n\t\tsaveFile(false);\n\t}", "@Override\n public void onPositiveClick() {\n quitThisActivity();\n }", "public void cancelButtonPressed(ActionEvent event) throws IOException {\n returnToMainScreen(event);\n }", "private void closeProgram() {\n\t\tSystem.out.println(\"Cancel Button clicked\");\n\t\tif (ConfirmBox.display( \"Exit\", \"Are you sure you want to exit?\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "protected boolean requestClose()\n\t{\n\t\t\n\t\tif (!dirty.get())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tString filename = getFile() == null ? \"Untitled\" : getFile().getName();\n\t\tString filepath = getFile() == null ? \"\" : getFile().getAbsolutePath();\n\t\t\n\t\tAlertWrapper alert = new AlertWrapper(AlertType.CONFIRMATION)\n\t\t\t\t.setTitle(filename + \" has changes\")\n\t\t\t\t.setHeaderText(\"There are unsaved changes. Do you want to save them?\")\n\t\t\t\t.setContentText(filepath + \"\\nAll unsaved changes will be lost.\");\n\t\talert.getButtonTypes().setAll(ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);\n\t\t\n\t\talert.showAndWait();\n\t\t\n\t\tif (alert.getResult() == ButtonType.YES)\n\t\t{\n\t\t\tboolean success = save();\n\t\t\t\n\t\t\tif (!success)\n\t\t\t{\n\t\t\t\tAlertWrapper errorAlert = new AlertWrapper(AlertType.ERROR)\n\t\t\t\t\t\t.setTitle(\"Couldn't save file!\")\n\t\t\t\t\t\t.setHeaderText(\"There was an error while saving!\")\n\t\t\t\t\t\t.setContentText(\"The file was not closed.\");\n\t\t\t\t\n\t\t\t\terrorAlert.showAndWait();\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (alert.getResult() == ButtonType.CANCEL)\n\t\t\treturn false; // A false return value is used to consume the closing event.\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public boolean checkCancel() {\r\n\t\t\r\n\t\treturn cancel;\r\n\t\t\t\t\r\n\t}", "public void exitRoutine() {\n\t\tboardController.saveSampleData();\n\t}", "@Override\n public void cancel() {\n super.cancel();\n\n /** Flag cancel user request\n */\n printingCanceled.set(true);\n\n /** Show a warning message\n */\n JOptionPane.showMessageDialog( MainDemo.this , \"Lorem Ipsum printing task canceled\", \"Task canceled\" , JOptionPane.WARNING_MESSAGE );\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}" ]
[ "0.7566181", "0.7394273", "0.7038669", "0.689356", "0.675776", "0.6743908", "0.67160255", "0.6671648", "0.6639801", "0.6569783", "0.6568802", "0.65327895", "0.65116465", "0.6503363", "0.64992917", "0.64963424", "0.6461682", "0.64012", "0.64009035", "0.6379099", "0.6354145", "0.63503826", "0.6334731", "0.63209474", "0.6314259", "0.6310956", "0.6300208", "0.62980634", "0.62955475", "0.62910956", "0.6288534", "0.6286225", "0.62739044", "0.6264111", "0.62586683", "0.62162215", "0.62001795", "0.6195506", "0.61904585", "0.6179589", "0.61657673", "0.61597914", "0.6156089", "0.61432135", "0.6140341", "0.6126661", "0.6116211", "0.6113856", "0.6106543", "0.6097784", "0.60858834", "0.6074177", "0.6066152", "0.6056749", "0.6050823", "0.6043088", "0.6038667", "0.60368663", "0.60270387", "0.6021797", "0.6019262", "0.6019178", "0.60180527", "0.60133106", "0.6013205", "0.6012148", "0.60101897", "0.6008501", "0.60022384", "0.6002112", "0.59988225", "0.59963596", "0.5994768", "0.5990468", "0.59870005", "0.5983652", "0.59801793", "0.5974825", "0.5970098", "0.5963476", "0.596013", "0.59569967", "0.59569967", "0.59569967", "0.59569967", "0.59569967", "0.59569967", "0.59534377", "0.59484035", "0.59454", "0.5943468", "0.5940545", "0.593842", "0.59358513", "0.5925466", "0.5924336", "0.5924025", "0.5921519", "0.59211725", "0.59202844", "0.59202844" ]
0.0
-1
Method to display the topics, only topics which have at least one question is generated
public static String displayTopics()throws IOException { try{ String selection; ArrayList<String> options = new ArrayList<String>(); //Arraylist to hold the topics which have questions attached String[] actualTopics; //JOptionPane requires an array, arraylist is later transfered into this array for(int i=0; i<topicsMenu.size(); i++) { if(questionsExists(topicsMenu.get(1).get(i)))//if the topic has questions then add it to the list of topics options.add(topicsMenu.get(1).get(i)); } actualTopics = convertToArray(options); selection = (String) JOptionPane.showInputDialog(null, "Choose a task to do","Task Manager",1, null, actualTopics, actualTopics[0]); validateInput(selection,""); if (selection.equals(actualTopics[0]))displaygame(); if (selection.equals(actualTopics[1]))displayQuizTopics(); return selection; } catch(NullPointerException e){acceptLogin();}return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasTopicView();", "public void topicsAdvertisedByPub() {\r\n int index = 1;\r\n System.out.println(\"Topics advertised by this publisher: \");\r\n for(Topic topic: pubTopics){\r\n System.out.println(index + \"->\" + topic + \"\\n\");\r\n index++;\r\n }\r\n }", "@GetMapping(\"/displaytopics\")\n\tpublic List<Topics> displayTopics() throws Exception {\n\n\t\tList<Topics> topicsList = topicsDAO.displayTopics();\n\t\treturn topicsList;\n\t}", "public Set<Topic> getTopics();", "boolean hasTopic();", "public boolean hasTopic() {\r\n return false;\r\n }", "@Override\n\tpublic Response topics() {\n\t\tList<Topic> topics = null;\n\t\ttry {\n\t\t\ttopics = userResourceAccess.getTopicsForUser(getUser());\n\t\t} catch (GovernanceExeption e) {\n\t\t\te.printStackTrace();\n\t\t\treturn error(Status.INTERNAL_SERVER_ERROR, \"Can not get topics\");\n\n\t\t}\n\n\t\tCollection<org.ow2.play.governance.platform.user.api.rest.bean.Topic> out = Collections2\n\t\t\t\t.transform(\n\t\t\t\t\t\ttopics,\n\t\t\t\t\t\tnew Function<Topic, org.ow2.play.governance.platform.user.api.rest.bean.Topic>() {\n\t\t\t\t\t\t\tpublic org.ow2.play.governance.platform.user.api.rest.bean.Topic apply(\n\t\t\t\t\t\t\t\t\tTopic input) {\n\t\t\t\t\t\t\t\torg.ow2.play.governance.platform.user.api.rest.bean.Topic topic = new org.ow2.play.governance.platform.user.api.rest.bean.Topic();\n\t\t\t\t\t\t\t\ttopic.name = input.getName();\n\t\t\t\t\t\t\t\ttopic.ns = input.getNs();\n\t\t\t\t\t\t\t\ttopic.prefix = input.getPrefix();\n\t\t\t\t\t\t\t\ttopic.resourceUrl = getResourceURI(input);\n\t\t\t\t\t\t\t\treturn topic;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\n\t\treturn ok(out\n\t\t\t\t.toArray(new org.ow2.play.governance.platform.user.api.rest.bean.Topic[out\n\t\t\t\t\t\t.size()]));\n\t}", "private void convertTopics() throws Exception {\r\n final File file = new File(TOPICS);\r\n if(!file.exists()) {\r\n Main.outln(\"Could not read \\\"\" + file.getAbsolutePath() + \"\\\"\");\r\n return;\r\n }\r\n \r\n // scan all queries\r\n final FileInputStream fis = new FileInputStream(file);\r\n final InputStreamReader isr = new InputStreamReader(fis, \"UTF8\");\r\n final BufferedReader br = new BufferedReader(isr);\r\n String line = null;\r\n String t = \"\";\r\n String ty = \"\";\r\n \r\n final PrintOutput out = new PrintOutput(QUERIES);\r\n while((line = br.readLine()) != null) {\r\n if(line.indexOf(\"topic ct_no\") > -1) {\r\n // extract topic id\r\n int s0 = line.indexOf('\"');\r\n int s1 = line.indexOf('\"', s0 + 1);\r\n t = line.substring(s0 + 1, s1);\r\n // extract content id\r\n s0 = line.indexOf('\"', s1 + 1);\r\n s1 = line.indexOf('\"', s0 + 1);\r\n //ca = line.substring(s0 + 1, s1);\r\n // extract type\r\n s0 = line.indexOf('\"', s1 + 1);\r\n s1 = line.indexOf('\"', s0 + 1);\r\n ty = line.substring(s0 + 1, s1);\r\n } else if(line.indexOf(\"xpath_title\") > -1) {\r\n // extract query\r\n final int s0 = line.indexOf('/');\r\n final String q = line.substring(s0, line.lastIndexOf('<'));\r\n out.println(t + \";\" + c + \";\" + ty + \";\" + q);\r\n }\r\n }\r\n br.close();\r\n }", "@Override\r\n\tpublic int countTopics() {\n\t\treturn 0;\r\n\t}", "public String[] getTopics() {\n\t\treturn null;\n\t}", "public void displayTopics(int level)\r\n\t{\r\n\t\tflipper.setDisplayedChild(flipper.indexOfChild(findViewById(R.layout.topicselection_topics)));\r\n\t\tLog.d(TAG, \"Displaying topics for level \" + level);\r\n\r\n\t\tfinal ArrayList<Topic> topics = Topic.getTopics(level);\r\n\r\n\t\tLinearLayout topicmain = (LinearLayout) flipper.findViewById(R.id.topicselection_topics);\r\n\t\tfinal ListView topiclist = (ListView) topicmain.findViewById(android.R.id.list);\r\n\t\ttopiclist.setAdapter(new ArrayAdapter<Topic>(this, R.layout.topicselection_topic_row, topics));\r\n\r\n\t\t// List items will end the activity and pass the selected item in to the\r\n\t\t// intent extra when pressed\r\n\t\ttopiclist.setOnItemClickListener(new OnItemClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> a, View v, int i, long l)\r\n\t\t\t{\r\n\t\t\t\tArrayList<Topic> selectedTopics = new ArrayList<Topic>();\r\n\t\t\t\tselectedTopics.add((Topic) topiclist.getItemAtPosition(i));\r\n\r\n\t\t\t\tIntent resultIntent = new Intent();\r\n\t\t\t\tresultIntent.putExtra(SELECTED_TOPICS, selectedTopics);\r\n\r\n\t\t\t\tsetResult(Activity.RESULT_OK, resultIntent);\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton mixedButton = (Button) findViewById(R.id.mixtest);\r\n\t\t// Don't display the All Topics button if told not to by parent activity\r\n\t\tif (displayMixedButton == false)\r\n\t\t{\r\n\t\t\tmixedButton.setVisibility(View.GONE);\r\n\t\t}\r\n\r\n\t\t// The mixed button adds all items in the current list and finishes the\r\n\t\t// activity, passing the topics in to the SELECT_TOPICS intent extra\r\n\t\tmixedButton.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v)\r\n\t\t\t{\r\n\t\t\t\tArrayList<Topic> selectedTopics = new ArrayList<Topic>();\r\n\t\t\t\tfor (int i = 0; i < topiclist.getCount(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tselectedTopics.add((Topic) topiclist.getItemAtPosition(i));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tIntent resultIntent = new Intent();\r\n\t\t\t\tresultIntent.putExtra(SELECTED_TOPICS, selectedTopics);\r\n\r\n\t\t\t\tsetResult(Activity.RESULT_OK, resultIntent);\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void printQuestions() {\n\t\tif (this.questions.size() == 0) {\n\t\t\tSystem.out.println(\"Sorry. There are no questions in this quiz.\");\n\t\t} else {\n\t\t\tfor (Question q : this.questions) {\n\t\t\t\tSystem.out.println(q.getText());\n\t\t\t}\n\t\t}\n\t}", "public List<Topic> getAllTopics() {\n\t\tlogger.info(\"getAllTopics executed\");\n\t\t//return topics;\n\t\tList<Topic> topics = new ArrayList<Topic>();\n\t\ttopicRepository.findAll().forEach(topics::add);\n\t\treturn topics;\n\t}", "public Collection<Topic> getMostPopularTopics() {\n return gameRepository.getMostPopularTopics();\n }", "@Override\n\tpublic List<TopicSummary> getSubTopics(String topic) {\n\t\treturn null;\n\t}", "public void displayQuestions(){\n\t\t//create a string which would be displayed in the question label\n\t\tString q = currentNode.getData().toString();\n\t\t//set text question Label\n\t\tquestions.setText(q);\n\t}", "@RequestMapping(\"/topics\")\r\n\t\r\n\t// Returns all topics created from'TopicService' class\r\n\tpublic List<Topic> getAllTopics() {\r\n\t\treturn topicService.getAllTopics();\r\n\t}", "public void sortByTopic() {\r\n\t\tfor (int i = 1; i < displayingList.size(); i++) {\r\n\t\t\tQuestion temp = displayingList.get(i);\r\n\t\t\tfor (int j = i - 1; j >= 0; j--) {\r\n\t\t\t\tif (String.CASE_INSENSITIVE_ORDER.compare(temp.getTopic(), displayingList.get(j).getTopic()) < 0) {\r\n\t\t\t\t\tdisplayingList.set(j + 1, displayingList.get(j));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdisplayingList.set(j + 1, temp);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tdisplayingList.set(j, temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@GetMapping(value = \"/topics\")\n public String getKafkaTopics() {\n return ksqlService.retrieveTopics();\n }", "String getTopic();", "String getTopic();", "@RequestMapping(value = \"/topics\", method = RequestMethod.GET)\n public String topicsList(ModelMap model, HttpSession session) {\n\t String userCode = session.getAttribute(\"currentUserCode\").toString();\n\t String userRole = session.getAttribute(\"currentUserRole\").toString();\n\t List<mStaff> staffs = staffService.listStaffs();\n\t HashMap<String, String> mStaffCode2Name = new HashMap<String, String>();\n\t for(mStaff st: staffs)\n\t\t mStaffCode2Name.put(st.getStaff_Code(), st.getStaff_Name());\n\t \n\t List<mTopics> topicsList = tProjectService.loadTopicListByStaff(userRole, userCode);\n\t System.out.println(name() + \"::topicsList\"\n\t \t\t+ \", staffs.sz = \" + staffs.size() + \", topicsList.sz = \" + topicsList.size());\n\t for(mTopics p: topicsList){\n\t\t p.setPROJDECL_User_Code(mStaffCode2Name.get(p.getPROJDECL_User_Code()));\n\t\t System.out.println(name() + \"::topicsList, userName = \" + p.getPROJDECL_User_Code());\n\t }\n\t \n\t model.put(\"topicsList\", topicsList);\n\t model.put(\"topics\", status);\n\t return \"cp.topics\";\n }", "public List<Topic> getAllReadableTopics() {\n if (fullTextSearch.trim().isEmpty()) {\n Collections.sort(searchState.getReadableTopics());\n return searchState.getReadableTopics();\n } else {\n List<Topic> topicsWithSearchTerm = new ArrayList<>();\n for (Topic t : searchState.getReadableTopics()) {\n for (Posting p : t.getPostings()) {\n if (p.getText().toLowerCase().contains(fullTextSearch.toLowerCase())) {\n if (!topicsWithSearchTerm.contains(t)) {\n topicsWithSearchTerm.add(t);\n }\n }\n }\n }\n if (!topicsWithSearchTerm.contains(activeTopic)) {\n activeTopic = null;\n }\n Collections.sort(topicsWithSearchTerm);\n return topicsWithSearchTerm;\n }\n }", "public List<TXSemanticTag> getAllTopics();", "public void printQuestions()\r\n\t{\r\n\t\tfor(int i = 0; i < questions.size(); i++)\r\n\t\t{\r\n\t\t\tString q = questions.get(i).toString();\r\n\t\t\tSystem.out.println( (i+1) + \". \" + q);\r\n\t\t}\r\n\t}", "public List<Topic> getAllTopics() {\n\t\treturn topics;\n\t}", "public void listSubscribedTopics() {\r\n for (Topic topic : subscriberTopics){\r\n System.out.print(topic);\r\n }\r\n }", "@RequestMapping(value = { \"/topics\"}, \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Topic>> getTopics() {\n\t\tList<Topic> topics = daoService.getAllItem(new Topic());\n\n\t\treturn new ResponseEntity<List<Topic>>(topics, HttpStatus.OK);\n\t}", "public static Set<TopicBean> loadAllTopics(boolean onlyBasicInfo) {\r\n\t\tDBCollection topicsColl = getCollection(TOPICS_COLLECTION);\r\n\t\ttopicsColl.ensureIndex(new BasicDBObject(\"views\", 1));\r\n\t\t\r\n\t\tDBObject query = new BasicDBObject(\"deleted\", new BasicDBObject(\"$ne\", true));\r\n\t\tList<DBObject> topicsDBList = null;\r\n\t\tif (onlyBasicInfo) {\r\n\t\t\tDBObject fields = BasicDBObjectBuilder.start()\r\n\t\t\t\t.add(\"title\", 1)\r\n\t\t\t\t.add(\"fixed\", 1)\r\n\t\t\t\t.add(\"deleted\", 1)\r\n\t\t\t\t.add(\"main_url\", 1)\r\n\t\t\t\t.add(\"bitly\", 1)\r\n\t\t\t\t.add(\"views\", 1)\r\n\t\t\t\t.add(\"cr_date\", 1)\r\n\t\t\t\t.get();\r\n\t\t\t\r\n\t\t\ttopicsDBList=new ArrayList<DBObject>();//topicsDBList = topicsColl.find(query, fields).sort(new BasicDBObject(\"views\", -1)).toArray();\r\n\t\t\tDBCursor topicCur=topicsColl.find(query, fields).sort(new BasicDBObject(\"views\", -1));\r\n\t\t\twhile(topicCur.hasNext()){\r\n\t\t\t\ttopicsDBList.add(topicCur.next());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttopicsDBList=new ArrayList<DBObject>();//topicsDBList = topicsColl.find(query).sort(new BasicDBObject(\"views\", -1)).toArray();\r\n\t\t\tDBCursor topicCur= topicsColl.find(query).sort(new BasicDBObject(\"views\", -1));\r\n\t\t\twhile(topicCur.hasNext()){\r\n\t\t\t\ttopicsDBList.add(topicCur.next());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSet<TopicBean> topicsSet = new LinkedHashSet<TopicBean>();\r\n\t\tfor (DBObject topicDBObject : topicsDBList) {\r\n\t\t\tTopicBean topic = new TopicBean();\r\n\t\t\tif (onlyBasicInfo) {\r\n\t\t\t\ttopic.parseBasicFromDB(topicDBObject);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttopic.parseFromDB(topicDBObject);\r\n\t\t\t}\r\n\t\t\ttopicsSet.add(topic);\r\n\t\t}\r\n\t\treturn topicsSet;\r\n\t}", "@Test(priority = 19)\n\tpublic void testTopicsLists_From_Topic_0_10_OnAlQuranPage() throws Exception {\n\t\tSystem.out.println(\"<------Testing Topics Lists From_Topic_0_10 On Al-Quran Page------->\\n\");\n\t\ttestTopics_chunk_wise(0, 10);\n\t}", "public String getTopic() {\n return this.topic;\n }", "public String getTopic() {\n return topic;\n }", "public static Set<TopicBean> loadAllTopicsByName(boolean onlyBasicInfo) {\r\n\t\tDBCollection topicsColl = getCollection(TOPICS_COLLECTION);\r\n\t\t//topicsColl.ensureIndex(new BasicDBObject(\"views\", 1));\r\n\t\tDBObject query = new BasicDBObject(\"deleted\", new BasicDBObject(\"$ne\", true));\r\n\t\tDBCursor topicCur;\r\n\t\tif (onlyBasicInfo) {\r\n\t\t\tDBObject fields = BasicDBObjectBuilder.start()\r\n\t\t\t\t.add(\"title\", 1)\r\n\t\t\t\t.add(\"fixed\", 1)\r\n\t\t\t\t.add(\"deleted\", 1)\r\n\t\t\t\t.add(\"main_url\", 1)\r\n\t\t\t\t.add(\"bitly\", 1)\r\n\t\t\t\t.add(\"views\", 1)\r\n\t\t\t\t.add(\"cr_date\", 1)\r\n\t\t\t\t.get();\r\n\t\t\ttopicCur=topicsColl.find(query, fields).sort(new BasicDBObject(\"title\", 1));\r\n\t\t} else {\r\n\t\t\ttopicCur= topicsColl.find(query).sort(new BasicDBObject(\"title\", 1));\r\n\t\t}\r\n\t\tSet<TopicBean> topicsSet = new LinkedHashSet<TopicBean>();\r\n\t\twhile(topicCur.hasNext()){\r\n\t\t\tTopicBean topic = new TopicBean();\r\n\t\t\tif (onlyBasicInfo) {\r\n\t\t\t\ttopic.parseBasicFromDB(topicCur.next());\r\n\t\t\t} else {\r\n\t\t\t\ttopic.parseFromDB(topicCur.next());\r\n\t\t\t}\r\n\t\t\ttopicsSet.add(topic);\r\n\t\t}\r\n\t\treturn topicsSet;\r\n\t}", "@Override\n\tpublic List<Topic> getTopics(String categoryId, String forumId)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "public String getTopic() {\n return topic;\n }", "public String getTopic() {\r\n return null;\r\n }", "public Topic getTopic() {\n return topic;\n }", "public forum.ExistingTopics getAllTopics(com.google.protobuf.Empty request) {\n return blockingUnaryCall(\n getChannel(), getGetAllTopicsMethod(), getCallOptions(), request);\n }", "public Set<Topic> getTopicsForForum(Forums obj)\r\n {\r\n if ( !Hibernate.isInitialized(obj.getTopics()))\r\n {\r\n getCurrentSession().refresh(obj);\r\n }\r\n return obj.getTopics();\r\n }", "public List<Question> getQuestionsTopic(int tId){\r\n List<Question> questions = new ArrayList<>();\r\n String selectQuery = \"SELECT * FROM \" + TABLE_QUESTIONS + \" AS q INNER JOIN \" +\r\n TABLE_TOPICS_QUESTIONS + \" AS tq ON q.\" +\r\n KEY_ID + \" = tq.\" + KEY_QID +\r\n \" WHERE tq.\" + KEY_TID + \" = \" + tId + \" ORDER BY RANDOM()\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n\r\n if(cursor.moveToFirst()){\r\n do{\r\n Question question = new Question();\r\n question.setId(cursor.getInt(cursor.getColumnIndex(KEY_QID)));\r\n question.setQuestion(cursor.getString(cursor.getColumnIndex(KEY_QUESTION)));\r\n question.setAnswer(cursor.getString(cursor.getColumnIndex(KEY_ANSWER)));\r\n question.setExplanation(cursor.getString(cursor.getColumnIndex(KEY_EXPLANATION)));\r\n question.setOptA(cursor.getString(cursor.getColumnIndex(KEY_OPT_A)));\r\n question.setOptB(cursor.getString(cursor.getColumnIndex(KEY_OPT_B)));\r\n question.setOptC(cursor.getString(cursor.getColumnIndex(KEY_OPT_C)));\r\n question.setOptD(cursor.getString(cursor.getColumnIndex(KEY_OPT_D)));\r\n\r\n questions.add(question);\r\n\r\n } while (cursor.moveToNext());\r\n }\r\n\r\n\r\n\r\n cursor.close();\r\n db.close();\r\n return questions;\r\n }", "public ObservableList<Task> getTopicList() {\n return topicList;\n }", "public void getAllTopics(com.google.protobuf.Empty request,\n io.grpc.stub.StreamObserver<forum.ExistingTopics> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getGetAllTopicsMethod(), getCallOptions()), request, responseObserver);\n }", "public void getAllTopics(com.google.protobuf.Empty request,\n io.grpc.stub.StreamObserver<forum.ExistingTopics> responseObserver) {\n asyncUnimplementedUnaryCall(getGetAllTopicsMethod(), responseObserver);\n }", "private void addTopicDetails() \n {\n baseLayout.addComponent(UIUtils.getSchoolBannerLayout());\n baseLayout.addComponent(getVideoPathLayout());\n baseLayout.addComponent(getNotesLayout());\n baseLayout.addComponent(getOtherNotesLayout());\n baseLayout.addComponent(getPreviousQuestionsLayout());\n baseLayout.addComponent(getQuizLayout());\n baseLayout.addComponent(addUserNotes());\n //baseLayout.setExpandRatio(tabsheetLayout,2);\n }", "public void trendingTopic() {\n\t\tWebElement allTrending = BrowserUtil.driver.findElement(By.xpath(\".//*[@class='topic-list']\"));\n\t\tList<WebElement> trends = allTrending.findElements(By.tagName(\"a\"));\n\t\tRandomizer r = new Randomizer();\n\t\tr.randomClick(trends);\n\t}", "@Override\n\tpublic JCRPageList getPageTopic(String categoryId, String forumId,\n\t\t\tString strQuery, String strOrderBy) throws Exception {\n\t\treturn null;\n\t}", "boolean hasTopicConstant();", "private String getRandomTopic()\n\t{\n\t\tString randomTopic = \"\";\n\t\tdouble myRandom = Math.random();\n\t\tint myRandomListPosition = (int) (myRandom * randomList.size());\n\n\t\trandomTopic = randomList.get(myRandomListPosition);\n\t\treturn randomTopic;\n\t}", "Topic getTopic();", "void display() {\n for (int i = 0; i < this.questions.size(); i++)\n this.questions.get(i).display(i, gradeable());\n }", "public String[] getTopics() {\n\n try {\n ZooKeeper zk = new ZooKeeper(\"localhost:2181\", 10000, null);\n List<String> topics = zk.getChildren(\"/brokers/topics\", false);\n// for (String topic : topics) {\n// System.out.println(topic);\n// }\n return topics.toArray(new String[0]);\n\n } catch (InterruptedException | KeeperException | IOException e) {\n e.printStackTrace();\n }\n return null;\n\n // Prints the topics to stdout\n // Iterator it = topics.entrySet().iterator();\n // System.out.println(\"Available topics:\");\n // while (it.hasNext()) {\n // Map.Entry entry = (Map.Entry)it.next();\n // System.out.println(\"> \" + entry.getKey());\n // }\n }", "@Override\n\tpublic LazyPageList<Topic> getTopicList(String categoryId, String forumId,\n\t\t\tString string, String strOrderBy, int pageSize) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<TopicSummary> discoverTopics(String query) {\n\t\treturn null;\n\t}", "com.google.ads.googleads.v6.resources.TopicView getTopicView();", "public static void verTopicos() throws IOException, InterruptedException {\n\n clearScreen();\n\n System.out.println(\"Topicos: \");\n Scanner input = new Scanner(System.in);\n File file = new File(\"Topicos.txt\");\n FileWriter writer = new FileWriter(\"Topicos.txt\",true);\n BufferedReader reader = new BufferedReader(new FileReader(file));\n int contador = 0;\n\n try {\n x = new Scanner(new File(\"Topicos.txt\"));\n } \n catch(Exception e){\n System.out.println(\"Ficheiro nao encontrado\");\n }\n\n while(x.hasNext()){ // parametros dos topicos\n\n String a = x.next(); // nome do topico\n String b = x.next(); // descricao\n String c = x.next(); // numero maximo de mensagens\n\n contador++;\n System.out.println(\"> \" + contador + \": \" + a); // listagem dos topicos 1 a 1\n }\n\n System.out.println(\"Existem \" + contador + \" topicos\");\n \n }", "@Override\n public List<TopicType> getTopicTypes() {\n\t\treturn null;\n\t}", "public String getTopic() {\n\t\treturn topic;\n\t}", "@Override\n\tpublic JCRPageList getPageTopicByType(String type) throws Exception {\n\t\treturn null;\n\t}", "public static List<Topic> Topics(JSONArray topicsJSON, String projectId){\n List<Topic> topics = new ArrayList<>();\n\n for(int i = 0; i < topicsJSON.length(); i++){\n try {\n topics.add(new Topic(topicsJSON.getJSONObject(i), projectId));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return topics;\n }", "@Override\n public void show(ResultComponent results) throws TrecEvalOOException {\n System.out.println(\"************************************************\");\n System.out.println(\"*************** Topic \" + topicId + \" output ****************\");\n System.out.println(\"************************************************\");\n\n if (results.getType() == ResultComponent.Type.GENERAL) {\n\n for (ResultComponent runResult : results.getResults()) {\n\n List<Result> resultList = runResult.getResultsByIdTopic(topicId);\n\n System.out.println(\"\\nResults for run: \" + runResult.getRunName());\n if (resultList.isEmpty()) {\n System.out.println(\"No results for topic \" + topicId);\n }\n\n for (Result result : resultList) {\n System.out.print(result.toString());\n }\n }\n }\n }", "public Observable<Recipes> getTopics() {\n return Observable.concat(cachedResults(), networkResults()).first();\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn questions.size();\n\t\t}", "public com.google.common.util.concurrent.ListenableFuture<forum.ExistingTopics> getAllTopics(\n com.google.protobuf.Empty request) {\n return futureUnaryCall(\n getChannel().newCall(getGetAllTopicsMethod(), getCallOptions()), request);\n }", "public List<String> getTrendingTopics() {\n return kweetDAO.getTrendingTopics();\n }", "public boolean topics(String owner, String repo, String topic) {\n return apiClient.delete(String.format(\"/repos/%s/%s/topics/%s\", owner, repo, topic)).isOk();\n }", "@Override\r\n\tpublic List<TopicContent> findAll() {\n\t\treturn topicContentDao.findAll();\r\n\t}", "List<String> showNewsAndMessages();", "@OnAlias(value = \"gettopic\")\n\tpublic void getTopic(TeamchatAPI api) throws Exception {\n\t\t// populating with message name list\n\t\t// get option name\n\t\tString[] project = api.context().currentReply().getField(\"project\")\n\t\t\t\t.split(\"\\\\|\");\n\t\t// get project id from option name\n\t\tprojectId = project[(project.length - 1)].trim();\n\t\tField f = api.objects().select().name(\"topic\").label(\"Topic\");\n\t\t// store topics for reference\n\t\ttopicsGlobal = bah.getProjectTopics(projectId, topicType);\n\t\tfor (Topic topic : topicsGlobal) {\n\t\t\tf.addOption(topic.getTitle() + \" | \" + topic.getId());\n\t\t}\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get \" + topicType + \"(s) from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select \" + topicType)\n\t\t\t\t\t\t.alias(topicType + \"3\")));\n\t\t// alias naming according to krrish 3 naming standards\n\t}", "public Collection<Question> getQuestions();", "public void setTopic( String topic ) {\n this.topic = topic;\n }", "List<Topic> findAllByPageNumber(Integer page);", "public IDiscussionTopicList getAttachedDiscussionTopics(boolean edit)\n throws OculusException;", "public static void displayQuestions() {\n System.out.println(\"1. Is your character male?\");\n System.out.println(\"2. Is your character female?\");\n System.out.println(\"3. Does your character have brown hair?\");\n System.out.println(\"4. Does your character have red hair?\");\n System.out.println(\"5. Does your character have blonde hair?\");\n System.out.println(\"6. Does your character have green eyes?\");\n System.out.println(\"7. Does your character have blue eyes?\");\n System.out.println(\"8. Does your character have brown eyes?\");\n System.out.println(\"9. Is your character wearing a green shirt?\");\n System.out.println(\"10. Is your character wearing a blue shirt?\");\n System.out.println(\"11. Is your character wearing a red shirt?\");\n }", "Question getQuest(String topic){\r\n\t\thasQ = false;\r\n\t\twhile(!hasQ){\r\n\t\t\trandNo = rand.nextInt(bank.get(topic).size());\r\n\t\t\tif(!bank.get(topic).get(randNo).getAsked()){\r\n\t\t\t\tbank.get(topic).get(randNo).setAsked(true);\r\n\t\t\t\treturn bank.get(topic).get(randNo);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Topic getTopic() {\n\t\treturn topic;\n\t}", "List<Question> getQuestions();", "public boolean getHasValidTopics() {\n if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_hasValidTopics == null)\n jcasType.jcas.throwFeatMissing(\"hasValidTopics\", \"types.Document\");\n return jcasType.ll_cas.ll_getBooleanValue(addr, ((Document_Type)jcasType).casFeatCode_hasValidTopics);}", "public boolean hasMoreDiscussions();", "public List<Topic> getTopics(int eId){\r\n List<Topic> topics = new ArrayList<>();\r\n String selectQuery = \"SELECT * FROM \" + TABLE_TOPICS + \" AS t INNER JOIN \" +\r\n TABLE_EXAMS_TOPICS + \" AS et ON t.\" +\r\n KEY_ID + \" = et.\" + KEY_TID +\r\n \" WHERE et.\" + KEY_EID + \" = \" + eId;\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n\r\n if(cursor.moveToFirst()){\r\n do{\r\n Topic topic = new Topic();\r\n topic.setId(cursor.getInt(cursor.getColumnIndex(KEY_TID)));\r\n topic.setName(cursor.getString(cursor.getColumnIndex(KEY_NAME)));\r\n\r\n topics.add(topic);\r\n\r\n } while (cursor.moveToNext());\r\n }\r\n\r\n cursor.close();\r\n db.close();\r\n return topics;\r\n }", "private void setFAQs () {\n\n QuestionDataModel question1 = new QuestionDataModel(\n \"What is Psychiatry?\", \"Psychiatry deals with more extreme mental disorders such as Schizophrenia, where a chemical imbalance plays into an individual’s mental disorder. Issues coming from the “inside” to “out”\\n\");\n QuestionDataModel question2 = new QuestionDataModel(\n \"What Treatments Do Psychiatrists Use?\", \"Psychiatrists use a variety of treatments – including various forms of psychotherapy, medications, psychosocial interventions, and other treatments (such as electroconvulsive therapy or ECT), depending on the needs of each patient.\");\n QuestionDataModel question3 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"A psychiatrist is a medical doctor (completed medical school and residency) with special training in psychiatry. A psychologist usually has an advanced degree, most commonly in clinical psychology, and often has extensive training in research or clinical practice.\");\n QuestionDataModel question4 = new QuestionDataModel(\n \"What is Psychology ?\", \"Psychology is the scientific study of the mind and behavior, according to the American Psychological Association. Psychology is a multifaceted discipline and includes many sub-fields of study such areas as human development, sports, health, clinical, social behavior, and cognitive processes.\");\n QuestionDataModel question5 = new QuestionDataModel(\n \"What is psychologists goal?\", \"Those with issues coming from the “outside” “in” (i.e. lost job and partner so feeling depressed) are better suited with psychologists, they offer guiding you into alternative and healthier perspectives in tackling daily life during ‘talk therapy’\");\n QuestionDataModel question6 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question7 = new QuestionDataModel(\n \"What is a behavioural therapist?\", \"A behavioural therapist such as an ABA (“Applied Behavioural Analysis”) therapist or an occupational therapist focuses not on the psychological but rather the behavioural aspects of an issue. In a sense, it can be considered a “band-aid” fix, however, it has consistently shown to be an extremely effective method in turning maladaptive behaviours with adaptive behaviours.\");\n QuestionDataModel question8 = new QuestionDataModel(\n \"Why behavioral therapy?\", \"Cognitive-behavioral therapy is used to treat a wide range of issues. It's often the preferred type of psychotherapy because it can quickly help you identify and cope with specific challenges. It generally requires fewer sessions than other types of therapy and is done in a structured way.\");\n QuestionDataModel question9 = new QuestionDataModel(\n \"Is behavioral therapy beneficial?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question10 = new QuestionDataModel(\n \"What is alternative therapy?\", \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\");\n QuestionDataModel question11 = new QuestionDataModel(\n \"Can they treat mental health problems?\", \"Complementary and alternative therapies can be used as a treatment for both physical and mental health problems. The particular problems that they can help will depend on the specific therapy that you are interested in, but many can help to reduce feelings of depression and anxiety. Some people also find they can help with sleep problems, relaxation, and feelings of stress.\");\n QuestionDataModel question12 = new QuestionDataModel(\n \"What else should I consider before starting therapy?\", \"Only you can decide whether a type of treatment feels right for you, But it might help you to think about: What do I want to get out of it? Could this therapy be adapted to meet my needs?\");\n\n ArrayList<QuestionDataModel> faqs1 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs2 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs3 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs4 = new ArrayList<>();\n faqs1.add(question1);\n faqs1.add(question2);\n faqs1.add(question3);\n faqs2.add(question4);\n faqs2.add(question5);\n faqs2.add(question6);\n faqs3.add(question7);\n faqs3.add(question8);\n faqs3.add(question9);\n faqs4.add(question10);\n faqs4.add(question11);\n faqs4.add(question12);\n\n\n CategoryDataModel category1 = new CategoryDataModel(R.drawable.psychaitry,\n \"Psychiatry\",\n \"Psychiatry is the medical specialty devoted to the diagnosis, prevention, and treatment of mental disorders.\",\n R.drawable.psychiatry_q);\n\n CategoryDataModel category2 = new CategoryDataModel(R.drawable.psychology,\n \"Psychology\",\n \"Psychology is the science of behavior and mind which includes the study of conscious and unconscious phenomena.\",\n R.drawable.psychology_q);\n\n CategoryDataModel category3 = new CategoryDataModel(R.drawable.behavioral_therapy,\n \"Behavioral Therapy\",\n \"Behavior therapy is a broad term referring to clinical psychotherapy that uses techniques derived from behaviorism\",\n R.drawable.behaviour_therapy_q);\n CategoryDataModel category4 = new CategoryDataModel(R.drawable.alternative_healing,\n \"Alternative Therapy\",\n \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\",\n R.drawable.alternative_therapy_q);\n\n String FAQ1 = \"What is Psychiatry?\";\n String FAQ2 = \"What is Psychology?\";\n String FAQ3 = \"What is Behavioral Therapy?\";\n String FAQ4 = \"What is Alternative Therapy?\";\n String FAQ5 = \"Report a problem\";\n\n FAQsDataModel FAQsDataModel1 = new FAQsDataModel(FAQ1, category1,faqs1);\n FAQsDataModel FAQsDataModel2 = new FAQsDataModel(FAQ2, category2,faqs2);\n FAQsDataModel FAQsDataModel3 = new FAQsDataModel(FAQ3, category3,faqs3);\n FAQsDataModel FAQsDataModel4 = new FAQsDataModel(FAQ4, category4,faqs4);\n FAQsDataModel FAQsDataModel5 = new FAQsDataModel(FAQ5, category4,faqs4);\n\n\n\n if (mFAQs.isEmpty()) {\n\n mFAQs.add(FAQsDataModel1);\n mFAQs.add(FAQsDataModel2);\n mFAQs.add(FAQsDataModel3);\n mFAQs.add(FAQsDataModel4);\n mFAQs.add(FAQsDataModel5);\n\n\n }\n }", "private Collection<TopicResource> getClusterTopics(final KafkaSpecsRunnerOptions options) throws ExecutionException, InterruptedException {\n Collection<String> topicNames = (options.topics().isEmpty()) ?\r\n client.listTopics().names().get() :\r\n options.topics();\r\n List<TopicResource> topics = topicNames.stream().map(TopicResource::new).collect(Collectors.toList());\r\n\r\n return new DescribeTopicOperation()\r\n .execute(client, new ResourcesIterable<>(topics), DescribeOperationOptions.withDescribeDefaultConfigs(true), namespace);\r\n }", "long getTopic();", "List<Question> getQuestionsUsed();", "public List<Topic> getTopicTree(Topic topic);", "public void setTopic(String topic) {\n this.topic = topic;\n }", "@Test\n\tpublic void testGetPublishedQuestions() {\n\t\tList<QnaQuestion> questions = questionLogic.getPublishedQuestions(LOCATION1_ID);\n\t\tAssert.assertEquals(questions.size(), 3);\n\t\t\n\t\tAssert.assertTrue(questions.contains(tdp.question2_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question3_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question4_location1));\n\t}", "public void showTopic (int index) {\n\n\t //Toast.makeText(getActivity (), \" tesssst\" + index, Toast.LENGTH_SHORT).show();\n\t /* Intent intent = new Intent(getActivity().getApplicationContext(), GridImageActivity.class);\n\t intent.putExtra (\"index\", index);\n\t startActivity (intent);*/\n\t}", "@Override\n public boolean hasMoreQuestions() {\n return !(done);\n }", "public void showteachers(){\n for (int i=0; i<tlist.size(); i++){\n System.out.println(tlist.get(i).getTeacher());\n }\n }", "public Topic findByid() {\n\t\treturn null;\n\t}", "public static void showRecentQuestionsByNumber() {\r\n \t\tArrayList<Question> recentQuestionsByNumber = manager\r\n \t\t\t\t.getRecentQuestionsByNumber(25);\r\n \r\n \t\trender(recentQuestionsByNumber);\r\n \t}", "@Override\n public void onResponse(String response) {\n try {\n JSONArray jsArray = new JSONArray(response);\n for (int i = 0; i < jsArray.length(); i++) {\n JSONObject jsObject = jsArray.getJSONObject(i);\n HashMap<String, String> hashMap = new HashMap<>();\n\n hashMap.put(\"name\", jsObject.getString(\"name\"));\n hashMap.put(\"topic\", jsObject.getString(\"topic\"));\n hashMap.put(\"value\", jsObject.getString(\"value\"));\n\n database_topics.add(hashMap);\n }\n\n for (HashMap<String, String> hashMap : database_topics) {\n if (Integer.parseInt(hashMap.get(\"value\")) == 1) {\n\n subscriptionPref.put(hashMap.get(\"topic\"), prefs.getBoolean(hashMap.get(\"topic\"), true));\n user_topics.add(hashMap);\n } else if (Integer.parseInt(hashMap.get(\"value\")) == 0) {\n\n FirebaseMessaging.getInstance().unsubscribeFromTopic(hashMap.get(\"topic\"));\n editor = getSharedPreferences(MY_PREFS_NAME, MODE_PRIVATE).edit();\n editor.remove(hashMap.get(\"topic\"));\n editor.apply();\n }\n\n\n }\n\n LinearLayout linearLayout = (LinearLayout) findViewById(R.id.ll_subscribe_list);\n LinearLayout.LayoutParams rlParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n rlParams.setMargins(8, 12, 8, 12);\n\n RelativeLayout.LayoutParams textView_params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n textView_params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n textView_params.addRule(RelativeLayout.ALIGN_PARENT_START);\n\n RelativeLayout.LayoutParams switchCompat_params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n switchCompat_params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\n for (int i = 0; i < user_topics.size(); i++) {\n HashMap<String, String> hashMap = user_topics.get(i);\n\n RelativeLayout rl = new RelativeLayout(context);\n rl.setLayoutParams(rlParams);\n rl.setPadding(8, 12, 8, 12);\n\n TextView textView = new TextView(context);\n textView.setText(hashMap.get(\"name\"));\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n textView.setTextAppearance(R.style.TextAppearance_AppCompat_Caption);\n textView.setTextSize(14);\n }\n\n if (hashMap.get(\"topic\").equals(\"general\")) {\n textView.setTextColor(ContextCompat.getColor(context, R.color.colorPrimary));\n }\n textView.setPadding(8, 0, 0, 0);\n textView.setLayoutParams(textView_params);\n rl.addView(textView);\n\n\n SwitchCompat switchCompat = new SwitchCompat(context);\n switchCompat.setOnCheckedChangeListener(SubscriptionActivity.this);\n switchCompat.setTag(hashMap.get(\"topic\"));\n switchCompat.setChecked(subscriptionPref.get(hashMap.get(\"topic\")));\n switchCompat.setLayoutParams(switchCompat_params);\n rl.addView(switchCompat);\n\n linearLayout.addView(rl);\n\n }\n if (progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n\n LinearLayout linearLayout = (LinearLayout) findViewById(R.id.ll_subscribe_list);\n LinearLayout.LayoutParams tv_params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n TextView tv = new TextView(SubscriptionActivity.this);\n tv.setText(\"Error loading this page.\");\n tv.setLayoutParams(tv_params);\n linearLayout.addView(tv);\n if (progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n }\n\n }", "public IDiscussionTopicList getAttachedDiscussionTopics()\n throws OculusException;", "@Override\n\t\tprotected ArrayList<Topic> doInBackground(String... params) {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(params[0]);\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) url\n\t\t\t\t\t\t.openConnection();\n\t\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\t\tcon.connect();\n\t\t\t\tint statusCode = con.getResponseCode();\n\t\t\t\tif (statusCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(con.getInputStream()));\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = reader.readLine();\n\t\t\t\t\twhile (line != null) {\n\t\t\t\t\t\tsb.append(line);\n\t\t\t\t\t\tline = reader.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn ContentUtil.ContentJSONParser.parseTopics(sb\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t}\n\n\t\t\t} catch (IOException | JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public String getTopicName() {\n return topicName;\n }", "List<UserTopic> selectByExample(UserTopicExample example);", "List<UserTopic> selectByExample(UserTopicExample example);", "public synchronized void initializeGeneralTopics() {\n/* 79 */ this.yaml = new HelpYamlReader((Server)this.server);\n/* */ \n/* */ \n/* 82 */ for (HelpTopic topic : this.yaml.getGeneralTopics()) {\n/* 83 */ addTopic(topic);\n/* */ }\n/* */ \n/* */ \n/* 87 */ for (HelpTopic topic : this.yaml.getIndexTopics()) {\n/* 88 */ if (topic.getName().equals(\"Default\")) {\n/* 89 */ this.defaultTopic = topic; continue;\n/* */ } \n/* 91 */ addTopic(topic);\n/* */ } \n/* */ }", "public void populate(Topic topic, ContentPanel contentPanelController) {\n topicLabel.setText(topic.getTopicName());\n for (Lesson lesson : topic.getLessonList()) {\n Label lessonMenuButton = new Label(lesson.getName());\n lessonMenuButton.getStyleClass().add(\"lesson-menu-label\");\n lessonMenuButton.setPadding(new Insets(0, 15, 0, AppViewSettings.menuLessonIndentation));\n lessonMenuButton.setOnMouseClicked(event -> {\n\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/algat/view/fxml/content/lessons/LessonPanel.fxml\"));\n AnchorPane newLessonPane = loader.load();\n LessonPanel newLessonController = loader.getController();\n\n newLessonController.loadLesson(lesson);\n contentPanelController.changeContent(newLessonPane);\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"ERROR:failed to load the LessonPanel\");\n }\n\n });\n\n BorderPane lessonBorderPane = new BorderPane();\n\n lessonBorderPane.setLeft(lessonMenuButton);\n\n if (!lesson.getQuestions().isEmpty()) {\n Label quizMenuButton = new Label(\"Q\");\n quizMenuButton.getStyleClass().add(\"lesson-menu-label\");\n lessonBorderPane.setRight(quizMenuButton);\n\n quizMenuButton.setOnMouseClicked(event -> {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/algat/view/fxml/content/questions/QuizPanel.fxml\"));\n AnchorPane quizPane = loader.load();\n QuizPanel quizController = loader.getController();\n quizController.populate(lesson.getQuestions());\n\n contentPanelController.changeContent(quizPane);\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"ERROR:failed to load the TopicMenuField\");\n }\n });\n }\n\n topicMenuField.getChildren().add(lessonBorderPane);\n }\n }", "List<FAQModel> getFAQs();" ]
[ "0.6604854", "0.6506683", "0.64916307", "0.63980454", "0.6372473", "0.6346713", "0.63316953", "0.6290705", "0.62330186", "0.6228532", "0.62210375", "0.6186167", "0.6165202", "0.6150909", "0.6138991", "0.60997754", "0.6098016", "0.60748404", "0.60699385", "0.6069892", "0.6069892", "0.6065662", "0.6060102", "0.5996218", "0.5995343", "0.5994859", "0.5974831", "0.5958351", "0.59468997", "0.59331846", "0.59076124", "0.5886882", "0.5881596", "0.5867294", "0.5858349", "0.58426744", "0.58256435", "0.5804891", "0.5792568", "0.57650894", "0.57135886", "0.5706826", "0.56540364", "0.56412464", "0.5615137", "0.561087", "0.5605241", "0.5603192", "0.5587054", "0.5585743", "0.5583563", "0.5583246", "0.55755174", "0.55739856", "0.5564413", "0.5555151", "0.55427736", "0.553531", "0.553092", "0.5524743", "0.55239964", "0.55232626", "0.55031705", "0.54917395", "0.5486756", "0.54687315", "0.54685223", "0.54664564", "0.54615074", "0.5450445", "0.544074", "0.54383963", "0.54382956", "0.5434268", "0.54229605", "0.5415448", "0.5397764", "0.5396654", "0.5389464", "0.5387845", "0.5384257", "0.53840154", "0.5382246", "0.5382216", "0.53802425", "0.5362699", "0.5361091", "0.5358933", "0.53530824", "0.5338848", "0.53325707", "0.5330964", "0.53230613", "0.5322489", "0.53151816", "0.5298045", "0.5298045", "0.5295978", "0.5295369", "0.5289299" ]
0.66839975
0
This method accepts and verifys the login details
static void acceptLogin() throws IOException { boolean validLogin = false, loginAccepted=false, emptyInput=false;; int dialogButton, attempts = 0,option; String info, title = "Registration"; dialogButton = JOptionPane.showConfirmDialog (null, "Are you an existing user?","Login", JOptionPane.YES_NO_OPTION); JTextField email = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text. JTextField password = new JPasswordField(); JTextField confirmEmail = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text. JTextField confirmPassword = new JPasswordField(); if(dialogButton == JOptionPane.YES_OPTION)//Executes only if the user is already an existing user { System.out.println("User selected yes.."); //Creates an object that accepts both username and password using JTextField Object[]message = {"Username:", username,"Password:", password}; String attempted="***"; System.out.println(attempted); //Loop will keep running until three attempts are made or a valid input is entered while(attempts<3 && !validLogin && !emptyInput) { option = JOptionPane.showConfirmDialog(null, message, "Login", JOptionPane.OK_CANCEL_OPTION); System.out.println(username.getText()+"\n"+password.getText()); //if user presses Cancel button the program loops through acceptLogin Method if(option == JOptionPane.CANCEL_OPTION) { acceptLogin(); validLogin = true; } else { validLogin = validLoginEntered(username.getText(), password.getText()); if(!validLogin) { JOptionPane.showMessageDialog(null, "User Could Not Be Found!\nAttempt "+(attempts+1)+" of 3", title, 2); attempts++; if (attempts==3) { System.out.println("Login Failed"); dialogButton= JOptionPane.showConfirmDialog (null, "Do you want to Login Again?","Login Failed", JOptionPane.YES_NO_OPTION); if(dialogButton==JOptionPane.YES_OPTION) {acceptLogin();System.out.println("Reseting Login..."); validLogin=true;} else { System.out.println("Terminating Login..."); JOptionPane.showMessageDialog(null,"Goodbye!!"); } } attempted=attempted.substring(0,attempted.length()-1); System.out.println(attempted); } else { loggedin = true; user(username.getText()); getUsername(username.getText()); } } } } //if user presses NO option then the user is asked to create a new user else if(dialogButton == JOptionPane.NO_OPTION) { boolean userExists = false; File fileReader = new File("loginDetails.txt"); Object[] message= {"Email:",email,"Username:", username,"Password:", password,"Confirm Password:", confirmPassword}; JOptionPane.showMessageDialog(null, message, "Create user",1); info = username.getText()+","+password.getText()+","+email.getText()+"\n"; //this is used to check if the user already exists. If user already exists then the user is asked to try logging in if (validpassword(password.getText())==true) { if(validemail(email.getText())==true) { if(loginDetails.get(0).contains(username.getText()) || username.getText().equals("")) { JOptionPane.showMessageDialog(null,"Username Taken or Empty Input, Try Again","Registration Error!",0); userExists = true; acceptLogin(); } //if user doesn't exist then a new user is created if(!userExists&&confirmPassword.getText().matches(password.getText())) { System.out.println("New user Added to log..."); writeToFile(fileReader, info); writeUserFile(username.getText()+".txt",""); userDetails(username.getText()+".txt"); loginDetails.get(0).add(username.getText()); loginDetails.get(1).add(password.getText()); loginDetails.get(2).add("0"); userIndex = loginDetails.get(0).indexOf(username.getText()); validLogin=true; loggedin = true; }else{JOptionPane.showMessageDialog(null,"Password does not match, Try again","Password Error",0);acceptLogin();} }else { acceptLogin(); } }else { acceptLogin(); } } //if the login is not succesfull then the program exists }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }", "boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);", "protected void login() {\n\t\t\r\n\t}", "void loginDetails(LoginSuccess loginSuccess);", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }", "@Test\r\n\tpublic void validLoginTest()\r\n\t{\n\t\thomePOM.selectMyAccount();\r\n\t\t\r\n\t\t//select Login option from My Account\r\n\t\thomePOM.myAccountLogin();\r\n\t\t//read username from property file\r\n\t\tusername=properties.getProperty(\"username\");\r\n\t\t//read password from property file\r\n\t\tpassword=properties.getProperty(\"password\");\r\n\t\t\r\n\t\t//login to Application\r\n\t\tloginPOM.sendLoginDetails(username,password);\r\n\t\t\r\n\t\t//validate login\r\n\t\tloginPOM.loginValidate();\r\n\t\t\r\n\t\t\r\n\t}", "public boolean loginCheck() {\n\t\tif(allParametersGiven==true) {\n\t\t\treturn dtb.checkLoginDetais(username,password);\n\t\t}\n\t\treturn false;\n\t}", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }", "@Test\n\tpublic void loginWithValidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);\n\t\tassertTrue(app.userDashboardScreen().isActive());\n\t}", "private void checkLogin(String email, String password) {\n final Context ctx = getApplicationContext();\n\n processor.checkLoginCredentials(email, password, ctx, new FetchDataListener() {\n @Override\n public void onFetchComplete(JSONObject data) {\n Boolean resp = (Boolean) data.get(\"response\");\n if (resp) {\n // go to home page\n Intent goToHome = new Intent(ctx, MainActivity.class);\n goToHome.putExtra(\"user\", etEmail.getText().toString());\n goToHome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(goToHome);\n\n // finish prevents people from going back to login without logging out\n finish();\n } else {\n displayLoginError(\"Couldn't log in\");\n etEmail.setText(\"\");\n etPassword.setText(\"\");\n }\n }\n\n @Override\n public void onFetchFailure(String msg) {\n Log.d(TAG, msg);\n displayLoginError(\"Error connecting to server\");\n }\n\n @Override\n public void onFetchStart() {\n // do nothing\n }\n });\n\n }", "public abstract boolean login(String email, String passwaord) throws CouponSystemException;", "public void authenticate(LoginRequest loginRequest) {\n\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "void loginAttempt(String email, String password);", "public String isValidAgentLogin(String userName, String password);", "@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }", "private void login(String username,String password){\n\n }", "@Override\n public void validateCredentials(ObjLogin objLogin, Context mContext) {\n if (loginView != null) {\n loginView.showProgress();\n loginInteractor.login(objLogin, this, mContext);\n }\n }", "@Test\n public void stage03_testLogin() {\n String userName = \"\";\n String password = \"\";\n //Sign in\n SignIn signIn = new SignIn(driver);\n HomePage homePage = signIn.loginValidUser(userName, password);\n //Get login name\n String loginName = homePage.getLoginName();\n //Testing if login name is correct\n assertEquals(loginName, (userName));\n //logging\n if (loginName.equals(userName)) {\n logger.info(\"Loged in succesfully.\");\n logger.info(\"( stage02_testOpenLoginPage )Actual username : \" + loginName + password);\n } else {\n logger.error(\"Unable to login.\");\n logger.error(\"( stage02_testOpenLoginPage )Actual username : \" + loginName);\n }\n }", "@Override\n\tpublic boolean employeeLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.employeeLogIn(username, password);\n\t\treturn result;\n\t}", "private void checkValidLogin(String username, String password) {\r\n //The check username will check to see if a password was returned. That means the user\r\n //exists. If a void is returned, then the user does not exist.\r\n String actualPassword = checkUsername(username);\r\n\r\n //If a null was passed back, then the username does not exist. We signal the user.\r\n if (actualPassword == null) {\r\n signalInvalidUser();\r\n return;\r\n }\r\n\r\n //We check to see if the password that was type is equal to the 1 we got from the DB. If\r\n //not we signal the user.\r\n if (!checkPassword(password, actualPassword)){\r\n signalInvalidPassword();\r\n return;\r\n }\r\n\r\n //If everything worked, we go to the landing page.\r\n goToLandingPage();\r\n }", "@Test\n\t\n\t\tpublic void Login_invalid() \n\t\t\n\t\t{\n\n\t\t\tString un = \"vivek\";\n\t\t\tString pw = \"vivek kumar\";\n\n\t\t\tlogger.info(\"********** Verify that use can able to login with correct username & incorrect password***********\");\n\t\t\t\n\t\t\tWebElement uname = d.findElement(By.id(\"kitchen_user_user_name\"));\n\t\t\tWebElement pwd = d.findElement(By.id(\"kitchen_user_password_digest\"));\n\t\t\t// WebElement Rme = d.findElement(By.name(\"remember\"));\n\t\t\tWebElement submit = d.findElement(By.name(\"commit\"));\n\n\t\t\t\n\t\t\tif (uname.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the User Name field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the User Name field is present \");\n\n\t\t\t}\n\t\t\t\n\n\t\t\tif (uname.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the username fields get autofocus\");\n\n\t\t\t\tuname.sendKeys(\"vivek\");\n\t\t\t\t\n\t\t\t\tuname.sendKeys(Keys.TAB);\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the username fields get autofocus\");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\t\n\n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\n\t\t\tif (pwd.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the password fields get focused\");\n\n\t\t\t\tpwd.sendKeys(\"vivek kumar\");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the password fields get focused\");\n\t\t\t}\n\n\t\t\t\n\t\t\tif (submit.isEnabled()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsubmit.click();\n\t\t\t\t\n\n\t\t\t\tString url = \"http://192.168.1.73:4000\";\n\t\t\t\t\n\t\t\t\tString curl = d.getCurrentUrl();\n\t\t\t\t\n\t\t\t\tif (d.getCurrentUrl().equals(url)) {\n\t\t\t\t\t\n\t\t\t\t\tlogger.error(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else {\t\t\t\t\n\n\t\t\t\t\tlogger.info(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that user can't able to click the submit\");\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t}", "protected Response login() {\n return login(\"\");\n }", "public boolean loginUser();", "@When(\"^To Validathe Retail Login with Valid Credentials$\")\r\n\tpublic void to_Validathe_Retail_Login_with_Valid_Credentials() throws InterruptedException {\n\t\tdriver.findElement(By.className(\"sign-in\")).click();\r\n\t\tdriver.findElement(By.name(\"log\")).sendKeys(\"admin\");\r\n\t\tdriver.findElement(By.name(\"pwd\")).sendKeys(\"admin@123\");\r\n\t\tdriver.findElement(By.name(\"login\")).click();\r\n\t\t Thread.sleep(3000);\r\n\t\t \r\n\t}", "public HomePage loginValidCredentials (String email, String password){\n\n insertCredentials(email, password);\n submitInformation();\n\n return new HomePage(driver);\n }", "public void validateLogin(String inUName, String inPassword) {\r\n\t\tResultSet loginRs = null;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and retrieving data (fetchSelectAllUsers())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection validateConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tRetrieve all data from users table and save it in ResultSet loginRs\r\n\t\t\t*/\r\n\t\t\tloginRs = validateConn.fetchSelectAllUsers();\r\n\r\n\t\t\twhile (loginRs.next()) {\r\n\t\t\t\tif (inUName.equals(loginRs.getString(1)) && inPassword.equals(loginRs.getString(2))) {\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t*\tIf we found a matching record, toggle boolean found to true and load all the data into\r\n\t\t\t\t\t*\tthe object which has called the method.\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tuName = loginRs.getString(1);\r\n\t\t\t\t\tpassword = loginRs.getString(2);\r\n\t\t\t\t\tfullName = loginRs.getString(3);\r\n\t\t\t\t\tphone = loginRs.getString(4);\r\n\t\t\t\t\temail = loginRs.getString(5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//DbConnection.closeDbConnection();\r\n\t\t\t\tif (loginRs != null) {\r\n\t\t\t\t\tloginRs.close();\r\n\t\t\t\t}\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean managerLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.managerLogIn(username, password);\n\t\treturn result;\n\t}", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}", "@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }", "RequestResult loginRequest() throws Exception;", "public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }", "private boolean verifyCredentials() {\n\n boolean bCredentialsValid = false;\n strUserMailID = strUserName = \"\";\n\n // Get the account information, if existing\n DatabaseHandler dbHandler = new DatabaseHandler(getApplicationContext());\n AccountInformation accInfo = dbHandler.getAccountInfo(m_tfUserEmailID.getText().toString());\n\n if(accInfo != null) {\n\n // Compute the hash for the user entered password\n OperationsHelper helper = new OperationsHelper();\n String strHashPwd = helper.getHashedPassword(m_tfUserPassword.getText().toString(), accInfo.getSaltValue());\n if(strHashPwd.equals(accInfo.getPassword())) {\n\n bCredentialsValid = true;\n strUserMailID = accInfo.getEmail();\n strUserName = accInfo.getName();\n\n // If Always login option is checked, update the value in the database\n if( ! (m_cbAutoLogon.isChecked() == accInfo.getIfAlwaysSignIn()) ) {\n\n accInfo.setAlwaysSignIn(m_cbAutoLogon.isChecked());\n dbHandler.updateAlwaysSignOnOption(accInfo);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Incorrect Password\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(getApplicationContext(), \"No such account exists. \\n\" +\n \" Create one to login\", Toast.LENGTH_LONG).show();\n }\n\n return bCredentialsValid;\n }", "public void Login()\r\n\t{\r\n\t\t\r\n\t\tString firstName = CommonDriver.getProperties(\"FirstName\");\r\n\t\tString lastName = CommonDriver.getProperties(\"LastName\");\r\n\t\tString mobileNumber = CommonDriver.getProperties(\"MobileNumber\");\r\n\t\tString email = CommonDriver.getProperties(\"Email\");\r\n\t\tString Fpassword = CommonDriver.getProperties(\"Password\");\r\n\t\tString confirmPassword = CommonDriver.getProperties(\"ConfirmPassword\");\r\n\t\tString userName = CommonDriver.getProperties(\"UserName\");\r\n\t\tString logPassword = CommonDriver.getProperties(\"LogPassword\");\r\n\t\t\r\n\t\tUserName.sendKeys(userName);\r\n\t\t\r\n\t\tLogPassword.sendKeys(logPassword);\r\n\t\t\t\t\r\n\t\tLogin.click();\r\n\t\t\r\n\t\t/**\r\n\t\t * Since the application forgets the login credentials in sometime, hence, checking the error msg and signing up again \r\n\t\t * \r\n\t\t */\r\n\t\r\n\t\tboolean present;\r\n\t\ttry {\r\n\t\t driver.findElement(By.xpath(\"//*[@id='loginfrm']/div[1]/div[2]/div\"));\r\n\t\t present = true;\r\n\t\t System.out.println(\"Need to signup first\");\r\n\t\t\t\r\n\t\t\tSignUp.click();\r\n\t\t\t\r\n\t\t\tFirstName.sendKeys(firstName);\r\n\t\t\t\r\n\t\t\tLastName.sendKeys(lastName);\r\n\t\t\t\t\t\r\n\t\t\tMobileNumber.sendKeys(mobileNumber);\r\n\t\t\t\t\t\r\n\t\t\tEmail.sendKeys(email);\r\n\t\t\t\t\t\r\n\t\t\tPassword.sendKeys(Fpassword);\r\n\t\t\t\t\t\r\n\t\t\tConfirmPassword.sendKeys(confirmPassword);\r\n\t\t\t\t\t\r\n\t\t\tSignUpF.click();\r\n\t\t \r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t present = false;\r\n\t\t \r\n\t\t\tSystem.out.println(\"Loggedin Successfully\");\r\n\t\t}\r\n\t}", "public void logIn(View v){\n mUsername = (EditText) findViewById(R.id.username);\n mPassword = (EditText) findViewById(R.id.password);\n\n // Reset errors.\n mUsername.setError(null);\n mPassword.setError(null);\n\n // Store the data\n username = mUsername.getText().toString();\n password = mPassword.getText().toString();\n\n //Check username\n if (TextUtils.isEmpty(username)) {\n mUsername.setError(fielderror);\n checklog = false;\n }\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPassword.setError(fielderror);\n checklog = false;\n }\n if(checklog == true) {\n loginUser();\n }\n\n\n }", "public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }", "private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}", "public abstract boolean checkCredentials (String username, String password);", "boolean authenticate(String userName, String password);", "public boolean validateUserCredentials(String login, String password) throws SQLException;", "@Test\n\tpublic void SignIn()\n\t{\n\t\tdriver.get(baseUrl);\n\t\tHomePage hp =new HomePage(driver);\n\t\thp.SignIn();\n\t\tString handle=driver.getWindowHandle();\n\t\tdriver.switchTo().window(handle);\n\t\t\n\t\t//2.\tLogin -Enter non-valid credentials. Expected error message is displayed\n\t\tLoginPage lp =new LoginPage(driver);\n\t\tlp.email(f);\n\t\tlp.password(p);\n\t\tlp.Login();\t\n\t\t\n\t\t// 3. Verify error message\n\t\tString ExpMsg = lp.Error_Mess();\n\t\tString DispMsg = (\"Authentication failed.\");\n\t\ttry\n\t\t{\n\t\t\tassertEquals(ExpMsg,DispMsg);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//4.\tLogin -Enter wrong credentials. Expected error message is displayed\n\t\tlp.email(g);\n\t\tlp.password(p);\n\t\tlp.Login();\n\t\t\n\t\t//5.\tVerify error message\n\t\tString ExpMsg1 = lp.Error_Mess();\n\t\tString DispMsg1 = (\"Invalid email address.\");\n\t\ttry\n\t\t{\n\t\t\tassertEquals(ExpMsg1,DispMsg1);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//6.\tLogin -Enter valid credentials and Sign in\n\t\tlp.Signin();\n\t\tlp.email(e);\n\t\tlp.password(p);\n\t\tlp.Login();\n\t}", "public boolean ValidCredentials() { \n\t\tif(!isEmptyFieldData()){\n\t\t\tSystemUserQuery sq = new SystemUserQuery();\n\t\t\tUser user = sq.loginQuery(getUsername(), getPassword());\n\t\t\t\n\t\t\tif(user != null){\n\t\t\t\tMain.setCurrentUser(user);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public void authenticateUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tint index=loginattempt();\r\n\t}", "@Override\r\n\tpublic List<User> logincheck(String uname, String pass) {\n\t\treturn null;\r\n\t}", "protected synchronized void login() {\n\t\tauthenticate();\n\t}", "@Given(\"user is on login page\")\n\tpublic void user_is_on_login_page() {\n\t\tSystem.out.println(\"user is on login page\");\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://opensource-demo.orangehrmlive.com/index.php/auth/validateCredentials\");\n\t \n\t}", "private void CustCheckLogin() {\n\t\tLoggingUtil.trace(\"Customer log in\");\n\t\tinput = new Scanner(System.in);\n\t\tSystem.out.println(\"Customer Login Page\");\n\t\tString email;\tString pass;\t\n\t\tint i=0;//counter from tries\n\t do { System.out.println(\"Email: \");\n\t\tSystem.out.print(\">>>>>\");email=input.nextLine(); c.setUsername(email);\n\t\tif(email.isEmpty()) {System.out.println(\"\\n\\nNo Dont put empty email\"); break; }\n\t\tSystem.out.println(\"Passowrd\");\n\t\tSystem.out.print(\">>>>>\");pass=input.nextLine();\n\t i++; \n\t if (s.checkUserCust(email, pass)==false) {\n\t \tSystem.out.println(\"Invalid Username or Pass\"); \n\t \tSystem.out.println(i);\n\t }\n\t else { cs.choosechoice();// go to customer screen\n\t \t break; }\t \n\t }while(i<4);\n\t ms.pageoneScreen();\n\t}", "@Then(\"^the user Login using username and password$\")\r\n\tpublic void the_user_Login_using_username_and_password() throws Throwable {\n\t w.details1();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString username = txtUsername.getText().toString();\n\t\t\t\tString password = txtPassword.getText().toString();\n\n\t\t\t\tif (username.trim().length() > 0\n\t\t\t\t\t\t&& password.trim().length() > 0) {\n\t\t\t\t\t\n\t\t\t\t \tValidateLogin validateLogin=new ValidateLogin();\n\t\t\t\t\tURL url1;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\turl1 = new URL(\"http://localhost:8080/shopExperience/reading\");\n\t\t\t\t\t\tvalidateLogin.execute(url1);\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t \t\n\t\t\t\t\t if (username.equals(\"test\") && password.equals(\"test\")) {\n//\t\t\t\t\ttry {\n//\t\t\t\t\t\tif (httpLoginRequest()) {\n\n\t\t\t\t\t\t\t// Creating user login session\n\t\t\t\t\t\t\t// For testing i am stroing name, email as follow\n\t\t\t\t\t\t\t// Use user real data\n\t\t\t\t\t\t\tsession.createLoginSession(\"Android Hive\",\n\t\t\t\t\t\t\t\t\t\"[email protected]\");\n\n\t\t\t\t\t\t\t// Staring MainActivity\n\t\t\t\t\t\t\tIntent i = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\t\t\tMainActivity.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\tfinish();\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// username / password doesn't match\n\t\t\t\t\t\t\talert.showAlertDialog(LoginActivity.this,\n\t\t\t\t\t\t\t\t\t\"Login failed..\",\n\t\t\t\t\t\t\t\t\t\"Username/Password is incorrect\", false);\n\t\t\t\t\t\t}\n//\t\t\t\t\t} catch (Exception e) {\n//\t\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// user didn't entered username or password\n\t\t\t\t\t// Show alert asking him to enter the details\n\t\t\t\t\talert.showAlertDialog(LoginActivity.this, \"Login failed..\",\n\t\t\t\t\t\t\t\"Please enter username and password\", false);\n\t\t\t\t}\n\n\t\t\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "public void login(View v) {\n\n // Disable the login button\n m_loginButton.setEnabled(false);\n\n if (validateInputs()) {\n\n if (verifyCredentials()) {\n\n // Start the home screen on successful login\n Intent intent = new Intent(LoginScreenActivity.this, HomeScreenActivity.class);\n intent.putExtra(RegistrationScreenActivity.KEY_MAIL_ID, strUserMailID);\n intent.putExtra(RegistrationScreenActivity.KEY_NAME, strUserName);\n startActivity(intent);\n }\n } else {\n\n // On Login failure, display error to the user\n Toast.makeText(getBaseContext(), \"Login failed. Check credentials\", Toast.LENGTH_LONG).show();\n }\n\n // Enable the login button for use\n m_loginButton.setEnabled(true);\n }", "public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String obj = editText.getText().toString();\n if (obj != null) {\n this.username = StringsKt.trim((CharSequence) obj).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n String obj2 = editText2.getText().toString();\n if (obj2 != null) {\n this.password = StringsKt.trim((CharSequence) obj2).toString();\n LoginViewModel loginViewModel = this.viewModel;\n if (loginViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n EditText editText3 = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etUserName\");\n String obj3 = editText3.getText().toString();\n EditText editText4 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etPassword\");\n loginViewModel.login(obj3, editText4.getText().toString());\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n }", "boolean isAuthenticate(String username, String password) throws UserDaoException;", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}", "EmployeeMaster authenticateUser(int employeeId, String password);", "protected void login() {\n\t\tdriver.get(getProperty(\"baseUrl\"));\n\n\t\t// 2. Enter valid credentials in the Username and Password fields.\n\t\tLoginPageObjects.usernameTextField(driver).sendKeys(getProperty(\"validUsername\"));\n\t\tLoginPageObjects.passwordTextField(driver).sendKeys(getProperty(\"validPassword\"));\n\n\t\t// 3. Click on the Login button\n\t\tLoginPageObjects.loginButton(driver).click();\n\t\t// waiting.waitForLoad(driver);\n\t}", "private void loginSuccess(String uname) {\n }", "public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }", "public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }", "@Test\r\n\tpublic void login() {\n\t\tUser loginExit = userMapper.login(\"wangxin\", \"123456\");\r\n\t\tif (loginExit == null) {\r\n\t\t\tSystem.out.println(\"用户不存在\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(loginExit);\r\n\t\t\tSystem.out.println(\"登录成功!\");\r\n\t\t}\r\n\t}", "private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }", "private void validateLoginUser() {\n\t\tUser user = userDao.getByPin(et_password.getText().toString());\n\t\tSession.setDriver(user);\n\n\t\tif (user.getWorkStatus().equals(User.STATUS_INACTIVE)) {\n\n\t\t\tdoLogin();\n\t\t} else {\n\t\t\tString locAt = \"\";\n\t\t\tif (user.getWorkStatus().equals(User.STATUS_IN_VEHICLE)) {\n\t\t\t\tVehiclesDao dao = new VehiclesDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentVehicleId()).getName();\n\t\t\t} else {\n\t\t\t\tServiceLocationDao dao = new ServiceLocationDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentServiceLocationId()).getName();\n\t\t\t}\n\t\t\tString msg = \"You are currently marked as \" + user.getWorkStatus() + \" at \" + locAt + \" since \" + user.getWorkStatusDate()\n\t\t\t\t\t+ \"\\n\" + \"Do you want to continue and override this status?\";\n\t\t\tAlertDialog.Builder alert_box = new AlertDialog.Builder(this);\n\t\t\talert_box.setIcon(R.drawable.icon);\n\t\t\talert_box.setMessage(msg);\n\t\t\talert_box.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdoPunchOut(et_password.getText().toString());\n\t\t\t\t\tdoLogin();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\talert_box.setNeutralButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talert_box.show();\n\t\t}\n\t}", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !Utility_Helper.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utility_Helper.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n // if user flow not cancelled execute Simulate_Login_Task asyncronous task\n // to simulate login\n Simulate_Login_Task task = new Simulate_Login_Task(this, dummyList, email, password);\n task.setOnResultListener(asynResult);\n task.execute();\n }\n }", "public boolean login() throws LoginException\n {\n System.out.println(\"*** Logging in user ***\");\n System.out.println(\"isIdentityAssertion = \" + isIdentityAssertion);\n // only called (once!) after initialize\n\n // loginSucceeded should be false\n // principalsInSubject should be false\n\n // Call a method to get the callbacks.\n // For authentication, it will have one for the\n // username and one for the password.\n Callback[] callbacks = getCallbacks();\n\n // Get the user name.\n String userName = getUserName(callbacks);\n\n if (userName.length() > 0) {\n // We have a user name\n\n\n // Get the password for this login attempt\n // and make sure it matches the password for the user.\n try {\n if (isIdentityAssertion == false) {\n String passwordWant = null;\n try {\n database.openConnection();\n passwordWant = database.getUserPassword(userName);\n } catch (Exception e) {\n String errMsg = \"Authentication Failed: \"+e.getMessage();\n throwFailedLoginException(errMsg);\n }\n\n String passwordHave = getPasswordHave(userName, callbacks);\n if (passwordWant == null || !passwordWant.equals(passwordHave)) {\n String errMsg = \"Authentication Failed: User \"+userName +\n \" bad password or User \"+userName+\" doesn't exist.\";\n throwFailedLoginException(errMsg);\n }\n } else {\n try {\n database.openConnection();\n if (!database.validateUserExists(userName)) {\n String errMsg = \"Authentication Failed: user does not exist\";\n throwFailedLoginException(errMsg);\n }\n } catch (Exception e) {\n String errMsg = \"Authentication Failed: \"+e.getMessage();\n throwFailedLoginException(errMsg);\n }\n }\n loginSucceeded = true;\n\n // since the login succeeded, add the user and its groups to the\n // list of principals we want to add to the subject.\n principalsForSubject.add(new WLSUserImpl(userName));\n\n addGroupsForSubject(userName);\n } finally {\n // Close database connection after all processing is done.\n database.closeConnection();\n }\n }\n\n return loginSucceeded;\n }", "@Override\n public void check() {\n if(StringUtils.isBlank(username)||StringUtils.isBlank(password)){\n logger.error(\"登陆失败!\");\n throw new InyuException(ExceptionEnum.INVALID_PARAM.getIndex(),\"用户名或密码为空!\");\n }\n }", "@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}", "public static boolean login(Context ctx) {\n\t\t\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\t\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\t\n\t\tif(username.equals(\"user\") && password.equals(\"pass\")) {\n\t\t\tctx.res.setStatus(204);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"McBobby\",true));\n\t\t\treturn true;\n\t\t}else {\n\t\t\t\n\t\t\tctx.res.setStatus(400);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n//\t\tctx.queryParam(password); /authenticate?password=value\n//\t\tctx.pathParam(password); /authenticate/{password}\n\t}", "private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }", "public void loginUser() {\n \tString username = usernameField.getText().toString();\n \tString password = passwordField.getText().toString();\n \n \t// Validation part.\n \tString empty = \"\";\n \t// Check if username is empty.\n \tif(username.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a username.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t// Check if username contains othe characters.\n \tif(! Pattern.matches(\"[a-zA-Z]+\", username)) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Username can only contain alphabets\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t\n \t// Check if password is empty.\n \tif(password.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a password.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n\n \t\n \tArrayList<NameValuePair> userData = new ArrayList<NameValuePair>();\n \tuserData.add(new BasicNameValuePair(\"username\", username));\n \tuserData.add(new BasicNameValuePair(\"password\", password));\n \t\n \t// Now send the data to the login user task to\n \t// check if they are correct.\n \tnew AuthenticateUserTask(this, userData).execute();\n \t\n }", "@Override\n public boolean checkLogin(String login, String password) {\n logger.info(\" This is checkLogin service ,Geting user from DB with login = \" + login);\n User user = userDao.get(login);\n if (user == null) {\n logger.info(\"This is checkLogin service, user was not found\");\n return false;\n }\n logger.info(\"We was got user by login : \" + login);\n logger.info(\"Checking user password...\");\n if (user.getPassword().equals(password)) {\n logger.info(\"Password is ok\");\n }\n return user.getPassword().equals(password);\n\n }", "private static boolean authenticateUser(String username_input, String password_input){\n\t\tif(!username_input.equals(USERNAME) || !password_input.equals(PASSWORD)){\n\t\t\tSystem.out.println(\"Invalid Credentials Entered!\");\n\t\t\treturn false;\n\t\t}\n\t\telse //username and password entered were correct\n\t\t\tSystem.out.println(\"User Credentials Authenticated! Please wait while books and students are being loaded.\");\n\t\treturn true;\n\t}", "public static void login(Lookup lookup) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tSystem.out.println(\"Enter your UserName: \");\r\n\t\t\t\r\n\t\t\tString name = sc.nextLine();\r\n\r\n\t\t\tSystem.out.println(\"Enter your Password: \");\r\n\t\t\t\r\n\t\t\tString pass = sc.nextLine();\r\n\r\n\t\t\tsUser = lookup.checkLoginAuth(name, pass);\r\n\r\n\t\t} catch (InvalidInputException e) {\r\n\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tSystem.err.flush();\r\n\r\n\t\t}\r\n\r\n\t}", "private void attemptLogin() {\n\n String username = mEmailView.getText().toString().trim();\n String idNumber = mIdNumber.getText().toString().trim();\n String password = mPasswordView.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n// usernameView.setError(errorMessageUsernameRequired);\n// errorView = usernameView;\n }\n\n if (TextUtils.isEmpty(password)) {\n// password.setError(errorMessagePasswordRequired);\n// if (errorView == null) {\n// errorView = passwordView;\n// }\n }\n\n final User user = new User();\n ((DealerManager)getApplication()).setUser(user);\n navigateTo(R.id.nav_home);\n }", "public void login(ActionEvent e) {\n boolean passwordCheck = jf_password.validate();\n boolean emailCheck = jf_email.validate();\n if (passwordCheck && emailCheck) {\n\n\n new LoginRequest(jf_email.getText(), jf_password.getText()) {\n @Override\n protected void success(JSONObject response) {\n Platform.runLater(fxMain::switchToDashboard);\n }\n\n @Override\n protected void fail(String error) {\n Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK);\n alert.showAndWait();\n }\n };\n\n\n }\n }", "boolean doLogin(UserDTO loginUser);", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "public boolean login() throws Exception {\n\n\t\tif (LoginDataBase.getInstance().constainsUsername(username)) {\n\t\t\t// local memory has records of that\n\t\t\tif (hashedPassword == LoginDataBase.getInstance()\n\t\t\t\t\t.getHashedPassword(password)) {\n\t\t\t\tsessionID = UUID.randomUUID().toString();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tPassExceptionToUI.passToUI(new PasswordMismatchError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// check with web server\n\t\t\tCertificateValidation.invalidate();\n\t\t\tURL url = new URL(\n\t\t\t\t\t\"https://mlite-demo.musoni.eu:8443/mifosng-provider/api/v1/authentication?username=\"\n\t\t\t\t\t\t\t+ username\n\t\t\t\t\t\t\t+ \"&password=\"\n\t\t\t\t\t\t\t+ password\n\t\t\t\t\t\t\t+ \"&tenantIdentifier=code4good\");\n\n\t\t\tHttpsURLConnection con = (HttpsURLConnection) url.openConnection();\n\t\t\tcon.setRequestMethod(\"POST\");\n\n\t\t\tif (con.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\t// if the account is found in web server\n\t\t\t\tLoginDataBase.getInstance().updateDataBase(username, hashedPassword);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// if web server does not have match\n\t\t\t\tPassExceptionToUI.passToUI(new UsernameMismatchError(username));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "private boolean authenticatedUser(String uName, String pass) {\n\t\treturn true;\n\t}", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "public boolean isCorrectLoginDetails(String username, String password) {\n boolean isExistingLogin = false; \n \n //Retrieve all existing user objects from the db. \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n //For each object in the array, check if there is a match for the user inputs and the object properties. \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username) && aUser.password.equals(password)) {\n isExistingLogin = true; \n }\n }\n return isExistingLogin; \n }", "@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }", "public boolean logIn() { // boolean need to check \"exit\"\n System.out.println();\n System.out.println(\"Enter your card number:\");\n String tryNum = s.nextLine();\n if (tryNum.equals(\"\")) {\n tryNum = s.nextLine();\n }\n System.out.println(\"Enter your PIN:\");\n String tryPin = s.nextLine();\n if (data.selectNum(tryNum) && data.selectPin(tryNum).equals(tryPin)) { //check contain cardNum in DB and correct pin for this cardNum\n this.cardNum = tryNum;\n this.pin = tryPin;\n this.balance = data.selectBalance(cardNum);\n System.out.println();\n System.out.println(\"You have successfully logged in!\");\n return operaion();\n } else {\n System.out.println(\"Wrong card number or PIN!\");\n return false;\n }\n }", "boolean login(String userName, String password) {\n RatAppModel.checkInitialization();\n String getUsersText = \"SELECT * FROM users WHERE username=?\";\n ResultSet results;\n boolean loginStatus;\n try {\n PreparedStatement statement = db.getStatement(getUsersText);\n statement.setString(1, userName);\n results = db.query(statement);\n if (!results.next()) {\n // No entries in DB for passed in username\n results.close();\n loginStatus = false;\n } else {\n String dbPass = results.getString(\"password\");\n int salt = results.getInt(\"salt\");\n String hashPass = hasher.getSecurePassword(Integer.toString(salt),\n password);\n if (dbPass.equals(hashPass)) {\n //Log.i(\"login\", \"auth success\");\n loginStatus = true;\n String profileName = results.getString(\"profileName\");\n String address = results.getString(\"homeLocation\");\n boolean isAdmin = results.getBoolean(\"isAdmin\");\n currentUser = new User(userName, profileName, address, isAdmin);\n } else {\n //Log.i(\"login\", \"auth failed\");\n loginStatus = false;\n }\n results.close();\n }\n return loginStatus;\n } catch (SQLException e) {\n Log.e(\"login\", e.getMessage());\n return false;\n }\n }", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "public boolean validateLogin(String username, String password, String person){\n\n\t\t boolean verify = false;\n\t\t try{\n\t\t\t //Read from the customer list if the radio button checked was customer\n\t\t\t if(person.equals(\"customer\")){\n\t\t\t\t readFile = new Scanner(new FileInputStream(\"./customer.txt\"));\n\t\t\t }\n\t\t\t //Read from the manager list if the radio button checked was manager\n\t\t \t else if(person.equals(\"manager\")){\n\t\t \t\t readFile = new Scanner(new FileInputStream(\"./manager.txt\"));\n\t\t \t }\n\t\t\t String user, pass, u1, p1;\n\t\t\t user = username;\n\t\t\t pass = password;\n\t\t\t //continue to read each line \n\t\t\t while(readFile.hasNextLine()){\n\t\t\t\t u1 = readFile.next();\n\t\t\t\t p1 = readFile.next();\n\t\t\t\t if(u1.equals(user)&& p1.equals(pass)){\n\t\t\t\t\t verify = true;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t\t return verify;\n\t\t } catch (FileNotFoundException f){\n\t\t\t System.out.println(\"File not found\");\n\t\t }\n\t\t return verify;\n\t }", "private void authenticate(String user, String pass) {\n }", "List<String> authenticateUser(String userName, String password);", "private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }", "public static void main(String[] args) {\n\n String username = \"Gulzhaina\";\n String password = \"12345\";\n Scanner input = new Scanner(System.in);\n String username2 = input.nextLine();\n\n\n if(username2.equals(username)){\n System.out.println(\"Please enter your password: \");\n String password2 =input.nextLine();\n if(password2.equals(password)){\n System.out.println(\"Login successful\");\n } else{\n System.out.println(\"Wrong password\");\n }\n }\n else {\n System.out.println(\"invalid username\");\n }\n\n }", "@Override\n public boolean checkLogin(String login, String password) throws DaoException {\n User user = userDao.getByEmail(login);\n boolean result = false;\n if (user != null && user.getPassword().equalsIgnoreCase(DigestMD5Helper.computeHash(password))) {\n log.info(\"User {} {} has successfully logged in\", user.getFirstName(), user.getLastName());\n result = true;\n }\n return result;\n }", "public void login(final View v) {\n\n // validate login here\n dbHelper = new EMFMonitorDbHelper(this);\n db = dbHelper.getReadableDatabase();\n\n String username = usernameField.getText().toString();\n String password = passwordField.getText().toString();\n\n Cursor cur = db.rawQuery(\"SELECT * FROM users WHERE username = ? AND password = ?\",\n new String[] {username, password});\n\n if (cur.moveToFirst()) {\n if (cur.getInt(EMFMonitorDbHelper.CAN_WORK_INDEX) > 0) {\n Intent i = new Intent(this, MainActivity.class);\n i.putExtra(\"USERNAME\", username);\n i.putExtra(\"UID\", cur.getInt(EMFMonitorDbHelper.UID_INDEX));\n i.putExtra(\"UNITS\", cur.getString(EMFMonitorDbHelper.UNITS_INDEX));\n i.putExtra(\"ALARM_THRESHOLD\", cur.getDouble(EMFMonitorDbHelper.ALARM_THRESHOLD_INDEX));\n startActivity(i);\n finish();\n }\n else {\n Toast toast = Toast.makeText(this, \"You have been exposed to unsafe levels of EMF\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }\n else {\n Toast toast = Toast.makeText(this, \"Invalid Username or Password\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n\n }", "public void login(View view) {\n\n validateLogin(email.getText().toString(), pw.getText().toString());\n\n/*\n Intent i = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(i);\n finish();\n\n */\n\n }", "@Then(\"^I can login using my details$\")\n\tpublic void i_can_login_using_my_details() {\n\t \n\t}", "@FXML\n\tpublic void logIn() throws SQLException {\n\t\tboolean flag = false;\n\t\tConnection tempCon = DBConnection.getConnection();\n\t\tString sql = \"{ ? =call login_verify(?,?)}\";\n\t\tCallableStatement stmt = tempCon.prepareCall(sql);\n\t\tstmt.setString(2, email.getText());\n\t\tstmt.setString(3, pass.getText());\n\t\tstmt.registerOutParameter(1, Types.INTEGER);\n\t\t\n\t\tstmt.execute();\n\t\tint temp = stmt.getInt(1);\n\t\tSystem.out.println(temp);\n\t\tif(temp==0) {\n\t\t\t\n\t\t\tlogStatus.setText(\"Login Failed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tMain.cusID = temp;\n\t\t\tFXMLLoader Loader = new FXMLLoader();\n\t\t\tLoader.setLocation(getClass().getResource(\"/application/searchByLocation.fxml\"));\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoader.load();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tParent root = Loader.getRoot();\n\t\t\tScene scene = new Scene(root,600,600);\n\t\t\tMain.window.setScene(scene);\n\t\t\tMain.window.show();\n\t\t}\n\t\t\n\t\ttempCon.close();\n\t\t\n\t}", "public static void main(String[] args) {\r\n\r\n Scanner scan =new Scanner(System.in);\r\n System.out.println(\"User Name:\");\r\n String userName = scan.next();\r\n System.out.println(\"Password:\");\r\n String password = scan.next();\r\n\r\n if (userName.equalsIgnoreCase(\"user123\") && password.equalsIgnoreCase(\"pass123\") ) {\r\n System.out.println(\"Login Succesfull\");\r\n } else if (! userName.equalsIgnoreCase(\"user123\") && password.equalsIgnoreCase(\"pass123\") ) {\r\n System.out.println(\"Username is not Correct\");\r\n } else if (userName.equalsIgnoreCase(\"user123\") && ! password.equalsIgnoreCase(\"pass123\")) {\r\n System.out.println(\"Password is not Correct\");\r\n } else if (! userName.equalsIgnoreCase(\"user123\") && ! password.equalsIgnoreCase(\"pass123\") ) {\r\n System.out.println(\"User name and Password is not correct\");\r\n }\r\n\r\n }" ]
[ "0.6867384", "0.68547535", "0.67607045", "0.66969067", "0.66951555", "0.6687553", "0.6680759", "0.6679143", "0.66767037", "0.6652187", "0.66480654", "0.66439676", "0.66098386", "0.66013855", "0.6600687", "0.655696", "0.6552728", "0.6547856", "0.65422386", "0.65037185", "0.6491591", "0.64764905", "0.64688367", "0.6444056", "0.6426944", "0.64150983", "0.6412241", "0.6403", "0.63949233", "0.63915217", "0.6390446", "0.6385944", "0.6384676", "0.63833374", "0.63808817", "0.6378186", "0.6376801", "0.6366509", "0.6358745", "0.63546467", "0.6346086", "0.6331217", "0.63191634", "0.631283", "0.63114476", "0.63052315", "0.63017225", "0.63000387", "0.6291048", "0.6289999", "0.62866706", "0.62799335", "0.6272476", "0.6272476", "0.62704414", "0.62688196", "0.6266217", "0.62637347", "0.62636584", "0.62594914", "0.62565243", "0.62536854", "0.6251304", "0.6249838", "0.62486637", "0.6247781", "0.6247271", "0.6238884", "0.62349117", "0.6234025", "0.6233736", "0.6229873", "0.62291443", "0.622458", "0.62239206", "0.6223088", "0.6211701", "0.6199997", "0.6194219", "0.619318", "0.6191442", "0.61908174", "0.6189239", "0.6188168", "0.61869854", "0.61858964", "0.61858356", "0.618396", "0.61796176", "0.6177603", "0.61636925", "0.61629343", "0.6162142", "0.61595136", "0.61590475", "0.6158022", "0.6152238", "0.61496437", "0.6148452", "0.6145643", "0.61427987" ]
0.0
-1
Method is used to check if the username and password entered have previously been registered
public static boolean validLoginEntered(String username, String enteredPassword) { int usernameIndex; String actualPassword; usernameIndex = loginDetails.get(0).indexOf(username); userIndex = usernameIndex; if(username == null || enteredPassword == null) return true; if(usernameIndex != -1) { actualPassword = loginDetails.get(1).get(usernameIndex); if(!actualPassword.equals(enteredPassword)) return false; else return true; } else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean AlreadyLogin() {\n\t\tString usn = uPreferences.getString(\"username\", null);\n\t\tString pwd = uPreferences.getString(\"password\", null);\n\t\tif((usn == null) || ((pwd == null))){\n\t\t\treturn false;\n\t\t}\n\t\telse \n\t\t\treturn true;\n\t}", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "public boolean checkRegister() {\n\n\t\tif (!email.getText().equals(\"\") && !username.getText().equals(\"\") && !psw.getText().equals(\"\")) {\n\t\t\tResultSet test = Database.getInstance().query(\"SELECT * FROM utilisateur\");\n\t\t\ttry {\n\t\t\t\twhile (test.next()) {\n\t\t\t\t\tif (test.getString(2).equals(username.getText()) && test.getString(4).equals(email.getText())\n\t\t\t\t\t\t\t&& test.getString(3).equals(psw.getText())) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean verifyCredentials() {\n\n boolean bCredentialsValid = false;\n strUserMailID = strUserName = \"\";\n\n // Get the account information, if existing\n DatabaseHandler dbHandler = new DatabaseHandler(getApplicationContext());\n AccountInformation accInfo = dbHandler.getAccountInfo(m_tfUserEmailID.getText().toString());\n\n if(accInfo != null) {\n\n // Compute the hash for the user entered password\n OperationsHelper helper = new OperationsHelper();\n String strHashPwd = helper.getHashedPassword(m_tfUserPassword.getText().toString(), accInfo.getSaltValue());\n if(strHashPwd.equals(accInfo.getPassword())) {\n\n bCredentialsValid = true;\n strUserMailID = accInfo.getEmail();\n strUserName = accInfo.getName();\n\n // If Always login option is checked, update the value in the database\n if( ! (m_cbAutoLogon.isChecked() == accInfo.getIfAlwaysSignIn()) ) {\n\n accInfo.setAlwaysSignIn(m_cbAutoLogon.isChecked());\n dbHandler.updateAlwaysSignOnOption(accInfo);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Incorrect Password\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(getApplicationContext(), \"No such account exists. \\n\" +\n \" Create one to login\", Toast.LENGTH_LONG).show();\n }\n\n return bCredentialsValid;\n }", "boolean hasPassword2();", "boolean hasLogin();", "boolean hasLogin();", "public boolean ValidCredentials() { \n\t\tif(!isEmptyFieldData()){\n\t\t\tSystemUserQuery sq = new SystemUserQuery();\n\t\t\tUser user = sq.loginQuery(getUsername(), getPassword());\n\t\t\t\n\t\t\tif(user != null){\n\t\t\t\tMain.setCurrentUser(user);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public abstract boolean checkCredentials (String username, String password);", "private boolean attemptRegistration() {\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String name = mFullName.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String confPassword = mPasswordConf.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(!TextUtils.isEmpty(confPassword) && !password.equals(confPassword)){\n mPasswordConf.setError(\"The passwords do not match\");\n focusView = mPasswordConf;\n cancel = true;\n }\n\n if(TextUtils.isEmpty(name)){\n mFullName.setError(getString(R.string.error_field_required));\n focusView = mFullName;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n return !cancel;\n }", "public static boolean checkPassword()\n {\n String pw = SmartDashboard.getString(\"Password\");\n SmartDashboard.putString(\"Password\", \"\"); //Clear the password field so that it must be reentered\n\n if(pw.equals(ADMIN_PASSWORD))\n return true;\n else\n {\n log(\"Password invalid\"); //The user gave an incorrect password, inform them.\n return false;\n }\n }", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "public boolean passwordCheck() {\n\t\tSystem.out.println(\"Password is: \"+LoggedUser.getPassword());\n\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\tparams.addValue(\"username\", LoggedUser.getUsername());\n\t\tparams.addValue(\"password\", LoggedUser.getPassword());\n\t\treturn jdbc.queryForObject(\"select count(*) from authors where username=:username and password=:password\", \n\t\t\t\tparams, Integer.class) > 0;\n\t}", "boolean isUserExist(String username, String password);", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "boolean validateUserAndPassword(String username, String password);", "public boolean loginCheck() {\n\t\tif(allParametersGiven==true) {\n\t\t\treturn dtb.checkLoginDetais(username,password);\n\t\t}\n\t\treturn false;\n\t}", "public boolean checkCredentials(String inputLogin, String inputPassword) {\n //creates boolean variable flag and defines it as True\n boolean flag = false;\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to retrieve values of a User object from the database\n String query = \"SELECT * FROM User WHERE userID = '\" + inputLogin + \"' AND password = '\" + inputPassword + \"';\";\n Statement statement = con.createStatement();\n ResultSet result = statement.executeQuery(query);\n /*\n if statement compares data entered by user with data in the database. If there is such data in the database\n users credentials are put into MainWindow variables and defines flag variable as True\n */\n if(result.getString(\"userID\").equals(inputLogin) && result.getString(\"password\").equals(inputPassword)) {\n flag = true;\n MainWindow.userLastName = result.getString(\"lastName\");\n MainWindow.userFirstName = result.getString(\"firstName\");\n MainWindow.userID = inputLogin;\n MainWindow.userPassword = inputPassword;\n }//end if statement\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n return flag;\n }", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "public boolean isUserExist(String email, String Password);", "public boolean passwordAvailable() {\r\n return !password.isEmpty();\r\n }", "public boolean checkLogin() {\r\n try {\r\n String select = \"SELECT * FROM LOGIN\";\r\n ResultSet rs = model.ConnectToSql.select(select);\r\n while (rs.next()) {\r\n if (this.username.equals(rs.getString(1)) && new MD5().md5(this.password).equals(rs.getString(2))) {\r\n this.fullname = rs.getString(4);\r\n this.codeID = rs.getString(3);\r\n model.ConnectToSql.con.close();\r\n return true;\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n //e.printStackTrace();\r\n\r\n }\r\n return false;\r\n }", "private boolean checkCredentials(String userName, String password)\n {\n int count = 0;\n for(String user : userNames)\n {\n if(user.contentEquals(userName))\n {\n if(passwords[count].contentEquals(password))\n {\n return true;\n }\n }\n count++;\n }\n\n return false;\n }", "Boolean isValidUserPassword(String username, String password);", "public boolean validateUser (String username, String password){\n Cursor cursor = dbHelper.getReadableDatabase().rawQuery(\n \"SELECT * FROM \" + dbHelper.TABLE_USERS + \" WHERE \" + dbHelper.COLUMN_USERNAME\n + \"='\" + username + \"' AND \" + dbHelper.COLUMN_PASSWORD + \"='\" + password + \"'\",null);\n if (cursor.getCount()>0){\n return true;\n }else {\n return false;\n }\n }", "private void checkValidLogin(String username, String password) {\r\n //The check username will check to see if a password was returned. That means the user\r\n //exists. If a void is returned, then the user does not exist.\r\n String actualPassword = checkUsername(username);\r\n\r\n //If a null was passed back, then the username does not exist. We signal the user.\r\n if (actualPassword == null) {\r\n signalInvalidUser();\r\n return;\r\n }\r\n\r\n //We check to see if the password that was type is equal to the 1 we got from the DB. If\r\n //not we signal the user.\r\n if (!checkPassword(password, actualPassword)){\r\n signalInvalidPassword();\r\n return;\r\n }\r\n\r\n //If everything worked, we go to the landing page.\r\n goToLandingPage();\r\n }", "private boolean checkUsername() {\n if(getUsername.getText().compareTo(\"\") != 0) { return true; }\n else {\n errorMessage.setText(\"Please enter a username.\");\n return false;\n }\n }", "public boolean checkUsername(String username, String password) {\n try {\n remoteUserAccess = new RemoteUserAccess(new URI(\"http://localhost:8080/api/user/\"));\n } catch (Exception e) {\n remoteUserAccess = new DirectUserAccess();\n }\n Collection<User> userPasswords = remoteUserAccess.getUsers();\n if (!userPasswords.stream().anyMatch(a -> a.getUsername().equals(username))) {\n return false;\n } else if (!userPasswords.stream()\n .filter(p -> p.getUsername().equals(username))\n .findFirst().get().getPassword()\n .equals(password)) { // Chekcs if passwords match\n return false;\n }\n return true;\n\n }", "boolean isLoginAvailable();", "public boolean verifyFields() {\n String fname = firstName.getText();\n String lname = lastName.getText();\n String username = userName.getText();\n String emailString = email.getText();\n String passwordString = String.valueOf(password.getText());\n String confirmPasswordString = String.valueOf(confirmPassword.getText());\n\n\n if (fname.trim().equals(\"\") || lname.trim().equals(\"\") || username.trim().equals(\"\") || emailString.trim().equals(\"\") || passwordString.trim().equals(\"\")) {\n\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Fill in the Required Fields\");\n\n return false;\n }\n\n //check if confirm password equals password\n else if (!passwordString.equals(confirmPasswordString)) {\n outputText.setStyle(\"-fx-text-fill: #D33232\");\n outputText.setText(\"Password does not match Confirm Password\");\n return false;\n }\n\n // if everything is fine\n else {\n return true;\n }\n }", "public boolean logInDatosCorrectos(){\n if (txtNombreUsuario.getText().equals(\"\") || txtContraseña.getText().equals(\"\")){\n return false;\n }\n return true;\n }", "boolean hasUserName();", "private boolean doCheckNewPassword() {\n\t\tif (!newPassword.equals(confirmPassword)) return false;\n\t\trecord(\"new password checked\");\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean verifyUser(String username,String password )\n\t{\n\t\tboolean b;\n\t\tString sql = \"select username,password from f_loginTable where username=? and password=?\";\n\t\tint noOfRows=template.update(sql, new Object[] {username,password});\n\t\tif(noOfRows==1)\n\t\t{b=true;}\n\t\telse \n\t\t{b=false;}\n\t\treturn b;\t\t\n\t}", "private boolean checkUserInfo(String username, String password) {\n\t\treturn !(username == null || username.isEmpty()\n\t\t\t\t|| password == null || password.isEmpty() || password.length() < 6 && password.length() > 12);\n }", "public static boolean checkUserPass(String username, String password){\n getCurrentUsers();\n if(userPasses.containsKey(username)){\n System.out.println(\"bo\");\n if (userPasses.get(username).equals(password)){\n return true;\n }\n }\n System.out.println(username +\"|\"+password);\n return false;\n }", "Boolean checkCredentials(String username, String password) throws\n SQLException, UserNotFoundException;", "boolean getPasswordValid();", "private static boolean authenticateUser(String username_input, String password_input){\n\t\tif(!username_input.equals(USERNAME) || !password_input.equals(PASSWORD)){\n\t\t\tSystem.out.println(\"Invalid Credentials Entered!\");\n\t\t\treturn false;\n\t\t}\n\t\telse //username and password entered were correct\n\t\t\tSystem.out.println(\"User Credentials Authenticated! Please wait while books and students are being loaded.\");\n\t\treturn true;\n\t}", "public boolean logOn(String username, String password) {\n ArrayList<String> listOfUsernames = database.returnAllUsernames();\n for (int rowBeingChecked = 0; rowBeingChecked < listOfUsernames.size(); rowBeingChecked++) {\n if (listOfUsernames.get(rowBeingChecked).equals(username)) {\n byte[] saltAndHash = pullSaltAndHashFromDatabase(username);\n byte[] saltPulled = new byte[16];\n byte[] hashPulled = new byte[16];\n\n //Splitting 'saltAndHash' into separate bytes:\n for (int byteCounter = 0; byteCounter < 16; byteCounter++) {\n saltPulled[byteCounter] = saltAndHash[byteCounter];\n }\n for (int byteCounter = 0; byteCounter < 16; byteCounter++) {\n hashPulled[byteCounter] = saltAndHash[byteCounter + 16];\n }\n\n //Creating the hash again, and returning boolean if they're equal.\n KeySpec spec = new PBEKeySpec(password.toCharArray(), saltPulled, 66536, 128);\n try {\n SecretKeyFactory factory = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n byte[] hashGenerated = factory.generateSecret(spec).getEncoded();\n return Arrays.equals(hashGenerated, hashPulled);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return false;\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n //If user name not in table:\n return false;\n }", "private boolean validateLogin() {\n final String userName = userText.getText().toString();\n final String userPass = passwordText.getText().toString();\n if (\"\".equals(userName)) {\n userText.setError(\"You must enter a username\");\n return false;\n }\n if (\"\".equals(userPass)) {\n passwordText.setError(\"You must enter a password\");\n return false;\n }\n return true;\n }", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "static boolean logIn(String username, String password) {\r\n if (accounts.containsKey(username)) {\r\n if (accounts.get(username).getPassword().equals(password)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean validate(String username, String password) {\n\t\tif(username.equals(\"Venkat\") && password.equals(\"kumar\")) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\t\t// validate username and pwd with predefined credentials\n\t\tif (username.equals(Utility.USERNAME) && password.equals(Utility.PASSWORD)) {\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean verifyUser(String username, String password) throws SQLException {\n\n // update sql\n String pwGot = getPassword(username);\n\n if (pwGot.equals(password)) {\n return true;\n }\n\n return false;\n }", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }", "private void checkPreferences() {\n String email = pref.get(EMAIL, EMPTY);\n String hashedPassword = pref.get(PASSWORD, EMPTY);\n if(!email.equals(EMPTY) && !hashedPassword.equals(EMPTY)){\n rememberMe.setSelected(true);\n emailField.setText(email);\n String passTemp = getStringWithPasswordLength();\n passwordField.setText(passTemp);\n }\n }", "public boolean checkUser(String username, String password) {\n String[] columns = {COL_1};\n SQLiteDatabase db = getReadableDatabase();\n String selection = COL_2 + \"=?\" + \" and \" + COL_3 + \"=?\";\n String[] selectionArgs = {username, password};\n Cursor cursor = db.query(USER_TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n int count = cursor.getCount();\n cursor.close();\n db.close();\n\n if (count > 0)\n return true;\n else\n return false;\n }", "private boolean checkLogin(String username, String passwordMD5) {\n try {\n Statement stmt = GUITracker.conn.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * from account where username='\" + username + \"' and password='\" + passwordMD5 + \"'\");\n if (rs.next()) {\n //iduser = rs.getInt(\"Id\");\n return true;\n } else {\n return false;\n } \n \n// if ((username.equals(usernamePeer)) && (passwordMD5.equals(passwordPeer))) {\n// return true;\n// } else {\n// return false;\n// }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "private boolean validateInput() {\n String username = editUsername.getText().toString().trim();\n String email = editEmail.getText().toString().trim();\n String password = editPassword.getText().toString().trim();\n String repeatPassword = editRepeatPassword.getText().toString().trim();\n if (!password.equals(repeatPassword)) {\n ShowMessageUtil.tosatSlow(\"Enter passwords differ\", EmailRegisterActivity.this);\n return false;\n } else if (username.equals(\"\") || email.equals(\"\") || password.equals(\"\")) {\n ShowMessageUtil.tosatSlow(\"every item can not be empty!\", EmailRegisterActivity.this);\n return false;\n }\n if (username.length()>10){\n ShowMessageUtil.tosatSlow(\"the character length of the username can't be over than 10\", EmailRegisterActivity.this);\n return false;\n }\n return true;\n }", "public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }", "boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;", "public boolean reconcilePassword(){\r\n if((signup.getFirstPassword()).equals(signup.getSecondPassword())){\r\n \r\n return true;\r\n \r\n }\r\n else{\r\n \r\n return false;\r\n }\r\n }", "boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);", "@Override\n public void onClick(View v) {\n String usernanme=et_username.getText().toString().trim();\n String password=et_password.getText().toString().trim();\n if(usernanme.equals(\"\")||password.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n String msg=repo.CheckUserAlreadyExist(usernanme,password);\n if(!msg.equals(\"exist\"))\n {\n repo.addUser(usernanme,password);\n dialog.dismiss();\n }\n else\n {\n Toast.makeText(AdminHomeActivity.this, \"Username or Password Already Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n\n\n }", "private final static void onRegister(TextField username, TextField email, PasswordField password, PasswordField passwordAgain)\n\t{\n\t\t// TODO no password = passwordAgain check\n\t\t// TODO check if username exists\n\t\t// TODO check if email exists\n\n\t\tint id = ProfileManipulation.getHighestId(\"Profile\", true);\n\t\tProfileManipulation.registerUser(id, username.getText(), email.getText(),\n\t\t\t\tpassword.getText());\n\t\tPartylize.setUsername(username.getText());\n\t\tPartylize.showMainScene();\n\t}", "User checkUser(String username, String password);", "@Override\n public boolean userLogin(String username, String password) \n {\n User tmpUser = null;\n tmpUser = getUser(username);\n if(tmpUser == null) return false;\n if(tmpUser.getPassword().equals(password)) return true;\n return false;\n }", "public boolean isCorrectLoginDetails(String username, String password) {\n boolean isExistingLogin = false; \n \n //Retrieve all existing user objects from the db. \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n //For each object in the array, check if there is a match for the user inputs and the object properties. \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username) && aUser.password.equals(password)) {\n isExistingLogin = true; \n }\n }\n return isExistingLogin; \n }", "private boolean isValidInput() {\n if (null == mUsername || mUsername.length() <= 0) {\n return false;\n } else if (null == mPassword || mPassword.length() <= 0) {\n return false;\n }\n return true;\n }", "public Boolean usernamepassword (String username,String password) {\n SQLiteDatabase sdb = this.getReadableDatabase();\n Cursor cursor = sdb.rawQuery(\"select * from user where username=? and password=?\",new String[]{username,password});\n if(cursor.getCount()>0) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean login() throws Exception {\n\n\t\tif (LoginDataBase.getInstance().constainsUsername(username)) {\n\t\t\t// local memory has records of that\n\t\t\tif (hashedPassword == LoginDataBase.getInstance()\n\t\t\t\t\t.getHashedPassword(password)) {\n\t\t\t\tsessionID = UUID.randomUUID().toString();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tPassExceptionToUI.passToUI(new PasswordMismatchError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// check with web server\n\t\t\tCertificateValidation.invalidate();\n\t\t\tURL url = new URL(\n\t\t\t\t\t\"https://mlite-demo.musoni.eu:8443/mifosng-provider/api/v1/authentication?username=\"\n\t\t\t\t\t\t\t+ username\n\t\t\t\t\t\t\t+ \"&password=\"\n\t\t\t\t\t\t\t+ password\n\t\t\t\t\t\t\t+ \"&tenantIdentifier=code4good\");\n\n\t\t\tHttpsURLConnection con = (HttpsURLConnection) url.openConnection();\n\t\t\tcon.setRequestMethod(\"POST\");\n\n\t\t\tif (con.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\t// if the account is found in web server\n\t\t\t\tLoginDataBase.getInstance().updateDataBase(username, hashedPassword);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// if web server does not have match\n\t\t\t\tPassExceptionToUI.passToUI(new UsernameMismatchError(username));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "boolean hasLoginResponse();", "public boolean isBothPasswordCorrect() { \n String pass1 = new String(newPasswordTextField.getPassword());\n String pass2 = new String(repeatPasswordTextField.getPassword()); \n \n return (pass1.equals(pass2) && isPasswordCorrect());\n }", "@Override\n\tpublic boolean isValid() {\n\t\tif(password != null && password.length() > 0) {\n\t\t\tboolean rst = password.equals(repeatPassword);\n\t\t\tif(rst == false) {\n\t\t\t\tMap<String, String > validationRst = getValidationRst();\n\t\t\t\tvalidationRst.put(\"password\", \"重复输入的密码不一致\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn super.isValid();\n\t}", "public void registerUser(String username, String password)\n {\n if(!spaceExists.spaceExists(SpaceUtils.getSpace()))\n {\n spaceExists.getSpaceExistsWarning(loginForm,\n \"\");\n }\n // check text fields are not blank\n if(StringUtils.isNotBlank(username) &&\n StringUtils.isNotBlank(password))\n {\n // Check length of password\n if(password.length() >= 6 &&\n password.length() <= 25)\n {\n // check username length\n if(username.length() >= 3 &&\n username.length() <= 20)\n {\n // continue\n String confirmDialogResponse = confirmPassword();\n\n// System.out.println(\"Dialog: \" + confirmDialogResponse);\n// System.out.println(\"Password: \"+password);\n if(password.equals(confirmDialogResponse))\n {\n // passwords match\n // save user to space\n try\n {\n // create new entry\n // encrypt password\n UserEntry user = new UserEntry();\n user.setUsername(username);\n user.setID(UUID.randomUUID());\n user.setSalt(CipherUtils.getSalt(30));\n user.setPassword(\n CipherUtils.generateSecurePassword(\n password, user.getSalt()));\n\n if(user.getSecureUsername().length() > 3)\n {\n // there are at least 3 non-special characters\n // create user\n if(userUtils.createUser(user) != null)\n {\n\n JOptionPane.showMessageDialog(loginForm,\n \"Welcome \" + user.getUsername() + \"!\");\n\n // remove loginForm\n loginForm.setVisible(false);\n loginForm.dispose();\n // Lease is renewed at every login\n userUtils.renewUserLease(user);\n\n // Debug:\n// UserEntry debug = (UserEntry) space.readIfExists(user, null, 3000);\n// System.out.println(\"User: \" + debug.getUsername() +\" Successfully added!\");\n// System.out.println(\"Main Form Created!\");\n\n // Create MainForm\n new MainForm(user);\n }\n else\n {\n // user already exists\n JOptionPane.showMessageDialog(loginForm,\n user.getUsername() + \" is taken.\");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Username must have at least 3 non-special characters. \");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Passwords did not match!\");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Username must be 3 - 20 characters. \");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Password must be 6 - 25 characters. \");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"A username and password are required.\");\n }\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n // Simulate network access.\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n return false;\n }\n\n for (String credential : DUMMY_CREDENTIALS) {\n String[] pieces = credential.split(\":\");\n if (pieces[0].equals(mEmail)) {\n // Account exists, return true if the password matches.\n return pieces[1].equals(mPassword);\n }\n }\n\n // TODO: register the new account here.\n return true;\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n // Simulate network access.\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n return false;\n }\n\n for (String credential : DUMMY_CREDENTIALS) {\n String[] pieces = credential.split(\":\");\n if (pieces[0].equals(mEmail)) {\n // Account exists, return true if the password matches.\n return pieces[1].equals(mPassword);\n }\n }\n\n // TODO: register the new account here.\n return true;\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n // Simulate network access.\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n return false;\n }\n\n for (String credential : DUMMY_CREDENTIALS) {\n String[] pieces = credential.split(\":\");\n if (pieces[0].equals(mEmail)) {\n // Account exists, return true if the password matches.\n return pieces[1].equals(mPassword);\n }\n }\n\n // TODO: register the new account here.\n return true;\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n // Simulate network access.\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n return false;\n }\n\n for (String credential : DUMMY_CREDENTIALS) {\n String[] pieces = credential.split(\":\");\n if (pieces[0].equals(mEmail)) {\n // Account exists, return true if the password matches.\n return pieces[1].equals(mPassword);\n }\n }\n\n // TODO: register the new account here.\n return true;\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n // Simulate network access.\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n return false;\n }\n\n for (String credential : DUMMY_CREDENTIALS) {\n String[] pieces = credential.split(\":\");\n if (pieces[0].equals(mEmail)) {\n // Account exists, return true if the password matches.\n return pieces[1].equals(mPassword);\n }\n }\n\n // TODO: register the new account here.\n return true;\n }", "public boolean checkUser(String username, String password) {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor mCursor = db.rawQuery(\"SELECT * FROM \" + TABLE_USERLIST + \" WHERE user_name=? AND user_password=?\", new String[]{username,password});\n if (mCursor != null) {\n if(mCursor.getCount() > 0)\n {\n return true;\n }\n }\n return false;\n\n }", "@Test\n public void testPasswordExists() {\n String userInput = \"Mounta1nM@n\";\n Owner testUser = ownerHelper.validateUser(\"harry.louis\", userInput);\n assertEquals(testUser.getPassword(), owner1.getPassword());\n assertEquals(testUser.getFirstName(), owner1.getFirstName());\n assertEquals(testUser.getLastName(), owner1.getLastName());\n\n }", "public boolean validateUserCredentials(String login, String password) throws SQLException;", "@Override\n public void check() {\n if(StringUtils.isBlank(username)||StringUtils.isBlank(password)){\n logger.error(\"登陆失败!\");\n throw new InyuException(ExceptionEnum.INVALID_PARAM.getIndex(),\"用户名或密码为空!\");\n }\n }", "private boolean validatePassword() throws NoSuchAlgorithmException, NoSuchProviderException \n {\n String passwordToHash = Password.getText(); \n\t\t\n \tString securePassword = null;\n \tString testPass;\n \tBoolean success=false;\n \tbyte[] salt = null;\n\n\t \n\t \n\t \n try{ \n \t\tmycon=connect.getConnect();\n \t\t \n \t\t \n String query;\n\t query =\"select password, salt\\n\" + \n\t \t\t\"from employee\\n\" + \n\t \t\t\"where userName= ?;\";\n\t \n\t PreparedStatement pstm= mycon.prepareStatement(query);\n\t pstm.setString(1, Username.getText());\n\t ResultSet rs = pstm.executeQuery();\n\t \n\t if(rs.next()) {\n\t \tsecurePassword =rs.getString(1);\n\t \t\n\t \tBlob blob = rs.getBlob(2);\n\t \t int bloblen= (int) blob.length();\n\t \t salt = blob.getBytes(1, bloblen);\n\t \t blob.free();\n\t \t\n\t \t\n\t \n\t }\n\t \n\t \n\t testPass=SecurePass.getSecurePassword(passwordToHash, salt);\n \n \t if(securePassword.equals(testPass)) {\n \t success=true;\n \t this.ActiveUser=Username.getText();\n \t }\n \t\n \t\t\n \t\t\n \t\t\n \t\t} catch (SQLException e ) {\n \t\t\te.printStackTrace(); \t\n \t\t\t\n \t\t}\n\t\treturn success;\n \n\t \t \n \n \n\t\t\n \n }", "private boolean hasRight(String introducedUsername, String introducedPaswword) {\n\n boolean hasRight = false;\n System.out.println(\"Hello from hasRight\");\n if(introducedUsername.equals(username) && introducedPaswword.equals(password)) {\n hasRight = true;\n }\n return hasRight;\n }", "private boolean validatePassword() {\n\t\tEditText pw = (EditText)view.findViewById(R.id.et_enter_new_password);\n\t\tEditText confPW = (EditText)view.findViewById(R.id.et_reenter_new_password);\n\t\t\t\n\t\tString passwd = pw.getText().toString();\n\t\tString confpw = confPW.getText().toString();\n\t\t\n\t\t// Check for nulls\n\t\tif (passwd == null || confpw == null) {\n\t\t\tToast.makeText(view.getContext(), \"Passwords are required\", Toast.LENGTH_LONG).show();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Ensure password and retypted passwords match\n\t\tif (!passwd.contentEquals(confpw)) {\n\t\t\tToast.makeText(view.getContext(), \"Passwords must match\", Toast.LENGTH_LONG).show();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Ensure password meets complexity\n\t\tif (passwd.length() < 7) { // min length of 7 chars\n\t\t\tToast.makeText(view.getContext(), \"Password must be at least 7 characters long\", \n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Not really sure what the requirements are for private key password complexity yet\n\t\tnewPassword = passwd; // Set class variable with new password\n\t\treturn true;\n\t}", "public boolean hasCredentials(){\r\n return state;\r\n }", "@Override\n\tpublic boolean checkIsPwdSame(String username, String pwd) {\n\t\tString oldPwd = mvd.querryPwd(username);\n\t\tif(oldPwd.equals(pwd)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkUserInformation(String name,String userName,String email,String password)\n {\n\n if(userName.isEmpty())\n {\n eUserName.setError(\"empty field\");\n return false;\n }\n\n if(name.isEmpty())\n {\n eName.setError(\"empty field\");\n return false;\n }\n\n if(email.isEmpty())\n {\n eEmail.setError(\"empty field\");\n return false;\n }\n if(password.isEmpty())\n {\n ePassword.setError(\"empty field\");\n return false;\n }\n\n\n if(password.length()<6)\n {\n ePassword.setError(\"Invalid password\");\n ePassword.requestFocus();\n return false;\n }\n if(password.length()>16)\n {\n ePassword.setError(\"Invalid password\");\n ePassword.requestFocus();\n return false;\n }\n\n if(eAddress.getText().toString().isEmpty())\n {\n eAddress.setError(\"Invalid address\");\n eAddress.requestFocus();\n return false;\n }\n\n if(eFavourite.getText().toString().isEmpty())\n {\n eFavourite.setError(\"empty field\");\n eFavourite.requestFocus();\n return false;\n }\n\n if(!email.contains(\"@\"))\n {\n eEmail.setError(\"Invalid email\");\n eEmail.requestFocus();\n return false;\n }\n\n if(name.length()<3)\n {\n eName.setError(\"Invalid name\");\n eName.requestFocus();\n return false;\n }\n\n for(char c : name.toCharArray()){\n if(Character.isDigit(c)){\n eName.setError(\"Invalid Name\");\n eName.requestFocus();\n return false;\n }\n }\n\n if(userName.length()<5)\n {\n eUserName.setError(\"User name must be in 6 to 12 character\");\n eUserName.requestFocus();\n return false;\n }\n\n if(eAddress.getText().toString().length()<10||eAddress.getText().toString().length()>30)\n {\n eAddress.setError(\"Must be in 10-30 characters\");\n eAddress.requestFocus();\n return false;\n }\n return true;\n }", "boolean hasLoginRequest();", "public boolean checkUser(String username, String password) { \r\n // keep track of whether user is valid or not \r\n int validUser = 0;\r\n \r\n // iterate through users arraylist \r\n for (int i = 0; i < this.users.size(); i ++) {\r\n // check if the user username and password entered are correct\r\n if (this.users.get(i).getUsername().equals(username) && this.users.get(i).getPassword(password).equals(password)) {\r\n // if so, change tracker to one indicating a valid user and break out of loop\r\n validUser = 1;\r\n break;\r\n }\r\n }\r\n \r\n // return true is validUser is 1, otherwise return false\r\n return validUser == 1;\r\n \r\n }", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }", "private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }" ]
[ "0.7622531", "0.7444476", "0.7444476", "0.7444476", "0.7444476", "0.7444476", "0.7444476", "0.7444476", "0.7444476", "0.74226147", "0.7315183", "0.7286049", "0.72335684", "0.72335684", "0.71937096", "0.7188948", "0.714511", "0.7124973", "0.7120367", "0.7100926", "0.70908576", "0.7089743", "0.7081448", "0.7081448", "0.70767176", "0.70574576", "0.70165026", "0.70089245", "0.70089245", "0.70089245", "0.70089245", "0.70089245", "0.70089245", "0.6971911", "0.6911506", "0.6885835", "0.6870726", "0.6866235", "0.68640435", "0.6859317", "0.6832583", "0.6816857", "0.6808998", "0.67931104", "0.678907", "0.6774026", "0.6756372", "0.6751561", "0.67446774", "0.6737257", "0.6736353", "0.6716763", "0.67029554", "0.6687443", "0.66785365", "0.66739905", "0.6663698", "0.66433054", "0.6642684", "0.6640953", "0.6638596", "0.6629752", "0.66221964", "0.66155916", "0.66131485", "0.6605538", "0.6605312", "0.65911746", "0.6587205", "0.65868175", "0.65674007", "0.656544", "0.6558385", "0.6553205", "0.65416276", "0.6540257", "0.6534846", "0.6533601", "0.65228045", "0.651681", "0.6516239", "0.6500502", "0.6500502", "0.6500502", "0.6500502", "0.6500502", "0.6497544", "0.64820707", "0.6473361", "0.6470655", "0.64681774", "0.646754", "0.6467148", "0.6466284", "0.6456215", "0.64499366", "0.6449625", "0.64350903", "0.64305687", "0.6425507", "0.64172256" ]
0.0
-1
This Method was used to determine if questions for a cetain topic exited and if so how many
public static int numberOfQuestions(int selection) { selection+=1; int i=0, size=0; questionsExists = false; while(i < questionDetails.get(0).size()) { //uses the topic number which was passed down and looks for matches if(questionDetails.get(0).get(i).equals(selection+"")) { size++; questionsExists = true; } i++; } return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean hasMoreQuestions() {\n return !(done);\n }", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "int getNumberOfQuestions();", "Integer getNumQuestions();", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "int getNumberOfAllQuestions();", "public int getNumQuestions() {\n\t\treturn noOfQuestions;\n\t}", "public int numberOfQuestions() { \n\t\ttry {\n\t\t\treturn myQuestions.getNumberOfQuestions();\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn 0; \n\t\t} \n\t}", "private void checkFinish() {\n if (qid < numberOfQuestions) {\n if (bolRandom) {\n currentQ = quesList.get(qid);\n }else if (Chapter1) {\n currentQ = Chapter1List.get(qid);\n }else if (Chapter2) {\n currentQ = Chapter2List.get(qid);\n }else if (Chapter3) {\n currentQ = Chapter3List.get(qid);\n }else if (Chapter4){\n currentQ = Chapter4List.get(qid);\n }else if (Chapter5){\n currentQ = Chapter5List.get(qid);\n }else if (Chapter6){\n currentQ = Chapter6List.get(qid);\n }else if (Chapter7){\n currentQ = Chapter7List.get(qid);\n }else if (Chapter8){\n currentQ = Chapter8List.get(qid);\n }else if (Chapter9){\n currentQ = Chapter9List.get(qid);\n }else if (Chapter10){\n currentQ = Chapter10List.get(qid);\n }else if (Chapter11){\n currentQ = Chapter11List.get(qid);\n }\n setQuestionView();\n } else {\n Intent intent = new Intent(MainActivity.this, GradeActivity.class);\n Bundle b = new Bundle();\n b.putInt(\"score\", score); //Your score\n intent.putExtras(b); //Put your score to your next Intent\n startActivity(intent);\n finish();\n }\n\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "int getCompletedTutorialsCount();", "private void detectCorrectAnswer() {\n switch (chapterSection) {\n case 5:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\")) {\n ansCorrect = true;\n }\n break;\n case 6:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\")) {\n ansCorrect = true;\n }\n break;\n case 7:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\")) {\n ansCorrect = true;\n }\n break;\n case 8:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\")) {\n ansCorrect = true;\n }\n break;\n }\n }", "public int getTotalQuestions() {\r\n\t\treturn totalQuestions;\r\n\t}", "public int getQuestionCount() {\r\n\t\treturn this.question.size();\r\n\t}", "public int numberOfQuestions() {\n\t\treturn getQuestions().size();\n\t}", "private boolean chekForDubl(TCase tc) throws MyCustException {\n if (chkRowExists(tc.getQuestion().getQuestionHash(), Storage.TABLE_QUESTIONS)) {\n List<Question> questions = getQuestion(0, tc.getQuestion().getQuestionHash());\n for (Question question : questions) {\n List<Answer> answers = getAnswers(question.getQuestionId(), question.getQuestionHash());\n\n List<String> answersInDb = new ArrayList<String>();\n String answersInDbCorect = \"\";\n for (Answer answer : answers) {\n answersInDb.add(answer.getAnswerHash());\n if (answer.isCorrect())\n answersInDbCorect = answer.getAnswerHash();\n }\n\n List<String> answersInCurTestCase = new ArrayList<String>();\n String corectAnswersInCurTestCase = \"\";\n for (Answer answer : tc.getAnswers()) {\n answersInCurTestCase.add(answer.getAnswerHash());\n if (answer.isCorrect())\n corectAnswersInCurTestCase = answer.getAnswerHash();\n }\n\n Boolean gotQuestionsAnswers = false;\n if ((answersInDb.containsAll(answersInCurTestCase)) &&\n (answersInDbCorect.contentEquals(corectAnswersInCurTestCase))) {\n gotQuestionsAnswers = true;\n } else {\n continue;\n }\n\n Boolean gotQuestionsImages = false;\n if (tc.getPics() != null) {\n Images imagesInDb = getImages(question.getQuestionId(), question.getQuestionHash());\n if (imagesInDb == null) {\n gotQuestionsImages = false;\n } else {\n if ((tc.getPics().getImageLargeHash().contentEquals(imagesInDb.getImageLargeHash())) &&\n (tc.getPics().getImageSmallHash().contentEquals(imagesInDb.getImageSmallHash())))\n gotQuestionsImages = true;\n }\n }\n\n if ((gotQuestionsAnswers) && (tc.getPics() == null))\n return true;\n else if ((gotQuestionsAnswers) && (tc.getPics() != null) && (gotQuestionsImages))\n return true;\n else\n return false;\n }\n }\n return false;\n\n /*\n\n\n\n\n boolean gotQuestion = chkRowExists(tc.getQuestion().getQuestionHash(), Storage.TABLE_QUESTIONS);\n boolean gotAnswer = false;\n\n for (Answer answer : tc.getAnswers()) {\n if (chkRowExists(answer.getAnswerHash(), Storage.TABLE_ANSWERS)) {\n gotAnswer = true;\n break;\n }\n }\n\n Boolean gotPicL = null;\n Boolean gotPicS = null;\n if (tc.getPics() != null) {\n gotPicL = false;\n gotPicS = false;\n if (chkRowExists(tc.getPics().getImageLargeHash(), Storage.TABLE_PICTURES_LARGE))\n gotPicL = true;\n\n if (chkRowExists(tc.getPics().getImageSmallHash(), Storage.TABLE_PICTURES_SMALL))\n gotPicS = true;\n }\n\n if ((gotAnswer) && (gotQuestion))\n if ((gotPicL != null) && (gotPicS != null)) {\n if ((gotPicL) && (gotPicS))\n return true;\n\n } else\n return true;\n\n return false;\n */\n }", "@Override\r\n\tpublic int countTopics() {\n\t\treturn 0;\r\n\t}", "private int countCorrectAnswers(boolean[] answers) {\n int numberCorrect = 0;\n for (int i = 0; i < answers.length; i++) {\n if (answers[i]) {\n numberCorrect++;\n }\n }\n return numberCorrect;\n }", "@Test\r\n public void testTotalNumberOfQuestion() {\r\n Application.loadQuestions();\r\n assertEquals(Application.allQuestions.size(), 2126);\r\n }", "public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" questions right!\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n intent.putExtra(\"language\",topic);\n\n\n startActivity(intent);\n }\n }", "private int getNumberCorrect() {\n RadioButton rb1 = (RadioButton) findViewById(R.id.question_1_correct);\n RadioButton rb2 = (RadioButton) findViewById(R.id.question_2_correct);\n RadioButton rb3 = (RadioButton) findViewById(R.id.question_3_correct);\n RadioButton rb4 = (RadioButton) findViewById(R.id.question_4_correct);\n boolean q5Answer = checkQuestion5();\n boolean q6answer = checkQuestion6();\n ToggleButton tb7 = (ToggleButton) findViewById(R.id.question_7);\n ToggleButton tb8 = (ToggleButton) findViewById(R.id.question_8);\n boolean bool8 = !tb8.isChecked();\n ToggleButton tb9 = (ToggleButton) findViewById(R.id.question_9);\n ToggleButton tb10 = (ToggleButton) findViewById(R.id.question_10);\n\n boolean answers[] = new boolean[]{rb1.isChecked(), rb2.isChecked(), rb3.isChecked(), rb4.isChecked(),\n q5Answer, q6answer, tb7.isChecked(), bool8, tb9.isChecked(),\n tb10.isChecked()};\n return countCorrectAnswers(answers);\n }", "public static /* synthetic */ boolean m125947g(Topic topic) {\n return topic.headerCard.superTopic.question.has_answered;\n }", "int getWrongAnswers();", "int getNewlyAvailableQuestsCount();", "public boolean gameCompleted() {\n\t\tint[] expected = {5,5,5,5,5};\n\t\tif(Arrays.equals(_answeredQuestions, expected)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public Boolean questionDone() {\n Boolean questionDone = true;\n for (Boolean currentTeam : teamHasAnswered.values()) questionDone = questionDone && currentTeam;\n return questionDone;\n }", "int getQuestCount();", "public void verifyAnswer() {\n\t\tint i=0;\n\t\tSystem.out.println(\"in verify answer function\");\n\t\tSystem.out.println(\"Number of Answers: \"+ansCount);\n\t\tSystem.out.println(\"User ans: \"+userEquation);\n\t\tif (ansCount==0)\n\t\t\tlb2.setText(\"There is no solution for this set\");\n\t\telse{\n\t\t\tint c=0;\n\t\t\t\n\t\t\twhile(c<ansCount) {\n\t\t\t\tif (solutions[i].equals(userEquation)) {\n\t\t\t\t\tSystem.out.println(\"Ans was Correct\");\n\t\t\t\t\tfinal long duration = System.nanoTime() - startTime;\n\t\t\t\t\tseconds = TimeUnit.NANOSECONDS.toSeconds(duration);\n\t\t\t\t\tlb2.setText(\"Congradulations! You took \"+seconds+\" seconds to find an answer.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tc++;\n\t\t\t\tSystem.out.println(\"C: \"+c);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Ans was not Correct\");\n\t}\n\t}", "@Override\n\tpublic void QuestionDone() {\n\t\t\n\t}", "public boolean hasMoreDiscussions();", "public void finishQuiz(View view){\n if(((RadioButton) findViewById(R.id.radio_new_york_city)).isChecked()) {\n score++;\n }\n\n //Anser for question 2\n if(((RadioButton) findViewById(R.id.radio_food_cart)).isChecked()) score++;\n\n //Anser for question 3\n if(((CheckBox) findViewById(R.id.check_chicken)).isChecked()\n && ((CheckBox) findViewById(R.id.check_gyro)).isChecked()\n && !((CheckBox) findViewById(R.id.check_pork)).isChecked()) score++;\n\n //Anser for question 4\n String answer4 = ((EditText) findViewById(R.id.edit_bread)).getText().toString().toLowerCase();\n if(answer4.equals(\"pita\")) score++;\n\n //Anser for question 5\n if(((CheckBox) findViewById(R.id.check_red)).isChecked()\n && ((CheckBox) findViewById(R.id.check_yellow)).isChecked()\n && !((CheckBox) findViewById(R.id.check_white)).isChecked()) score++;\n\n\n //Anser for question 6\n if(((RadioButton) findViewById(R.id.radio_large)).isChecked()) score++;\n\n //Display the Toast\n Context context = getApplicationContext();\n\n CharSequence text;\n if(score == 6) {\n text = \"Congrats! Your Score was \" + score + \" out of 6!\";\n } else {\n text = \"You only have \" + score + \" out of 6! Try again!\";\n }\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n //Resest score to 0\n\n score = 0;\n }", "private void checkIfQuestionUsed(int randIdx)\n\t{\n\t\t\tfor(Integer current : questionsUsed)\n\t\t\t{\n\t\t\t\tif (current == randIdx) {\n\t\t\t\t\tquestionUsed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tquestionUsed = false;\n\t\t\t}\n\t}", "public void CheckIfContinued() {\n\t\tString IsContinued = getIntent().getStringExtra(\"Continue\");\n\t\t/*\n\t\t * If IsContinued is null that means that its a new game\n\t\t */\n\t\tif (IsContinued == null) {\n\t\t}\n\t\t/*\n\t\t * If it isnt null that means the game is being Continued. The values of\n\t\t * Question, Score and Correct and then updated to the last save\n\t\t */\n\t\tif (IsContinued != null) {\n\t\t\tQuestion = getPreferences(MODE_PRIVATE).getInt(\"WhatQuestion\", 0);\n\t\t\tScore = getPreferences(MODE_PRIVATE).getInt(\"WhatScore\", 0);\n\t\t\tCorrect = getPreferences(MODE_PRIVATE).getInt(\"HowManyCorrect\", 0);\n\t\t}\n\t\tTextView SetQuestionText = (TextView) findViewById(R.id.textView5);\n\t\tSetQuestionText.setText(\"\" + Question);\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn questions.size();\n\t\t}", "int countByExample(QuestionExample example);", "int countByExample(QuestionExample example);", "int getNumberOfServeyQuestions(Survey survey);", "private void finishExercises() {\n\t\tfourWordsBox.setVisible(false);\n\t\ttranslationBox.setVisible(false);\n\t\timageRecognitionBox.setVisible(false);\n\t\tsummaryBox.setVisible(true);\n\t\t// Setting the labels\n\t\tcorrectAnswersLabel.setText(\"Correct answers: \" + correctAnswerCount);\n\t\tint gainedExperience = correctAnswerCount * EXPERIENCE_RATIO;\n\t\tloggedInUser.setScore(loggedInUser.getScore() + gainedExperience);\n\t\texperienceGainedLabel.setText(\"Experience gained: \" + gainedExperience);\n\t\t// Resetting the answer counters\n\t\tanswerCount = 0;\n\t\tcorrectAnswerCount = 0;\t\t\n\t}", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public int getTotalCorrectAnswers() {\r\n\t\treturn totalCorrectAnswers;\r\n\t}", "long countByExample(Question27Example example);", "public static int sub_seq_count(String Ques, String ans) {\n\t\tif(Ques.length()==0) {\n\t\t\t//System.out.print(ans+\" \");\n\t\t\treturn 1;\n\t\t}\n\t\tchar ch = Ques.charAt(0);\n\t\tint c1 =sub_seq_count(Ques.substring(1), ans + ch);// char\n\t\tint c2= sub_seq_count(Ques.substring(1), ans);// No\n\t\tint c3 =sub_seq_count(Ques.substring(1), ans + (int)(ch));// Ascii\n\n\t\treturn c1+c2+c3;\n\n\t}", "public int searchCorrectAnswer() {\n\t\tint correctAnswerNum = 0; \n\t\tboolean correctAnswer = false;\n\t\tfor(int answerNum = 1; answerNum < 5; answerNum++) {\n\t\t\tcorrectAnswer = testGenerator.isAnswerCorrect(questionNo, answerNum);\n\t\t\tif(correctAnswer) {\n\t\t\t\tcorrectAnswerNum = answerNum;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn correctAnswerNum;\n\t}", "public boolean hasPendingQuestions() {\r\n try {\r\n Task[] tasks = getTasks();\r\n if (tasks == null || tasks.length == 0)\r\n return false;\r\n \r\n for (int i = 0; i < tasks.length; i++) {\r\n if (tasks[i].getPendingQuestions() != null\r\n && tasks[i].getPendingQuestions().length > 0)\r\n return true;\r\n }\r\n \r\n return false;\r\n } catch (ProcessManagerException pme) {\r\n return false;\r\n }\r\n }", "long countByExample(Question11Example example);", "public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }", "@Override\n\tpublic int countExam() {\n\t\treturn 0;\n\t}", "public void checkAnswers(View v) {\n int correct = 0;\n\n //Question 1 answer\n RadioButton a1 = (RadioButton) findViewById(R.id.q1_a2);\n\n if (a1.isChecked()) {\n correct++;\n } else {\n TextView q1 = (TextView) findViewById(R.id.question_1);\n q1.setTextColor(Color.RED);\n }\n\n //Question 2 answer\n RadioButton a2 = (RadioButton) findViewById(R.id.q2_a2);\n\n if (a2.isChecked()) {\n correct++;\n } else {\n TextView q2 = (TextView) findViewById(R.id.question_2);\n q2.setTextColor(Color.RED);\n }\n\n //Question 3\n CheckBox a3_1 = (CheckBox) findViewById(R.id.q3_a1);\n CheckBox a3_2 = (CheckBox) findViewById(R.id.q3_a2);\n CheckBox a3_3 = (CheckBox) findViewById(R.id.q3_a3);\n\n if (a3_1.isChecked() && a3_2.isChecked() && a3_3.isChecked()) {\n correct++;\n } else {\n TextView q3 = (TextView) findViewById(R.id.question_3);\n q3.setTextColor(Color.RED);\n }\n\n //Question 4\n EditText a4 = (EditText) findViewById(R.id.q4_a);\n\n if (a4.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q4_a))) {\n correct++;\n } else {\n TextView q4 = (TextView) findViewById(R.id.question_4);\n q4.setTextColor(Color.RED);\n }\n\n //Question 5\n RadioButton a5 = (RadioButton) findViewById(R.id.q5_a3);\n\n if (a5.isChecked()) {\n correct++;\n } else {\n TextView q5 = (TextView) findViewById(R.id.question_5);\n q5.setTextColor(Color.RED);\n }\n\n //Question 6\n RadioButton a6 = (RadioButton) findViewById(R.id.q6_a1);\n\n if (a6.isChecked()) {\n correct++;\n } else {\n TextView q6 = (TextView) findViewById(R.id.question_6);\n q6.setTextColor(Color.RED);\n }\n\n //Question 7\n EditText a7 = (EditText) findViewById(R.id.q7_a);\n\n if (a7.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q7_a))) {\n correct++;\n } else {\n TextView q7 = (TextView) findViewById(R.id.question_7);\n q7.setTextColor(Color.RED);\n }\n\n //Question 8\n RadioButton a8 = (RadioButton) findViewById(R.id.q8_a1);\n\n if (a8.isChecked()) {\n correct++;\n } else {\n TextView q8 = (TextView) findViewById(R.id.question_8);\n q8.setTextColor(Color.RED);\n }\n\n //Toast\n Context context = getApplicationContext();\n CharSequence text = \"Score: \" + correct + \"/8\";\n int duration = Toast.LENGTH_SHORT;\n Toast.makeText(context, text, duration).show();\n }", "private int choose_among_the_chapters_of_the_subject(String subject,String semester){\n\n int chapter=-1;\n File subject_index= new File(\"C://Manish//The_Test_Taker//All_Text_files//Quizes//\"+semester+\"//\"+subject+\"//Subject_index.txt\");\n Scanner chapter_read= null;\n try{\n chapter_read= new Scanner(subject_index);\n }catch(FileNotFoundException e){\n System.out.println(\"Some error occured while loading the questions.\");\n //chapter=choose_among_the_chapters_of_the_subject(subject,semester);\n return chapter;\n }\n float a[]= new float[4];\n if(subject.toUpperCase().equals(\"OOP\")){\n a= OOP;\n }else if(subject.toUpperCase().equals(\"DE\")){\n a=DE;\n }else if(subject.toUpperCase().equals(\"DSA\")){\n a=DSA;\n }\n\n //This will display the list of the chapters available in a subject by traversing the subject index of each subject\n String line_will_be_of_use_sometime=chapter_read.nextLine();\n while(!(line_will_be_of_use_sometime.equals(\"List of chapters:-\")))\n {\n line_will_be_of_use_sometime=chapter_read.nextLine();\n }\n int i=0;\n System.out.println(\"*************************************************************\");\n System.out.println(line_will_be_of_use_sometime);\n System.out.println(\"*************************************************************\");\n System.out.println(\"Chapter Name Status\");\n line_will_be_of_use_sometime=chapter_read.nextLine();\n int no_of_chapters=0;\n \n while(line_will_be_of_use_sometime.charAt(0)!='#'&&i<4){\n System.out.println(line_will_be_of_use_sometime +\" \"+(a[i]!=0?\"Attempted\":\"Yet to be Attempted\"));\n line_will_be_of_use_sometime=chapter_read.nextLine();\n no_of_chapters++;//To get the count of the chapters available\n i++;\n }\n System.out.println(\"************************************************\");\n\n\n //Asking user for his/her choice of Chapter.\n int chap;\n System.out.println(\"Enter the choice of the Chapter from above whose Quiz you want to take.\");\n //String chap1= input.next();\n //chap=Integer.parseInt(chap1);\n while(true){\n try{\n chap=input.nextInt();\n break;\n }catch(InputMismatchException e){\n System.out.println(\"Invalid Input. Please Enter your choice again.\");\n input.nextLine();\n }\n }\n if(chap>no_of_chapters){//If the user enters some wrong chapter_no then we'll call this function again and ask his/her to choose.\n System.out.println(\"You entered a wrong choice of Chapter.\");\n chapter=choose_among_the_chapters_of_the_subject(subject, semester);\n }else{\n if(a[chap-1]==0){\n chapter=chap;\n }else{\n System.out.println(\"You cannot attemp a quiz twice. Choose another chapter.\");\n chapter=choose_among_the_chapters_of_the_subject(subject, semester);\n }\n }\n chapter_read.close();\n return chapter;\n }", "private int taking_test(File quiz_file){\n int total_marks=-1;\n Scanner read_question=null;\n \n try{\n count++;\n read_question= new Scanner(quiz_file);\n }catch(FileNotFoundException e){\n System.out.println(\"There is no database of questions for the choosen chapter\");\n if(count<3){\n total_marks=taking_test(quiz_file);\n return total_marks;\n }else{\n System.out.println(\"The system is experiencing some problem loading the questions. Please try again later!\");\n return total_marks;\n }\n \n }\n String question= read_question.nextLine();\n while(question.charAt(0)!='*'){\n question=read_question.nextLine();\n }\n String answer;\n System.out.println(\"########################################################################\");\n System.out.println(\" Starting the Test.\");\n System.out.println(\"########################################################################\");\n question=read_question.nextLine();\n while(question!=null){\n System.out.println(\"Question:-\");\n System.out.println(question);\n System.out.println(\"Options:-\");\n question= read_question.nextLine();\n while(!(question.contains(\"Correct Answer\"))){\n System.out.println(question);\n question= read_question.nextLine();\n \n }\n System.out.println(\"Enter your answer\");\n while(true){\n try{\n answer=input.next().toUpperCase();\n if(answer.equals(\"B\")||answer.equals(\"A\")||answer.equals(\"C\")||answer.equals(\"D\")){\n break;\n }else{\n System.out.println(\"Enter a valid choice from (A/B/C/D)\");\n }\n \n }catch(InputMismatchException e){\n System.out.println(\"Invalid Input. Please Enter your choice again.\");\n input.nextLine();\n }\n }\n if(answer.equals(question.substring(15))){\n total_marks+=2;\n }\n question=read_question.nextLine();\n System.out.println(question);\n if(read_question.hasNextLine()){\n question=read_question.nextLine();\n }else{\n break;\n }\n \n\n }\n\n read_question.close();\n return total_marks;\n }", "boolean isGoodQuestion(){\n\t\treturn goodQ;\n\t}", "private int getAnswersCount(int experiment, Configuration config) {\n return getAnswersCountWithoutWorker(experiment, -1, config);\n }", "private void checkAnswers() {\n\n //fetch the SolutionInts\n String[] solutionTags = currentTask.getSolutionStringArray();\n\n //fetch the userInput\n String[] userSolution = new String[solutionTags.length];\n for (int i = 0; i < solutionTags.length; i++) {\n LinearLayout linearLayout = currentView.findViewWithTag(i);\n userSolution[i] = (String) linearLayout.getChildAt(0).getTag();\n }\n\n Log.i(\"M_ORDER\",\"solutiontags: \"+ Arrays.toString(solutionTags) +\" usertags:\"+ Arrays.toString(userSolution));\n Date ended;\n if (Arrays.equals(solutionTags, userSolution)) {\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_RIGHT\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(true);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: true\");\n } else {\n Log.i(\"ANSWER\", \" was wrong\");\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_WRONG\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(false);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: false\");\n }\n }", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "public void checkAnswers(View view){\n int result = 0;\n\n if (checkRadioButtonAnswer(R.id.first_answer, R.id.first_answer3)){\n result = result + 1;\n }\n\n if (checkTextViewAnswer(R.id.second_answer, \"lions\")){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.third_answer, R.id.third_answer1)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fourth_answer, R.id.fourth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fifth_answer, R.id.fifth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.sixth_answer, R.id.sixth_answer2)){\n result = result + 1;\n }\n\n if (checkCheckBoxAnswer(R.id.seventh_answer1, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer2, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer3, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer4, false)){\n result = result + 1;\n }\n\n /**\n * A toast message is shown which represents the scored points out of the total 7.\n */\n Toast.makeText(this, \"Result: \" + Integer.toString(result) + \"/7\", Toast.LENGTH_SHORT).show();\n }", "public void checkIfLastQuestion(){\n if(questionNumber == 50){\n endGame();\n }\n }", "public int getSize()\r\n\t{\r\n\t\treturn questions.size();\r\n\t}", "private int getScoreMultiple(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n Vector givenAnswers = givenAnswer.getRelatedNodes(\"mcanswers\");\n Vector goodAnswers = questionNode.getRelatedNodes(\"mcanswers\");\n\n // First check if all the given answers are correct\n for (int i=0; i<givenAnswers.size(); i++) {\n if (((MMObjectNode)givenAnswers.get(i)).getIntValue(\"correct\") != 1) {\n return 0;\n }\n }\n\n // Secondly check if all the correct answers are given\n for (int i=0; i<goodAnswers.size(); i++) {\n if (((MMObjectNode)goodAnswers.get(i)).getIntValue(\"correct\") == 1) {\n if (!givenAnswers.contains(goodAnswers.get(i))) {\n return 0;\n }\n }\n }\n\n // ALl tests succeeded: answer is correct\n return 1;\n }", "private int getAnswer() throws IOException {\n String w = next();\n while (w.equals(\"\")) {\n w = next();\n }\n // System.out.println(w + \" is the answer key\");\n c = r.read();\n if (w.equals(\"b\")) {\n return 1;\n } else {\n return 0;\n }\n }", "public Integer excerciseStateCount(Activity activity, ExerciseState state);", "@Override\n public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n question[quesNumber].setWrong(true);\n }\n\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n }\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" out of 10\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n\n startActivity(intent);\n }\n\n }", "public boolean scoreThisWith(SortingQuiz q) {\r\n boolean succesfullyScored = false;\r\n int answrCount = 0;\r\n \r\n for(int i=1; i<8; i++) {\r\n try {\r\n Answer a = q.answers.get(this.answers.get(i));\r\n this.getScoring().weightAnswer(a);\r\n answrCount += 1;\r\n } catch (NullPointerException e) {\r\n }\r\n }\r\n \r\n if(answrCount == 7) {\r\n succesfullyScored = true;\r\n }\r\n \r\n return succesfullyScored;\r\n }", "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "private boolean checkQuestion(int number){\n String answer = questionsList.get(number).getAnswer();\n return answer.equals(\"true\");\n\n }", "long countByExample(QuestionExample example);", "long countByExample(QuestionExample example);", "long countByExample(Question14Example example);", "@Test\n\tpublic void testGetNewQuestions() {\n\t\tList<QnaQuestion> questions = questionLogic.getNewQuestions(LOCATION1_ID);\n\t\tAssert.assertEquals(questions.size(), 2);\n\t\t\n\t\tAssert.assertTrue(questions.contains(tdp.question1_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question5_location1));\n\t}", "private int getCBAnswers() {\n CheckBox cbAns1 = findViewById(R.id.multiplication);\n CheckBox cbAns2 = findViewById(R.id.subtraction);\n CheckBox cbAns3 = findViewById(R.id.addition);\n CheckBox cbAns4 = findViewById(R.id.division);\n if (cbAns2.isChecked() && cbAns3.isChecked() && cbAns4.isChecked() && !cbAns1.isChecked()) {\n return 1;\n } else {\n return 0;\n }\n }", "public int getNumberOfCorrectAnswers() {\n int correctAnswers = (responses.size() - 1) - incorrectAnswers.size();\r\n if (correctAnswers < 0) {\r\n // FIXME: replace with proper logging?\r\n System.err.println(\"Somehow the number of responses was less than the number of incorrect answers: \"\r\n + responses + \" -- \" + incorrectAnswers);\r\n return 0;\r\n }\r\n return correctAnswers;\r\n }", "boolean hasCorrectAnswer();", "boolean hasFeedback();", "boolean hasTopicView();", "public void msgKitIsDone(AgentKit kit) {\n\t\tfor(MyKit mk: myKits){\n\t\t\tif(mk.kit.config.equals(kit.config) && mk.kit.position.equals(kit.position)){\n\t\t\t\tmk.status = KitStatus.Ready_For_Inspection;\n\t\t\t\tstateChanged();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "public boolean isCompleted(int exercise) {\n String reps;\n boolean complete = true;\n if(exercise == 0)\n reps = \"3\";\n else if(exercise == 4 || exercise == 7)\n reps = \"20\";\n else if(exercise == 3 || exercise == 6)\n reps = \"15\";\n else\n reps = \"12\";\n\n for(int i = 0; i < bsButtons[exercise].length; i++) {\n if(bsButtons[exercise][i].getText().toString().equals(reps)) {\n complete = true;\n }\n else {\n complete = false;\n break;\n }\n }\n return complete;\n }", "public static void resultOfPlayAllCorrect() {\n\t\tString mark=\"null\";\n\t\ttry {\n\t\t\tmark=PlayTrivia.playAllRightAnswers();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tif(mark==\"Sucsses\") {\n\t\t\tSystem.out.println(\"Test end page has:\" + mark + \" Test pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Test end page - failed\");\n\t\t}\n\t}", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "int countByExample(CommonQuestionStrategyTypeExample example);", "Question getQuest(String topic){\r\n\t\thasQ = false;\r\n\t\twhile(!hasQ){\r\n\t\t\trandNo = rand.nextInt(bank.get(topic).size());\r\n\t\t\tif(!bank.get(topic).get(randNo).getAsked()){\r\n\t\t\t\tbank.get(topic).get(randNo).setAsked(true);\r\n\t\t\t\treturn bank.get(topic).get(randNo);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static boolean test(Arithmetic ques){\n Scanner in = new Scanner(System.in);\n String operator = new String();\n int count = 0;\n\n\n //get different operation based on level\n if (ques instanceof Level1Addition || ques instanceof Level2Addition){\n operator = \" + \";\n }\n else{\n operator = \" - \";\n }\n\n //starting question\n System.out.println(\"what is \" + ques.getNum1() + operator + ques.getNum2() + \" = ?\");\n System.out.print(\"Enter answer : \");\n int ans = in.nextInt();\n if (ans == ques.getAnswer()) {\n System.out.print(\"Correct! \");\n return true;\n }\n System.out.print(\"Wrong answer... \");\n return false;\n }", "private void getQuestions(){\n final int[] countQuestions = new int[1];\n mQuestionCountReference = FirebaseDatabase.getInstance().getReference().child(\"Questions\");\n mQuestionCountReference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n countQuestions[0] = (int) dataSnapshot.getChildrenCount();\n updateQuestion(countQuestions[0]);\n timer(30, quiz_timer);\n }else{\n quiz_question_label.setText(\"No Questions in database\");\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public static void displayQuestions() {\n System.out.println(\"1. Is your character male?\");\n System.out.println(\"2. Is your character female?\");\n System.out.println(\"3. Does your character have brown hair?\");\n System.out.println(\"4. Does your character have red hair?\");\n System.out.println(\"5. Does your character have blonde hair?\");\n System.out.println(\"6. Does your character have green eyes?\");\n System.out.println(\"7. Does your character have blue eyes?\");\n System.out.println(\"8. Does your character have brown eyes?\");\n System.out.println(\"9. Is your character wearing a green shirt?\");\n System.out.println(\"10. Is your character wearing a blue shirt?\");\n System.out.println(\"11. Is your character wearing a red shirt?\");\n }", "public int getNbLikesQuestion() {\n return this.nbLikesQuestion;\n }", "public void feedback(boolean isCorrect, VocabularyQuiz question) {\n String correctMeaning = question.getSelections().get(question.getAnswer());\n String message;\n if (isCorrect) {\n message = \"Correct!\";\n totalCorrect++;\n } else {\n message = \"Incorrect! The answer is \" + correctMeaning;\n }\n JOptionPane.showMessageDialog(gui.getFrame(), message);\n }", "@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}", "public static int countDifferentQuestionsAnsweredByAll (String group) {\n ArrayList<Character> answeredQuestions = new ArrayList<Character>();\n HashMap<Character, Integer> count = new HashMap<Character, Integer>();\n \n String[] people = group.split(\"\\n\");\n for (String person : people) {\n for (int i = 0; i < person.length(); i++) {\n char question = person.charAt(i);\n \n if (!answeredQuestions.contains(question)) {\n answeredQuestions.add(question);\n count.put(question, 1);\n } else {\n count.replace(question, answeredQuestions.get(question) + 1);\n }\n }\n }\n \n int sum = 0;\n for (int j = 0; j < answeredQuestions.size(); j++) {\n System.out.println(j + \"/\" + answeredQuestions.size());\n if (count.get(answeredQuestions.get(j)) == people.length) {\n sum++;\n }\n }\n \n return sum;\n }", "private void answerResultAlert(String feedback){\n AlertDialog.Builder showResult = new AlertDialog.Builder(this);\n\n showResult.setTitle(feedback);\n showResult.setMessage(currentQuestion.getExplanation());\n showResult.setCancelable(false); //if this is not set, the user may click outside the alert, cancelling it. no cheating this way\n showResult.setNeutralButton(\"ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //only when the ok is clicked will continue to run the program\n setUpQuestions();\n }\n });\n showResult.create();\n showResult.show();\n }", "void acceptQueAnswersClicked();", "public void showQuestion() {\n\n // Variable to store the total questions in out question Array\n int totalQuestions = questions.length;\n\n // Variables to refer to textview in XML to show total number of questions\n TextView questionTotalTextView = findViewById(R.id.question_number_text_view);\n\n // Variables to refer to textview in XML to show question\n TextView questionTextView = findViewById(R.id.question_text_view);\n\n //Variable to refer to textview in XML to show score\n TextView scoreTextView = findViewById(R.id.score_text_view);\n\n // Initialize buttons to refer to answer button in XML\n answer1Button = (Button) findViewById(R.id.answer1_button);\n answer2Button = (Button) findViewById(R.id.answer2_button);\n answer3Button = (Button) findViewById(R.id.answer3_button);\n answer4Button = (Button) findViewById(R.id.answer4_button);\n\n // Condtion to check if the current question number on screen is less then total number of questions\n if (currentQuestionNumber < (totalQuestions)) {\n\n // Set the current question number and total number of questions on screen\n questionTotalTextView.setText(String.valueOf(currentQuestionNumber + 1) + \"/\" + String.valueOf(totalQuestions));\n\n // Set the current question on question textview in XML\n questionTextView.setText(questions[currentQuestionNumber]);\n\n // Set the score in score textview in XML\n\n scoreTextView.setText(String.valueOf(\"Score:\" + score));\n\n // Set the answers for the current question to answer buttons in XML\n answer1Button.setText(answers[currentQuestionNumber][0]);\n answer2Button.setText(answers[currentQuestionNumber][1]);\n answer3Button.setText(answers[currentQuestionNumber][2]);\n answer4Button.setText(answers[currentQuestionNumber][3]);\n\n\n } else {\n // If the last uestion has been answered i.e current question is equal to total questions then mark the quiz complete\n quizComplete = true;\n }\n\n // Check if the quiz is completed and show the summary to the user\n if (quizComplete) {\n\n totalIncorrectAnswers = totalQuestions - (totalCorrectAnswers + totalNotAttemptedAnswers);\n callAlertDialog(totalQuestions);\n\n }\n\n }", "public int getQuestCount() {\n return quest_.size();\n }", "boolean hasTopic();", "private boolean tryCounterExample(BDD reachableStates){\n\t\tBDD counterExample = reachableStates.andWith(buildEndGame());\n\t\t\n\t\treturn counterExample.satCount(this.dimension * this.dimension - 1) == 0 ? true : false;\n\t}", "public int answerCheck() {\n int score = -36; // 36 squares already filled in game.\n char[][] userAnswer = new char[9][9];\n \n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n userAnswer[i][j] = index[i][j].getText().charAt(0);\n }\n }\n \n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if(answer[i][j] == userAnswer[i][j]){\n score++;\n }\n }\n }\n return score;\n }", "private boolean checkQuestion(int number) {\n String answer = questionsList.get(number).getAnswer();\n return answer.equals(\"True\");\n }", "public int getAnsweredQuestions(int index){\n\t\treturn _answeredQuestions[index];\n\n\t}", "public int getCount() {\n return questionList.size();\n }", "public int getProblemCount();", "public boolean callIntoQuestion();", "private void gameHelper(int ranNum){\n\t\tif(questionAnsweredCount>=25){\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"It is \" + teams[ranNum].getName() + \"'s turn to choose a question\");\n\t\t//find category\n\t\tSystem.out.println(\"Please choose a category you would like to answer: \");\n\t\tint categoryIdx = getCategory();\n\t\t//find points\n\t\tSystem.out.println(\"Please enter the dollar value of the question you wish to answer\");\n\t\tint pointIdx = getPointsIndex();\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//now check if the question is answer knowing dollar and cat is valid\n\t\tboolean answered = board[categoryIdx][pointIdx].answeredYet();\n\t\tif(!answered){\n\t\t\tint point = points[pointIdx];\n\t\t\tSystem.out.println(board[categoryIdx][pointIdx].getQeustion());\n\t\t\tSystem.out.println(\"Enter your answer. Remember to pose it as a question.\");\n\t\t\tString ans = sc.nextLine();\n\t\t\treadExitCommand(ans); // check if the user wants to exit any point\n\t\t\treadReplayCommand(ans);\n\t\t\tboard[categoryIdx][pointIdx].answerQuestion(ans); //ask Q\n\t\t\tif(!board[categoryIdx][pointIdx].getRight()&&board[categoryIdx][pointIdx].getWarned()){\n\t\t\t\t//not in question format. give one more chance\n\t\t\t\tans = sc.nextLine();\n\t\t\t\treadExitCommand(ans);\n\t\t\t\treadReplayCommand(ans);\n\t\t\t\tboard[categoryIdx][pointIdx].answerQuestion(ans);\n\t\t\t}\n\t\t\tif(board[categoryIdx][pointIdx].getRight()){\n\t\t\t\tSystem.out.println(\"You answered it right! \" + point + \" will be added to your total\");\n\t\t\t\tquestionAnsweredCount+= 10;\n\t\t\t\tteams[ranNum].addDollars(point);\n\t\t\t\tprintDollars();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Wrong Answer!\");\n\t\t\t\tquestionAnsweredCount++; \n\t\t\t\tteams[ranNum].minusDollars(point);\n\t\t\t\tprintDollars();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Question already answered. Choose it again\");\n\t\t\tgameHelper(ranNum); //same team choose a question again\n\t\t}\n\t\tint nextIdx = (ranNum+1)%(teams.length);\n\t\tgameHelper(nextIdx);\n\t}" ]
[ "0.6467592", "0.6229396", "0.60343385", "0.6004905", "0.59869665", "0.59163326", "0.58496785", "0.5828336", "0.58245754", "0.58052844", "0.5776126", "0.576344", "0.5736716", "0.5718638", "0.5669116", "0.5635215", "0.5630075", "0.55751413", "0.5559974", "0.55568427", "0.55471194", "0.5535751", "0.5500715", "0.54827046", "0.5475446", "0.547006", "0.5426921", "0.5418167", "0.54160655", "0.5396882", "0.5390059", "0.53848636", "0.5380781", "0.5373193", "0.537133", "0.537133", "0.53645205", "0.53609824", "0.53560203", "0.5352164", "0.53493893", "0.5346035", "0.5328784", "0.531775", "0.5311625", "0.53042436", "0.52995557", "0.52994066", "0.52935326", "0.52927613", "0.5282907", "0.527986", "0.52787626", "0.52640224", "0.52624905", "0.52609", "0.52467114", "0.52437425", "0.52401423", "0.52344483", "0.5233061", "0.52310693", "0.52241576", "0.5219245", "0.5215282", "0.5215282", "0.5212072", "0.5211458", "0.5205174", "0.51966953", "0.5190594", "0.5189557", "0.518945", "0.5182941", "0.5182625", "0.5177574", "0.51745963", "0.517293", "0.51727116", "0.5162933", "0.5160989", "0.5151124", "0.5149052", "0.514789", "0.514405", "0.5140111", "0.51395786", "0.5135541", "0.5134977", "0.5133913", "0.51326656", "0.513122", "0.51243067", "0.5122529", "0.51134586", "0.5113305", "0.5108967", "0.510482", "0.50944716", "0.5092913" ]
0.63298494
1
This method is used to add new users to the LoginDetails file without overwitting the contents of the file
public static void writeToFile(File fileToWriteTo, String info) throws IOException { FileWriter write = new FileWriter(fileToWriteTo, true); write.write(info); write.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToFile(User newUser){\r\n //If the user name is not already in the file then we do not want to re-add the user.\r\n if (f.searchForUsername(newUser.getUsername()) == -1) {\r\n newUser.setPassword(encrypt(newUser.getPassword()));\r\n f.write(newUser);\r\n } else {\r\n System.err.println(\"User already exists\");\r\n }\r\n }", "public void userSettings(String userName, String password, File nameFile,File passFile, String fileadd) {\n try\n {\n \n if(!nameFile.exists())\n {\n nameFile.createNewFile();\n }\n if(!passFile.exists())\n {\n passFile.createNewFile();\n }\n \n FileReader ufr = new FileReader(nameFile);\n FileReader pfr = new FileReader(passFile);\n \n BufferedReader ubr = new BufferedReader(ufr);\n BufferedReader pbr = new BufferedReader(pfr);\n \n ArrayList<String> uName = new ArrayList<>();\n ArrayList<String> uPass = new ArrayList<>();\n for (int i = 0; i < lineNum(fileadd); i++) {\n uName.add(ubr.readLine());\n uPass.add(pbr.readLine());\n }\n for (int i = 0; i < lineNum(fileadd); i++) \n {\n if (userName.equals(uName.get(i)))\n {\n uPass.set(i, password);\n } \n }\n \n ufr.close();\n pfr.close();\n FileWriter fw = new FileWriter(passFile);\n PrintWriter pw = new PrintWriter(fw);\n pw.print(\"\");\n \n FileWriter fw2 = new FileWriter(passFile, true);\n PrintWriter pw2 = new PrintWriter(fw2, true);\n \n for (int j = 0; j < uPass.size() -1; j++)\n {\n \n pw.print(uPass.get(j));\n pw.println();\n \n }\n pw.close();\n }catch(Exception e)\n {\n e.printStackTrace();\n }\n \n }", "private void readFileToUser(String fileName){\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\t// FileReader reads text files in the default encoding.\r\n\t\t\tFileReader fileReader = \r\n\t\t\t\t\tnew FileReader(fileName);\r\n\r\n\t\t\t// Always wrap FileReader in BufferedReader.\r\n\t\t\tBufferedReader bufferedReader = \r\n\t\t\t\t\tnew BufferedReader(fileReader);\r\n\r\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\tString[] split = line.split(\",\", 3);\r\n\t\t\t\tString username = split[0];\r\n\t\t\t\tString password = split[1];\r\n\t\t\t\tString user = split[2];\r\n\t\t\t\tusers.add(new User(username,password,user));\r\n\r\n\t\t\t} \r\n\t\t\tbufferedReader.close(); \r\n\t\t}\r\n\t\tcatch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Unable to open file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t\tcatch(IOException ex) {\r\n\t\t\tSystem.out.println(\"Error reading file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t}", "private void setUserAccount() throws FileNotFoundException\r\n\t{\r\n\t\tint index = 0;\r\n\t\tFile inputFile = new File(\"UserAccount.txt\");\r\n\t\tScanner input = new Scanner(inputFile);\r\n\t\tif (!inputFile.exists())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The text file \\\"UserAccount.txt\\\" is missing\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\twhile(input.hasNextLine())\r\n\t\t{\r\n\t\t\tuserAccounts[0][index] = input.nextLine();\t\t\t//stores the username\r\n\t\t\tuserAccounts[1][index] = input.nextLine();\t\t\t//stores the password\r\n\t\t\tnumOfUsers++;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}", "public void adminLoad() {\n try {\n File file = new File(adminPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n String data = scanner.nextLine();\n String[]userData = data.split(separator);\n AdminAccounts adminAccounts = new AdminAccounts();\n adminAccounts.setUsername(userData[0]);\n adminAccounts.setPassword(userData[1]);\n users.add(adminAccounts);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void addNewClient(String username,String password){\n try(FileWriter fileWriter = new FileWriter(\"ClientsInformation.txt\",true)){\n fileWriter.write(username + \", \" + password + \"\\n\"); // Writes new client information in the database\n usersDataBase.put(username,password); // Updates the map with new client information\n }catch (IOException ioException)\n {\n System.out.println(\"From ClientsInformationManager - \" + ioException.getMessage());\n }\n }", "public void addToFile(String username, String password, int state){\r\n User newUser = new User(username, password, state);\r\n addToFile(newUser);\r\n }", "void addUserInfo(String user, String password) {\r\n if (!userInfo.containsKey(user)) {\r\n userInfo.put(user, password);\r\n } else {\r\n System.out.println(\"User already exist!\");\r\n }\r\n writeToFile(\"Password.bin\", userInfo);\r\n }", "public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void addUser(String filename, String username, String userkey) {\n\t\ttry {\n\t\t\t// Open the user file, create new one if not exists\n\t\t\tFileWriter fileWriterUser = new FileWriter(filename, true);\n\t\t\t// User BufferedWriter to add new line\n\t\t\tBufferedWriter bufferedWriterdUser = new BufferedWriter(fileWriterUser);\n\n\t\t\t// Concatenate user name and key with a space\n\t\t\tbufferedWriterdUser.write(username + \" \" + userkey);\n\t\t\t// One user one line\n\t\t\tbufferedWriterdUser.newLine();\n\n\t\t\t// Always close files.\n\t\t\tbufferedWriterdUser.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + filename + \"'\");\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void registerNewUser(String _login, char[] _password) {\n try {\n File passwordFile = new File(\"passwords.txt\");\n FileWriter fw = new FileWriter(passwordFile, true);\n BufferedWriter bw = new BufferedWriter(fw);\n\n bw.write(_login);\n bw.write(\",\");\n bw.write(_password);\n bw.newLine();\n bw.close();\n fw.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n }\n }", "public void loadAllUsers(String filename) throws Exception {\r\n BufferedReader br = new BufferedReader(new FileReader(filename));\r\n String name;\r\n try {\r\n while ((name = br.readLine()) != null)\r\n addUser(name);\r\n } catch (Exception e) {\r\n throw new Exception(\"Error: File not Readable\");\r\n }\r\n }", "public void importUsers(String filename) throws Exception {\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\twhile(true) {\r\n\t\t\tString line = br.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tbreak;\r\n\t\t\tString[] tokens = line.split(\",\");\r\n\t\t\tString userLastName = tokens[0].trim();\r\n\t\t\tString userFirstName = tokens[1].trim();\r\n\t\t\tString userMiddleName = tokens[2].trim();\t\t\t\r\n\t\t\tString email = tokens[3].trim();\r\n\t\t\tString userName = tokens[4].trim();\r\n\t\t\tString password = tokens[5].trim();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Line:\"+line);\r\n\t\t\tSystem.out.println(\"LastName:\"+userLastName);\r\n\t\t\tSystem.out.println(\"FirstName:\"+userFirstName);\r\n\t\t\tSystem.out.println(\"MiddleName:\"+userMiddleName);\r\n\t\t\tSystem.out.println(\"Email:\"+email);\r\n\t\t\tSystem.out.println(\"UserName:\"+userName);\r\n\t\t\tSystem.out.println(\"Password:\"+password);\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\tuser.setLastName(userLastName);\r\n\t\t\tuser.setFirstName(userFirstName);\r\n\t\t\tuser.setMiddleName(userMiddleName);\r\n\t\t\tuser.setEmailAddress(email);\r\n\t\t\tuser.setUserName(userName);\r\n\t\t\tuser.setPassword(password);\t\t\t\r\n\t\t\tuser.setStatus(UserStatus.ACTIVE);\r\n\t\t\t\r\n\t\t\tem.persist(user);\r\n\t\t}\r\n\t\t\r\n\t\tbr.close();\r\n\t\tfr.close();\r\n\t}", "public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}", "private static void readUserListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"users.json\")) {\n\n\t\t\tJSONArray userListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < userListJSON.size(); i++) {\n\t\t\t\tJSONObject user = (JSONObject) userListJSON.get(i);\n\t\t\t\tString name = (String) user.get(\"name\");\n\t\t\t\tString surname = (String) user.get(\"surname\");\n\t\t\t\tString username = (String) user.get(\"username\");\n\t\t\t\tString password = (String) user.get(\"password\");\n\t\t\t\tString account = (String) user.get(\"account\");\n\n\t\t\t\tif(account.equals(\"employee\")) {\n\t\t\t\t\tMain.userList.add(new Employee(username, name, surname, password));\n\t\t\t\t} else {\n\t\t\t\t\tMain.userList.add(new Customer(username, name, surname, password));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void readUserFile() {\n\t\ttry {\n\t\t\tObjectInputStream readFile = new ObjectInputStream(new FileInputStream(userFile));\n\t\t\tVerify.userList = (ArrayList<User>) readFile.readObject();\n\t\t\treadFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//add contents of file to separate lists\n\t\tfor (int i=0; i<Verify.userList.size(); i++) {\n\t\t\tVerify.userIds.add(Verify.userList.get(i).getUserId());\n\t\t\tVerify.usernames.add(Verify.userList.get(i).getUsername());\n\t\t\tif (Verify.userList.get(i).getAccounts() != null) {\n\t\t\t\tVerify.accountList.addAll(Verify.userList.get(i).getAccounts());\n\t\t\t}\n\t\t\tif (Verify.userList.get(i).getRequests() != null) {\n\t\t\t\tVerify.requestList.addAll(Verify.userList.get(i).getRequests());\t\n\t\t\t}\n\t\t}\n\t\tfor (Account account: Verify.accountList) {\n\t\t\tVerify.accountIds.add(account.getAccountId());\n\t\t}\n\t}", "public static void UserAccounts() throws FileNotFoundException{\n\t\tScanner input = new Scanner(new File(AccountFile));\t\t\t\t//Creats objects and adds to array list.\r\n\t\t\r\n\t\twhile (input.hasNextLine()) {\t\t\t\t\t\t\t\t\t//Loops as long as there is another line\r\n\t\t\t\r\n\t\t\tString line = input.nextLine();\r\n\t\t\tif(line.equals(\"ADMIN\")) {\t\t\t\t\t\t\t\t\t//Checks if the data is for Admin, creats admin object\r\n\t\t\t\tString AdminUsername = input.nextLine();\r\n\t\t\t\tString AdminPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tAdmin admin = new Admin(AdminUsername, AdminPassword);\r\n\t\t\t\taccounts.add(admin);\r\n\t\t\t\t\r\n\t\t\t} if(line.equals(\"COORDINATOR\")){\r\n\t\t\t\tString coordinatorUsername = input.nextLine();\r\n\t\t\t\tString coordinatorPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tCoordinator coordinator = new Coordinator(coordinatorUsername, coordinatorPassword);\r\n\t\t\t\taccounts.add(coordinator);\r\n\r\n\t\t\t} if(line.equals(\"APPROVER\")){\r\n\t\t\t\tString approverUsername = input.nextLine();\r\n\t\t\t\tString approverPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tApprover approver = new Approver(approverUsername, approverPassword);\r\n\t\t\t\taccounts.add(approver);\r\n\r\n\t\t\t} if(line.equals(\"CASUAL\")){\r\n\t\t\t\tString casualUsername = input.nextLine();\r\n\t\t\t\tString casualPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tCasualStaff casual = new CasualStaff(casualUsername, casualPassword);\r\n\t\t\t\taccounts.add(casual);\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} loginSystem();\r\n\t}", "public static void createOrOpenUsersFile() {\n try {\r\n File usersFile = new File(\"users.txt\");\r\n if (usersFile.createNewFile()) {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" has been created.\");\r\n } else {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" is ready.\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "private void loadUsers() throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileInputStream fileInputStream = new FileInputStream(accounts);\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));\n\n for (String line = bufferedReader.readLine(); line != null; line = bufferedReader.readLine()) {\n String[] pair = line.split(\":\");\n userAccounts.put(pair[0], pair[1]);\n }\n }", "public void saveUsers() {\n\t\ttry {\n\t\t\t\n\t\t\tFile xmlFile = new File(\"Users.xml\");\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument document = builder.parse(xmlFile);\n\t\t\tElement users = document.getDocumentElement();\n\t\t\t\n\t\t\tArrayList<Student> u = ManageUsers.getActiveList();\n\t\t\tfor (int i = 0; i < u.size(); i++) {\n\t\t\t\t// Grab the info for a specific student\n\t\t\t\tStudent s = u.get(i);\n\t\t\t\tString fName = s.getFirstName();\n\t\t\t\tString lName = s.getLastName();\n\t\t\t\tint ucid = s.getUcid();\n\t\t\t\tint currentBorrowing = s.getCurrentBorrowing();\n\t\t\t\tboolean isActive = true;\n\t\t\t String username = s.getUsername();\n\t\t\t String password = s.getPassword();\n\t\t\t boolean isLibrarian = s.getIsLibrarian();\n\t\t\t \n\t\t\t Element student = document.createElement(\"student\");\n\t\t\t \n\t\t\t // Make a new element <student>\n\t\t\t // Add the element to the xml as a child of <Users>\n\t\t\t // Add the above fields (fName, etc.) as child nodes to the new student node\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Something went wrong with writing to the xml\");\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "private void registerUser() throws FileNotFoundException, IOException\r\n\t{\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tString fname;\r\n\t\tString lname;\r\n\t\tint attempt = 0;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\t//PrintWriter wrapped around a BufferedWriter that is wrapped around a FileWriter\r\n\t\t//used to write on a file\r\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"UserAccount.txt\", true)));\t//true allows appending\r\n\t\t\r\n\t\t//gets user's first and last name\r\n\t\tSystem.out.println(\"Enter your first name: \");\r\n\t\tfname = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name: \");\r\n\t\tlname = input.nextLine();\r\n\t\t\r\n\t\t//gets user's desired username\r\n\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\tusername = input.nextLine();\r\n\t\tattempt++;\r\n\t\twhile (checkUserExists(username) != -1)\t\t//username already exists\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nThat username already exists\");\r\n\t\t\tif (attempt == 2)\t\t//generate random username with 8 characters after 2 attempts\r\n\t\t\t{\r\n\t\t\t\tif (lname.length() < 6)\t\t\t\t//if last name has less than six characters\r\n\t\t\t\t\tusername = lname;\r\n\t\t\t\telse\t\t\t\t\t\t\t\t//else if last name has six characters or greater\r\n\t\t\t\t\tusername = lname.substring(0, 6);\r\n\t\t\t\tfor (int i = username.length(); i < 8; i++)\t\t\t//loop runs until username has 8 characters\r\n\t\t\t\t\tusername += random.nextInt(9) + 1;\t\t\t\t//concatenate random number between 0 - 9 to the username\r\n\t\t\t\tSystem.out.println(\"A randomly generated username has been chosen for you.\");\r\n\t\t\t\tSystem.out.println(\"Your username is \" + username);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\t\t\tusername = input.nextLine();\r\n\t\t\t\tattempt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpw.println(username);\r\n\t\tuserAccounts[0][numOfUsers] = username;\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//get user's password\r\n\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\tpassword = input.nextLine();\r\n\t\twhile (password.length() < 8)\t\t\t//continues to loop until pass is at least 8 characters long\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nPassword must be at least eight characters long\");\r\n\t\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\t\tpassword = input.nextLine();\r\n\t\t}\r\n\t\tpw.println(password);\r\n\t\tuserAccounts[1][numOfUsers] = password;\r\n\t\tnumOfUsers++;\r\n\t\tpw.close();\r\n\t}", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "static void loadUser() {\n\t\tScanner inputStream = null; // create object variable\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStream = new Scanner(new File(\"user.txt\"));\n\t\t\tinputStream.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No User Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStream.hasNext()) {\n\n\t\t\t\tString instanceOf = inputStream.next();\n\n\t\t\t\tString readUserName = inputStream.next();\n\t\t\t\tString readPassword = inputStream.next();\n\t\t\t\tString readEmployeeNumber = inputStream.next();\n\t\t\t\tString readName = inputStream.next();\n\t\t\t\tString readPhone = inputStream.next();\n\t\t\t\tString readEmail = inputStream.next();\n\t\t\t\tif (instanceOf.contains(\"*AD*\")) {\n\t\t\t\t\tAdmin a1 = new Admin(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Admin User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CC*\")) {\n\t\t\t\t\tCourseCoordinator a1 = new CourseCoordinator(readUserName, readPassword, readEmployeeNumber,\n\t\t\t\t\t\t\treadName, readPhone, readEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an CC User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*AP*\")) {\n\t\t\t\t\tApproval a1 = new Approval(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Approval User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CA*\")) {\n\t\t\t\t\tCasual a1 = new Casual(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\ta1.setHrly_rate(inputStream.nextInt());\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Casual User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStream.close();\n\t}", "private void loadDataFromFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // load data for new users after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // load data for existing users after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "private void modify() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.set(i,\r\n\t\t\t\t\t\tnew LoginUser(logTxtIp.getText(), logTxtId.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPw.getText(), logTxtSdi.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPort.getText(), dbType.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.toString()));\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tinitTableView();\r\n\r\n\t}", "public void userLogInInfoRead(String filepath2, HashMap<String, EmpInfo> mergeData) {\n String data;\n String[] userLogInInfoToken;\n File userLogInInfoFile = new File(filepath2);\n Scanner scanner = null;\n try {\n scanner = new Scanner(userLogInInfoFile);\n } catch (FileNotFoundException e) {\n out.println(\"file not found\");\n }\n if (scanner != null) {\n while (scanner.hasNextLine()) {\n data = scanner.nextLine();\n userLogInInfoToken = data.split(\",\");\n // store userid in mergeData as a key\n EmpInfo empInfo = new EmpInfo(Integer.parseInt(userLogInInfoToken[0]),\n userLogInInfoToken[1], userLogInInfoToken[2], userLogInInfoToken[3]);\n EmpInfo uRole = mergeData.get(userLogInInfoToken[0]);\n uRole.setUserRole(userLogInInfoToken[3]);\n /* merge data have already 6 key and 6 emp information if new key is equal to old key\n then hash map not put new key and hashmap put userRole at old key,hashmap allowed only unique kay*/\n mergeData.put(userLogInInfoToken[0], uRole);\n // all employee log in information add in arraylist for printing information\n userLogInInfo.add(empInfo);\n }\n }\n }", "public void adduserFile(Usuari usuari) throws FileNotFoundException, IOException{\r\n FileWriter fw = new FileWriter(fitxerUsuaris, true);\r\n \r\n fw.write(usuari.getDni());\r\n fw.write(usuari.getNom());\r\n fw.write(usuari.getCognom1());\r\n fw.write(usuari.getCognom2());\r\n fw.write(usuari.getPassword());\r\n \r\n fw.close();\r\n }", "private List<User> readFromFile() {\n\n List<String> lines = new ArrayList<>();\n List<User> contactList = new ArrayList<>();\n Map<String, PhoneNumber> phoneNumbersNewUser = new HashMap<>();\n\n try (BufferedReader in = new BufferedReader(new FileReader(contactsFile))) {\n String line;\n while ((line = in.readLine()) != null) {\n lines.add(line);\n }\n\n } catch (IOException ex) {\n System.out.println(\"File not found \\n\" + ex);\n ;\n }\n\n for (String line : lines) {\n String[] userProperties = line.split(\"\\\\|\");\n\n int id = Integer.parseInt(userProperties[0]);\n String fName = userProperties[1];\n String lName = userProperties[2];\n String email = userProperties[3];\n int age = Integer.parseInt(userProperties[4]);\n String[] phones = userProperties[5].split(\"\\\\,\");\n String[] homePhone = phones[0].split(\"\\\\_\");\n String[] mobilePhone = phones[1].split(\"\\\\_\");\n String[] workPhone = phones[2].split(\"\\\\_\");\n phoneNumbersNewUser.put(homePhone[0], new PhoneNumber(homePhone[1], homePhone[2]));\n phoneNumbersNewUser.put(mobilePhone[0], new PhoneNumber(mobilePhone[1], mobilePhone[2]));\n phoneNumbersNewUser.put(workPhone[0], new PhoneNumber(workPhone[1], workPhone[2]));\n String[] homeAdress = userProperties[6].split(\"\\\\,\");\n Address homeAdressNewUser = new Address(homeAdress[0], Integer.parseInt(homeAdress[1]), Integer.parseInt(homeAdress[2]),\n homeAdress[3], homeAdress[4], homeAdress[5], homeAdress[6]);\n String title = userProperties[7];\n String[] companyProperties = userProperties[8].split(\"\\\\_\");\n String[] companyAddress = companyProperties[1].split(\"\\\\,\");\n Address companyAddressNewUser = new Address(companyAddress[0], Integer.parseInt(companyAddress[1]),\n Integer.parseInt(companyAddress[2]), companyAddress[3], companyAddress[4], companyAddress[5],\n companyAddress[6]);\n String companyName = companyProperties[0];\n Company companyNewUser = new Company(companyName, companyAddressNewUser);\n boolean isFav = Boolean.parseBoolean(userProperties[9]);\n User user = new User(id, fName, lName, email, age, phoneNumbersNewUser, homeAdressNewUser, title, companyNewUser, isFav);\n contactList.add(user);\n }\n\n\n return contactList;\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "public static void createUsername(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeeUsername = \"\";\n\t\tdo {\n\t\t\temployeeUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (!newEmp.setUsername(employeeUsername)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong employee name, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeeUsername));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/username.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeeUsername + \", \");\n\t\toutputFile.close();\n\t}", "public void createUser(List<User> list) {\n\n Gson gson = new Gson();\n FileService writerService = new FileService();\n for (User user : list) {\n String userData = gson.toJson(user);\n writerService.writeToUserData(userData);\n }\n\n }", "public static void writeTo(String filename, List<User> users){\r\n\t\tPrintWriter pw=null;\r\n\t\ttry{\r\n\t\t\tpw=new PrintWriter(new FileOutputStream(new File(filename),false));//false because don't append,\r\n\t\t\tfor(User user : users){//it replaces all with new updated data\r\n\t\t\t\tpw.write(user+\"\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tpw.close();\r\n\t\t}\r\n\t}", "public static boolean addNewLogin(String username, String password) {\n\t\tif (users.getEntry(\"salt\", \"username\", username) != null)\n\t\t\treturn false;\n\n\t\tint bits = 256;\n\n\t\t// generate a random salt\n\t\tBigInteger lowerBound = new BigInteger(2).pow(bits - 1);\n\n\t\tBigInteger upperBound = new BigInteger(2).pow(bits);\n\n\t\tBigInteger rand = BigInteger.randomBigInteger(upperBound.subtract(lowerBound)).add(lowerBound);\n\n\t\tString salt = rand.toString(16);\n\n\t\t// generate the hash for the password given the salt\n\t\tbyte[] binary = hashPassword(password.toCharArray(), DatatypeConverter.parseHexBinary(salt), 10, 256);\n\n\t\tString hexBinary = DatatypeConverter.printHexBinary(binary);\n\n\t\t// save the values to the csv file\n\t\tString entry = String.format(\"%s, %s, %s\", username, salt, hexBinary);\n\n\t\tchar[] entryArray = entry.toCharArray();\n\t\tuserFile.writeChar('\\r');\n\t\tuserFile.writeChar('\\n');\n\t\tfor (char character : entryArray) {\n\t\t\tuserFile.writeChar(character);\n\t\t}\n\n\t\tusers.refreshData();\n\t\t\n\t\t// save the file back to the drive\n\t\ttry {\n\t\t\tuserFile.save(new File(FileLocations.getUserLoginFile()));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn true;\n\t}", "public void newUserDirectory() {\n\t\tusers = new LinkedAbstractList<User>(100);\n\t}", "public void saveUsers() {\n FileWriter fileWriter = null;\n PrintWriter printWriter = null;\n try {\n fileWriter = new FileWriter(pathData);\n printWriter = new PrintWriter(fileWriter);\n if (users != null) {\n \n for (Map.Entry m : users.entrySet()) {\n printWriter.println(m.getKey() + spChar + m.getValue() + \"\\n\");\n }\n }\n printWriter.close();\n } catch (IOException e) {\n }\n }", "public void addUser(User user) {\n users.add(new User(user.getUsername(), Hash.md5(user.getPassword())));\n // Naively dump the whole users list to file\n reader.dumpToFile(users);\n }", "public void writeUsers() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/users.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(users);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public void addUser(String username, String password, String balance) throws IOException {\r\n // create a new user\r\n User user = new User(username, password, balance);\r\n // add new user to arraylist\r\n this.users.add(user);\r\n // write the new user to the text file\r\n this.userInfo.writeToFile(this.users.get(this.users.size() - 1).getUsername(), this.users.get(this.users.size() - 1).getPassword(password), this.users.get(this.users.size() - 1).getBalance());\r\n }", "public static void writeUserFile(List<User> List) {\n\t\ttry {\n\t\t\tObjectOutputStream writeFile = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\t\twriteFile.writeObject(List);\n\t\t\twriteFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void StoreUsers(ArrayList<User> usersList) {\r\n\t\ttry {\r\n\t\t\tfw = new FileWriter(\".\\\\data\\\\users.txt\"); // writes data into\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \\\\data\\\\books.txt\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tfor (int i = 0; i < usersList.size(); i++) { // for loop will run\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// till\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the size of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// list usersList\r\n\t\t\t\tString content = \"\"; // Content is declared as String\r\n\t\t\t\tUser user = usersList.get(i); // Gets content of the array list\r\n\t\t\t\tcontent += user.getId() + \"::\"; // Gets ID of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getName() + \"::\"; // Gets Name of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getNumBooksBorrowed() + \"::\"; // Gets Number of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Books\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Borrowed of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and adds ::\r\n\t\t\t\tcontent += user.getPhone() + \"::\"; // Gets Phone Number of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Member and adds ::\r\n\t\t\t\tcontent += user.getreturndate() + \"\\n\"; // Gets Return Date of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\r\n\t\t\t\tbw.write(content); // writes the content of the Members in the\r\n\t\t\t\t\t\t\t\t\t// text file\r\n\r\n\t\t\t}\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Complete storing all users!\", \"Store Users\",\r\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE); // confirms with a message that\r\n\t\t\t\t\t\t\t\t\t\t\t\t// the Members are stored\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null)\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\tif (fw != null)\r\n\t\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "public static void createPassword(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeePassword = \"\";\n\t\tdo {\n\t\t\temployeePassword = JOptionPane.showInputDialog(\"Please enter a password.\");\n\t\t\tif (!newEmp.setUsername(employeePassword)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong password, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeePassword + \", \"));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/password.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeePassword + \", \");\n\t\toutputFile.close();\n\t}", "public void loadUsers() {\n CustomUser userOne = new CustomUser();\n userOne.setUsername(SpringJPABootstrap.MWESTON);\n userOne.setPassword(SpringJPABootstrap.PASSWORD);\n\n CustomUser userTwo = new CustomUser();\n userTwo.setUsername(SpringJPABootstrap.TEST_ACCOUNT_USER_NAME);\n userTwo.setPassword(SpringJPABootstrap.TEST_ACCOUNT_PASSWORD);\n\n String firstUserName = userOne.getUsername();\n\n /*\n * for now I am not checking for a second user because there is no delete method being\n * used so if the first user is created the second user is expected to be created. this\n * could cause a bug later on but I will add in more logic if that is the case in a\n * future build.\n */\n if(userService.isUserNameTaken(firstUserName)) {\n log.debug(firstUserName + \" is already taken\");\n return ;\n }\n userService.save(userOne);\n userService.save(userTwo);\n\n log.debug(\"Test user accounts have been loaded!\");\n }", "public void load(String fileName) throws IOException{\n\t\tFileInputStream fileIn=null;\n\t try {\n\t\t\tfileIn = new FileInputStream(fileName);\n\t\t\tArrayList<User1> userList; // = new ArrayList<User1>();\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t// Tramite la funzione readValue riottengo la lista degli utenti a partire dalla stringa con codifica JSON\n\t\t\t//userList = mapper.readValue(fileIn, new TypeReference<ArrayList<User1>>());\n\t\t\tUser1[] array = mapper.readValue(fileIn, User1[].class);\n\t\t\tuserList=new ArrayList<>(Arrays.asList(array));\n\t\t\tfor(User1 userWrapped : userList) // Per ogni utente nella lista, riottengo l'oggetto User, andando a ripopolare il Realm (ripristino)\n\t\t\t{\n\t\t\t\tUser user = new User(userWrapped.getIdentifier(), userWrapped.getSecret());\n\t\t\t\trealm.getUsers().add(user); // Aggiungo l'utente alla lista\n\t\t\t}\n\t\t\tfileIn.close();\n\t\t} catch (IOException e){\n\t\t\tif(fileIn!=null)fileIn.close();\n\t \tthrow e;\n\t\t}\n\n\t}", "@Override\n public boolean addUserPersonalInfo(String text) \n {\n \n User tmp = this.getLoggedUser();\n tmp.setPersonal_details(text);\n if(this.setLoggedUser(tmp)) System.out.print(\"done\");\n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO user_personal_information (user_id,information) VALUES ( \" + this.getLoggedUser().getId() + \" , '\" + text + \"')\";\n \n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n \n }", "public void add(String fullName, String username, String password, String accType, String email, String salary){\n\t\t\n\t\t// Determine position where new User needs to be added\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\t// Check if the list contains only the head\n\t\tif(marker.getNext()!= null){\n\t\tmarker = marker.getNext();\t\t\t\t\t\t\t\t\t/* ====> If not then skip the head */\n\t\t}\n\t\t\n\t\t\n\t\t/*Iterate through the whole list and compare Strings. Move the marker until it reaches the end or until the input\n\t\t * username is greater than the marker's username . */\n\t\twhile((marker.getNext() != null) && (username.compareTo(marker.getUsername())>0)){\n\t\t\t\t\tmarker = marker.getNext();\n\t\t\t\t}\t\t\n\t\t\n\t\t/* When marker finds a user whose username is greater than the input it moves the marker back a position so that the new\n\t\t * user can be appended to that marker */\n\t\tif(marker.getPrev() != null){\n\t\t\t\tif(username.compareTo(marker.getUsername())<0){\n\t\t\t\t\tmarker = marker.getPrev();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Create new user with the method's parameters as properties. Append it to the marker\n\t\tUser newUser = new User(marker.getNext(), marker);\n\t\tnewUser.setFullName(fullName);\n\t\tnewUser.setUsername(username);\n\t\tnewUser.setPassword(password);\n\t\tnewUser.setAccType(accType);\n\t\tnewUser.setEmail(email);\n\t\tnewUser.setSalary(salary);\n\t\t\n\t\t// Set connections to the new User\n\t\tnewUser.getPrev().setNext(newUser);\n\t\tif(newUser.getNext() != null){\n\t\tnewUser.getNext().setPrev(newUser);\n\t\t}\n\n\t}", "protected void saveUserAccounts(List<UserInfo> userList) throws RepositoryException {\n RepositoryFileManager fileManager = repositoryManager.getFileManager();\n boolean success = false;\n fileManager.startChangeSet();\n\n try {\n File usersFile = new File( fileManager.getRepositoryLocation(), REPOSITORY_USERS_FILE );\n RepositoryUsers repoUsers = new RepositoryUsers();\n Marshaller marshaller = jaxbContext.createMarshaller();\n\n repoUsers.getUser().addAll( userList );\n fileManager.addToChangeSet( usersFile );\n\n marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, true );\n marshaller.setProperty( \"com.sun.xml.bind.namespacePrefixMapper\", new NamespacePrefixMapper() {\n public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {\n return REPOSITORY_EXT_NAMESPACE.equals( namespaceUri ) ? \"r\" : suggestion;\n }\n\n @Override\n public String[] getPreDeclaredNamespaceUris() {\n return new String[] {REPOSITORY_EXT_NAMESPACE};\n }\n } );\n marshaller.setSchema( validationSchema );\n marshaller.marshal( objectFactory.createRepositoryUsers( repoUsers ), usersFile );\n\n fileManager.commitChangeSet();\n userFileLastModified = -1;\n success = true;\n\n } catch (JAXBException e) {\n throw new RepositoryException( \"Error committing user updates to file system.\", e );\n\n } finally {\n try {\n if (!success) {\n fileManager.rollbackChangeSet();\n }\n } catch (Exception e) {\n // Ignore error and continue\n }\n }\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n // check for correct usage\n if (args.length < 1) {\n System.out.println(\"usage: java Vault [-au] <filename>\");\n System.exit(1);\n }\n\n // check for au option\n boolean addUser = false;\n if (args.length == 2)\n addUser = true;\n\n // open the file, or print error and exit\n Scanner sc = null;\n try {\n sc = new Scanner(new FileReader((addUser ? args[1] : args[0])));\n }catch (IOException e) {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' could not be opened.\");\n System.exit(2);\n }\n \n // read each line of the file, storing each user in users\n ArrayList<User> users = new ArrayList<User>();\n while (sc.hasNextLine()) {\n String[] line = sc.nextLine().split(\" \");\n \n if (line.length == 4 && line[0].equals(\"user\")) {\n users.add(new User(line[1], line[2], line[3]));\n\n }else if (line.length == 4 && line[0].equals(\"data\")) {\n for (int i = 0; i < users.size(); i++) {\n if (users.get(i).getName().equals(line[1]))\n users.get(i).addDatum(line[2], line[3]);\n }\n\n }else {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' improperly formatted.\");\n System.exit(3);\n }\n\n }\n //close read file\n sc.close();\n\n // ask user for username and password\n System.out.print(\"username: \");\n String name = System.console().readLine();\n System.out.print(\"password: \");\n char[] password = System.console().readPassword();\n\n // if au option, collect info and add to file, then quit\n if (addUser) {\n PrintWriter pw = null;\n try {\n pw = new PrintWriter(new File(args[1]));\n } catch (FileNotFoundException fnfe) {\n fnfe.printStackTrace();\n System.exit(6);\n }\n\n System.out.print(\"Hash algorithm: \");\n String hashAlg = System.console().readLine();\n\n // perform checks and hash password\n for (char c : password) {\n if ((int)c < 42 || (int)c > 122) {\n System.out.println(\"Error! Invalid symbol '\" + c + \"' in password.\");\n System.exit(7);\n }\n }\n Hasher hasher = null;\n String passhash = null;\n if (hashAlg.equals(\"clear\")) {\n hasher = new Clear();\n }else if (hashAlg.equals(\"shift+caesar\")) {\n hasher = new Caesar();\n }else if (hashAlg.equals(\"shift+vigenere\")) {\n hasher = new Vigenere();\n }else {\n System.out.println(\"Error! Hash algorithm '\" + hashAlg + \"' not supported.\");\n System.exit(8);\n }\n passhash = hasher.hash(password);\n for (User u : users) {\n if (u.getName().equals(name)) {\n System.out.print(\"Error! Username '\" + name + \"' already in use.\");\n System.exit(9);\n }\n }\n \n users.add(new User(name, hashAlg, passhash));\n for (User u : users) {\n pw.println(String.join(\" \", \"user\", u.getName(), u.getHashAlg(), u.getHash()));\n }\n\n pw.close();\n System.exit(0);\n }\n\n // determine access, exit if denied\n boolean access = false;\n User curr = null;\n for (User u : users) {\n if (u.getName().equals(name)) {\n try {\n if (u.validate(password)) {\n System.out.println(\"Access granted!\");\n access = true;\n curr = u;\n }\n break;\n }catch (UnsupportedHashException e) {\n System.out.println(\"Error! Hash algorithm '\" + u.getHashAlg() + \n \"' not supported.\");\n System.exit(4);\n }\n }\n }\n if (!access) {\n System.out.println(\"Access denied!\");\n System.exit(5);\n }\n\n // if granted access, open prompt for commands\n System.out.print(\"> \");\n sc = new Scanner(System.in);\n String cmd = null;\n ArrayList<Datum> data = curr.getData();\n while (!(cmd = sc.next()).equals(\"quit\")) {\n switch(cmd) {\n case \"labels\": for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n System.out.println(plain.split(\"_\")[0]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" +\n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break;\n\n case \"get\": cmd = sc.next();\n for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n if (plain.split(\"_\", 2)[0].equals(cmd))\n System.out.println(plain.split(\"_\", 2)[1]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" + \n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break; \n\n default: System.out.println(\"Unknown command '\" + cmd + \"'.\");\n break;\n }\n System.out.print(\"> \");\n\n }\n\n \n\n }", "void addNewAccountToFile(Account newAccount);", "public void addUserCredentials(String login, String password) throws SQLException;", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "void addUserpan(String userid,String username,String userpwd);", "private final void loadDefaultUsers() throws Exception {\r\n // Get the default User definitions from the XML defaults file. \r\n File defaultsFile = findDefaultsFile();\r\n // Add these users to the database if we've found a default file. \r\n if (defaultsFile.exists()) {\r\n server.getLogger().info(\"Loading User defaults from \" + defaultsFile.getPath()); \r\n Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();\r\n Users users = (Users) unmarshaller.unmarshal(defaultsFile);\r\n for (User user : users.getUser()) {\r\n user.setLastMod(Tstamp.makeTimestamp());\r\n this.dbManager.storeUser(user, this.makeUser(user), this.makeUserRefString(user));\r\n }\r\n }\r\n }", "@Override\n\tpublic void addUsers(Session session){\n\t\ttry{\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\n\t\t\tSystem.out.print(\"+++++++++++Add Customer/Admin here+++++++++++\\n\");\n\n\t\t\tSystem.out.println(\"Enter 'Admin' to add a new admin to database\");\n\t\t\tSystem.out.println(\"Enter 'Customer' to add a new admin to database\");\n\t\t\tSystem.out.println(\"--------------Enter one from above------------------\");\n\t\t\tString accType = scanner.nextLine();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter First Name:\");\n\t\t\tString firstName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Last Name:\");\n\t\t\tString lastName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter UserId:\");\n\t\t\tString inputLoginId = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Password:\");\n\t\t\tString inputLoginPwd = scanner.nextLine();\n\n\t\t\t//pass these input fields to client controller\n\t\t\tsamp=mvc.addUsers(session,accType,firstName,lastName,inputLoginId,inputLoginPwd);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Users Exception: \" +e.getMessage());\n\t\t}\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "@Override\n public void updateUserJson() {\n synchronized (lockUpdateUserJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Users.json\")) {\n ArrayList<User> userAsArray = new ArrayList<>();\n for (Map.Entry<String, User> entry : mapOfRegisteredUsersByUsername.entrySet()) {\n userAsArray.add(entry.getValue());\n }\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"users\", writer.toJsonTree(userAsArray));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "public void addUser(String fullName,String loginName,String password,boolean isAdmin) throws IOException {\n userManager.addUser(fullName, loginName, password, isAdmin);\n userManager.emptyLists();\n userManager.fillLists();\n AdminMainViewController.emptyStaticLists();\n AdminMainViewController.adminsObservableList.addAll(userManager.getAdminsList());\n AdminMainViewController.usersObservableList.addAll(userManager.getUsersList());\n }", "public void writeUserRegister(int id, String username, String password, boolean isNotified, String county) {\n try {\n JSONObject obj = (JSONObject) jsonParser.parse(new FileReader(file.getPath()));\n\n JSONObject newRegister = new JSONObject();\n\n JSONArray registerlist = (JSONArray) obj.get(\"Registry\");\n\n newRegister.put(\"id\", id);\n newRegister.put(\"name\", username);\n newRegister.put(\"password\", password);\n newRegister.put(\"county\", county);\n newRegister.put(\"isInfected\", false);\n newRegister.put(\"isNotified\", isNotified);\n\n registerlist.add(newRegister);\n\n JSONArray countyList = (JSONArray) obj.get(\"Counties\");\n JSONArray unregisteredUsers = (JSONArray) obj.get(\"UnregisteredUsers\");\n\n JSONObject objWrite = new JSONObject();\n\n objWrite.put(\"UnregisteredUsers\", unregisteredUsers);\n objWrite.put(\"Registry\", registerlist);\n objWrite.put(\"Counties\", countyList);\n\n FileWriter fileWriter = new FileWriter(file.getPath());\n\n fileWriter.write(objWrite.toJSONString());\n\n fileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public static void writeData(List<User> users) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = new FileOutputStream(USER_SAVE_FILE_NAME, false);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(users);\n oos.close();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n if (fos != null && oos != null) {\n try {\n oos.close();\n fos.close();\n } catch (Exception ex) {\n Logger.getLogger(Utilities.UserDataIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n\n }\n }\n }", "@Override\n public void save(String fileName){\n FileWriter addEmployeeDetails = null;\n\n try{\n addEmployeeDetails = new FileWriter(fileName,true);\n addEmployeeDetails.append(getUsername());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPassword());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getFirstname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getLastname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(DMY.format(getDoB()));//format,convert,save\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getContactNumber());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getEmail());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(String.valueOf(getSalary()));\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPositionStatus());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n //************Saves the address in the file.****************\n homeAddress.save(addEmployeeDetails);\n //**********************************************************\n addEmployeeDetails.append(\"$$$\");\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.close();\n addEmployeeDetails = null;\n\n }//end try\n catch (IOException ioe){}//end catch\n }", "public static void signIn(Login [] newLogin, Employee[] employee) {\n\t\tString myUsername = \"\";\n\t\tdo {\n\t\t\tmyUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (myUsername.length() == 0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid username, please try again.\");\n\t\t\t}\n\t\t} while (myUsername.length() == 0);\n\t\tScanner validateUsername;\n\t\ttry {\n\t\t\tvalidateUsername = new Scanner(new FileInputStream(\"./src/Phase5/username.txt\"));\n\t\t\twhile (validateUsername.hasNextLine()) {\n\t\t\t\tString copy = validateUsername.nextLine();\n\t\t\t\tif (copy.contains(myUsername + \",\")) {\n\n\t\t\t\t\tString myPassword = \"\";\n\t\t\t\t\tdo {\n\t\t\t\t\t\tmyPassword = JOptionPane.showInputDialog(\"Please enter a password.\");\n\t\t\t\t\t\tif (myPassword.length() == 0) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid password, please try again.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (myPassword.length() == 0);\n\t\t\t\t\tScanner validatePassword;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvalidatePassword = new Scanner(new FileInputStream(\"./src/Phase5/password.txt\"));\n\t\t\t\t\t\twhile (validatePassword.hasNextLine()) {\n\t\t\t\t\t\t\tString passwordCopy = validatePassword.nextLine();\n\t\t\t\t\t\t\tif (passwordCopy.contains(myPassword + \",\")) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Welcome\");\n\t\t\t\t\t\t\t\twork(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Password not found, try again.\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File not found\");\n\t\t\t\t\t}\t\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Username not found, try again.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\");\n\t\t}\n\n\t}", "public void addLoginRecord(String username, String password, String phoneNumber) throws ClirNetAppException {\n SQLiteDatabase db = this.getWritableDatabase();\n try {\n ContentValues contentValue = new ContentValues();\n\n contentValue.put(KEY_NAME, username);\n contentValue.put(KEY_PASSWORD, password);\n contentValue.put(PHONE_NUMBER, phoneNumber);\n\n // Inserting Row\n db.delete(TABLE_USER, null, null);\n db.insert(TABLE_USER, null, contentValue);\n } catch (Exception e) {\n throw new ClirNetAppException(\"Error inserting data\");\n } finally {\n if (db != null) {\n db.close(); // Closing database connection\n }\n }\n\n }", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "public void saveUser(User user) {\n\t\tFile d = new File(\"users\");\n\t\t\n\t\tif (!d.exists() || !d.isDirectory()) {\n\t\t\td.mkdir();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\t//Document document = builder.parse(f);\n\t\t\t\n\t\t\tDocument document = builder.newDocument();\n\t\t\t\n\t\t\tElement root = document.createElement(\"User\");\n\t\t\tdocument.appendChild(root);\n\t\t\t\n\t\t\troot.setAttribute(\"username\", user.name);\n\t\t\troot.setAttribute(\"password\", user.password);\n\t\t\t\n\t\t\t//System.out.println(\"Save: \" + user.password);\n\t\t\t\n\t\t\tIterator i = user.record.entrySet().iterator();\n\t\t\t\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tMap.Entry u = (Map.Entry)i.next();\n\t\t\t\tString name = (String)u.getKey();\n\t\t\t\tString record = (String)u.getValue();\n\n\t\t\t\tElement precord = document.createElement(\"Record\");\n\t\t\t\t\n\t\t\t\tprecord.setAttribute(\"username\", name);\n\t\t\t\tprecord.setTextContent(record);\n\t\t\t\troot.appendChild(precord);\n\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory tfactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = tfactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(document);\n\t\t\tStreamResult result = new StreamResult(new File(\"users/\" + user.name + \".xml\"));\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadUsersFromFile(String fileName) {\n\t\ttry {\n\t\t\tusers = UserRecordIO.readUserRecords(fileName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to read file \" + fileName);\n\t\t}\n\t}", "public void create_loginFile(String account){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.LOGIN_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(account+\" logged in,\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "private static ArrayList<User> loadInitialData(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t// From the users list get all the user names\n\t\tfor (String username:Utils.FileUtils.getFileLines(Global.Constants.LIST_OF_USERS)){ // refers \"users\" file\n\t\t\tArrayList<Directory> directories = new ArrayList<Directory>();\n\t\t\t// For a user name, read the names of directories registered\n\t\t\t// Note: All directory names are provided in the file bearing user name\n\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION + username)) { // refers to a specific user file \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // that has directories\n\t\t\t\tfor (String dir:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username)) {\n\t\t\t\t\tArrayList<String> documents = new ArrayList<String>();\n\t\t\t\t\t// For each directory, read names of files saved\n\t\t\t\t\t// Note: All file names are provided in the file bearing username$dirname\n\t\t\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION, username + \"$\" + dir)) {\n\t\t\t\t\t\tfor (String doc:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username + \"$\" + dir)) {\n\t\t\t\t\t\t\tdocuments.add(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectories.add(new Directory(dir, documents));\n\t\t\t\t}\n\t\t\t}\n\t\t\tusers.add(new User(username, directories));\n\t\t}\n\t\treturn users;\n\t}", "public static void addAccount(String user, String password)\r\n\t\t\tthrows IOException {\n\r\n\t\tFile file = getAccountFile();\r\n\r\n\t\tFileWriter fw = new FileWriter(file, true);\r\n\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(user);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(password);\r\n\r\n\t\twriter.close();\r\n\t\tfw.close();\r\n\t\tfile = null;\r\n\t}", "public void newEntry(String file, User user) {\r\n TableEntry entry = new TableEntry();\r\n entry.fileName = file;\r\n entry.userName = user.getName();\r\n entry.date = DateUtils.getISO8601Date(System.currentTimeMillis());\r\n \r\n int sz = m_entries.size();\r\n if ( (MAX_SIZE > 0) && (sz >= MAX_SIZE) ) {\r\n clear();\r\n sz = 0;\r\n }\r\n \r\n synchronized(m_entries) {\r\n m_entries.add(entry);\r\n ++sz;\r\n }\r\n fireTableRowsInserted(sz, sz);\r\n }", "public void addData(String User, String password) throws SQLException\n {\n }", "public static void writePasswdFile (Map<String, String> users, File dst) throws Exception{\n\t\tStringBuffer s = new StringBuffer(\"# Passwords for edu.ucar.dls.schemedit.security.login.FileLogin\");\n\t\tfor (String username : users.keySet() ) {\n\t\t\tString password = users.get(username);\n\t\t\tString passwdFileEntry = username + \":\" + Encrypter.encryptBaseSHA164(password);\n\t\t\ts.append(\"\\n\" + passwdFileEntry);\n\t\t}\n\t\tprtln(\"writing \" + users.size() + \" users to \" + dst);\n\t\t\n\t\tFiles.writeFile(s + \"\\n\", dst);\n\t\t// prtln (s.toString());\n\t}", "public void writeData(UserInfo info)\n\t{\n\t\tSystem.out.println(\"file has been written!\");\n\t\tuserinfos.add(info);\n\t}", "public void addBase(String baseIdentifier, String fileName, String user, String password) {\n bases.put(baseIdentifier, fileName);\r\n NeoDatisConfig config2 = config.copy();\r\n\r\n config2.setIsLocal(false);\r\n if(user != null && password != null) {\r\n config2.setUser(user);\r\n config2.setPassword(password);\r\n }\r\n sessionManagers.put(baseIdentifier, new SessionManager(new IOFileParameter(fileName, true, config2)));\r\n if(config2.isInfoEnabled(LOG_ID)) {\r\n DLogger.info(\"ODBServer:Adding base : name=\" + baseIdentifier + \" (file=\" + fileName + \") to server\");\r\n }\r\n }", "protected void reloadUsers() {\r\n\t\tif (smscListener != null) {\r\n\t\t\ttry {\r\n\t\t\t\tif (users != null) {\r\n\t\t\t\t\tusers.reload();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tusers = new Table(usersFileName);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Users file reloaded.\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\tevent.write(e, \"reading users file \" + usersFileName);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tevent.write(e, \"reading users file \" + usersFileName);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}", "private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"[email protected]\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"[email protected]\", 50), new User(\"Sita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"[email protected]\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"[email protected]\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}", "private void saveDataToFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // path for new accounts after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // path for existing accounts after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void writeNewUser(String name,String email,String password) {\n mDatabase.child(\"User\").child(name).child(\"Email\").setValue(email);\n mDatabase.child(\"User\").child(name).child(\"Password\").setValue(password);\n }", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void fillUsers(int totalEntries) {\n\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n storeOperations.createAccount(\"user_\" + i, \"password_\" + i, Fairy.create().person().getFirstName(), Fairy.create().person().getLastName());\n }\n }", "public static boolean addUserIntoFile(DSUser user) {\n\t\tDSUsers dsUsers = getUsersFromFile();\n\t\tboolean addResult = false;\n\t\tif (dsUsers != null) {\n\t\t\taddResult = dsUsers.getUsers().add(user);\n\t\t}\n\t\tboolean emptyResult = emptyFile(USERS_FILE);\n\t\tString json = gson.toJson(dsUsers);\n\t\tboolean writeResult = writeToFile(USERS_FILE, json);\n\n\t\treturn (addResult && emptyResult && writeResult);\n\t}", "@Override\n\tpublic boolean addNewUser() {\n\t\treturn false;\n\t}", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "@Override\n\tpublic User add(String name, String pwd, String phone) {\n\t\tSystem.out.println(\"OracleDao is add\");\n\t\treturn null;\n\t}", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "void addUser() throws NoSuchAlgorithmException\r\n\t{\r\n\t\tSystem.out.print(\"Create a user ID: \");\r\n\t\tString userIDinput = scan.next();\r\n\t\tSystem.out.print(\"Create a password: \");\r\n\t\tmakePassword(userIDinput, scan.next());\r\n\t}", "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "public void addPoint (String user, double point) throws IOException { \r\n this.point = this.point + point; \r\n Owner o = new Owner(user, password);\r\n String lineSplit[];\r\n out = new FileReader(\"Customer.txt\");\r\n BufferedReader read = new BufferedReader(out);\r\n \r\n String line;\r\n String data = \"\";\r\n \r\n while((line = read.readLine()) != null){\r\n lineSplit = null;\r\n lineSplit = line.split(\",\");\r\n userName = lineSplit[0];\r\n password = lineSplit[1];\r\n status = o.changeStatus(this.point);\r\n \r\n if(user.equals(userName)){\r\n data+=userName+\",\"+password+\",\"+status+\",\"+this.point+\"\\r\\n\";\r\n System.out.println(data);\r\n }\r\n else{\r\n data+=line+\"\\r\\n\";\r\n }\r\n }\r\n read.close();\r\n in = new FileWriter(\"Customer.txt\");\r\n in.write(data);\r\n in.close();\r\n }", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public static void serializeUsers(ListOfAllUsers list) throws FileNotFoundException, IOException {\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\toos.writeObject(list);\n\t\toos.close();\n\t\t//System.out.println(\"Serialized.\");\n\t}", "public abstract void saveUserDetails(User user) throws InlogException;" ]
[ "0.72991174", "0.6855459", "0.6586949", "0.6549896", "0.65038306", "0.64913654", "0.6479701", "0.645284", "0.6396378", "0.63917655", "0.63806", "0.63620186", "0.6292061", "0.6242891", "0.6168011", "0.6165869", "0.613007", "0.6119469", "0.6116803", "0.6116371", "0.6113373", "0.60936373", "0.6087758", "0.6015665", "0.5997707", "0.59810394", "0.59703445", "0.5969167", "0.59404355", "0.5935049", "0.592161", "0.5918031", "0.59125537", "0.58982337", "0.58815545", "0.58591247", "0.58424014", "0.58383816", "0.58347183", "0.582984", "0.58058727", "0.5801478", "0.5797809", "0.57948005", "0.57947266", "0.578163", "0.5781057", "0.5761973", "0.57604", "0.5756662", "0.5748453", "0.57420343", "0.57402605", "0.5739067", "0.5736349", "0.57174885", "0.57158107", "0.5700497", "0.5693582", "0.5683377", "0.5678002", "0.5675187", "0.5667591", "0.5660408", "0.56508243", "0.5649384", "0.5643585", "0.56392425", "0.56227297", "0.5620387", "0.56171495", "0.5600111", "0.56000197", "0.55835414", "0.5581018", "0.5579215", "0.5574393", "0.55733824", "0.556623", "0.55657095", "0.55636436", "0.5554892", "0.55530584", "0.55492496", "0.5548459", "0.5542999", "0.5539662", "0.5522398", "0.552113", "0.5519557", "0.5513761", "0.55093807", "0.5507539", "0.550377", "0.55009097", "0.5500906", "0.5499203", "0.54891145", "0.5482632", "0.54729867", "0.5471584" ]
0.0
-1
This method is used to add new users to the LoginDetails file without overwitting the contents of the file
public static void writeUserFile(String fileToWriteTo, String info) throws IOException { FileWriter write = new FileWriter(fileToWriteTo, true); write.write(info); write.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToFile(User newUser){\r\n //If the user name is not already in the file then we do not want to re-add the user.\r\n if (f.searchForUsername(newUser.getUsername()) == -1) {\r\n newUser.setPassword(encrypt(newUser.getPassword()));\r\n f.write(newUser);\r\n } else {\r\n System.err.println(\"User already exists\");\r\n }\r\n }", "public void userSettings(String userName, String password, File nameFile,File passFile, String fileadd) {\n try\n {\n \n if(!nameFile.exists())\n {\n nameFile.createNewFile();\n }\n if(!passFile.exists())\n {\n passFile.createNewFile();\n }\n \n FileReader ufr = new FileReader(nameFile);\n FileReader pfr = new FileReader(passFile);\n \n BufferedReader ubr = new BufferedReader(ufr);\n BufferedReader pbr = new BufferedReader(pfr);\n \n ArrayList<String> uName = new ArrayList<>();\n ArrayList<String> uPass = new ArrayList<>();\n for (int i = 0; i < lineNum(fileadd); i++) {\n uName.add(ubr.readLine());\n uPass.add(pbr.readLine());\n }\n for (int i = 0; i < lineNum(fileadd); i++) \n {\n if (userName.equals(uName.get(i)))\n {\n uPass.set(i, password);\n } \n }\n \n ufr.close();\n pfr.close();\n FileWriter fw = new FileWriter(passFile);\n PrintWriter pw = new PrintWriter(fw);\n pw.print(\"\");\n \n FileWriter fw2 = new FileWriter(passFile, true);\n PrintWriter pw2 = new PrintWriter(fw2, true);\n \n for (int j = 0; j < uPass.size() -1; j++)\n {\n \n pw.print(uPass.get(j));\n pw.println();\n \n }\n pw.close();\n }catch(Exception e)\n {\n e.printStackTrace();\n }\n \n }", "private void readFileToUser(String fileName){\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\t// FileReader reads text files in the default encoding.\r\n\t\t\tFileReader fileReader = \r\n\t\t\t\t\tnew FileReader(fileName);\r\n\r\n\t\t\t// Always wrap FileReader in BufferedReader.\r\n\t\t\tBufferedReader bufferedReader = \r\n\t\t\t\t\tnew BufferedReader(fileReader);\r\n\r\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\tString[] split = line.split(\",\", 3);\r\n\t\t\t\tString username = split[0];\r\n\t\t\t\tString password = split[1];\r\n\t\t\t\tString user = split[2];\r\n\t\t\t\tusers.add(new User(username,password,user));\r\n\r\n\t\t\t} \r\n\t\t\tbufferedReader.close(); \r\n\t\t}\r\n\t\tcatch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Unable to open file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t\tcatch(IOException ex) {\r\n\t\t\tSystem.out.println(\"Error reading file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t}", "private void setUserAccount() throws FileNotFoundException\r\n\t{\r\n\t\tint index = 0;\r\n\t\tFile inputFile = new File(\"UserAccount.txt\");\r\n\t\tScanner input = new Scanner(inputFile);\r\n\t\tif (!inputFile.exists())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The text file \\\"UserAccount.txt\\\" is missing\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\twhile(input.hasNextLine())\r\n\t\t{\r\n\t\t\tuserAccounts[0][index] = input.nextLine();\t\t\t//stores the username\r\n\t\t\tuserAccounts[1][index] = input.nextLine();\t\t\t//stores the password\r\n\t\t\tnumOfUsers++;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}", "public void adminLoad() {\n try {\n File file = new File(adminPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n String data = scanner.nextLine();\n String[]userData = data.split(separator);\n AdminAccounts adminAccounts = new AdminAccounts();\n adminAccounts.setUsername(userData[0]);\n adminAccounts.setPassword(userData[1]);\n users.add(adminAccounts);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void addNewClient(String username,String password){\n try(FileWriter fileWriter = new FileWriter(\"ClientsInformation.txt\",true)){\n fileWriter.write(username + \", \" + password + \"\\n\"); // Writes new client information in the database\n usersDataBase.put(username,password); // Updates the map with new client information\n }catch (IOException ioException)\n {\n System.out.println(\"From ClientsInformationManager - \" + ioException.getMessage());\n }\n }", "public void addToFile(String username, String password, int state){\r\n User newUser = new User(username, password, state);\r\n addToFile(newUser);\r\n }", "void addUserInfo(String user, String password) {\r\n if (!userInfo.containsKey(user)) {\r\n userInfo.put(user, password);\r\n } else {\r\n System.out.println(\"User already exist!\");\r\n }\r\n writeToFile(\"Password.bin\", userInfo);\r\n }", "public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void addUser(String filename, String username, String userkey) {\n\t\ttry {\n\t\t\t// Open the user file, create new one if not exists\n\t\t\tFileWriter fileWriterUser = new FileWriter(filename, true);\n\t\t\t// User BufferedWriter to add new line\n\t\t\tBufferedWriter bufferedWriterdUser = new BufferedWriter(fileWriterUser);\n\n\t\t\t// Concatenate user name and key with a space\n\t\t\tbufferedWriterdUser.write(username + \" \" + userkey);\n\t\t\t// One user one line\n\t\t\tbufferedWriterdUser.newLine();\n\n\t\t\t// Always close files.\n\t\t\tbufferedWriterdUser.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + filename + \"'\");\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void registerNewUser(String _login, char[] _password) {\n try {\n File passwordFile = new File(\"passwords.txt\");\n FileWriter fw = new FileWriter(passwordFile, true);\n BufferedWriter bw = new BufferedWriter(fw);\n\n bw.write(_login);\n bw.write(\",\");\n bw.write(_password);\n bw.newLine();\n bw.close();\n fw.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n }\n }", "public void loadAllUsers(String filename) throws Exception {\r\n BufferedReader br = new BufferedReader(new FileReader(filename));\r\n String name;\r\n try {\r\n while ((name = br.readLine()) != null)\r\n addUser(name);\r\n } catch (Exception e) {\r\n throw new Exception(\"Error: File not Readable\");\r\n }\r\n }", "public void importUsers(String filename) throws Exception {\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\twhile(true) {\r\n\t\t\tString line = br.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tbreak;\r\n\t\t\tString[] tokens = line.split(\",\");\r\n\t\t\tString userLastName = tokens[0].trim();\r\n\t\t\tString userFirstName = tokens[1].trim();\r\n\t\t\tString userMiddleName = tokens[2].trim();\t\t\t\r\n\t\t\tString email = tokens[3].trim();\r\n\t\t\tString userName = tokens[4].trim();\r\n\t\t\tString password = tokens[5].trim();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Line:\"+line);\r\n\t\t\tSystem.out.println(\"LastName:\"+userLastName);\r\n\t\t\tSystem.out.println(\"FirstName:\"+userFirstName);\r\n\t\t\tSystem.out.println(\"MiddleName:\"+userMiddleName);\r\n\t\t\tSystem.out.println(\"Email:\"+email);\r\n\t\t\tSystem.out.println(\"UserName:\"+userName);\r\n\t\t\tSystem.out.println(\"Password:\"+password);\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\tuser.setLastName(userLastName);\r\n\t\t\tuser.setFirstName(userFirstName);\r\n\t\t\tuser.setMiddleName(userMiddleName);\r\n\t\t\tuser.setEmailAddress(email);\r\n\t\t\tuser.setUserName(userName);\r\n\t\t\tuser.setPassword(password);\t\t\t\r\n\t\t\tuser.setStatus(UserStatus.ACTIVE);\r\n\t\t\t\r\n\t\t\tem.persist(user);\r\n\t\t}\r\n\t\t\r\n\t\tbr.close();\r\n\t\tfr.close();\r\n\t}", "public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}", "private static void readUserListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"users.json\")) {\n\n\t\t\tJSONArray userListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < userListJSON.size(); i++) {\n\t\t\t\tJSONObject user = (JSONObject) userListJSON.get(i);\n\t\t\t\tString name = (String) user.get(\"name\");\n\t\t\t\tString surname = (String) user.get(\"surname\");\n\t\t\t\tString username = (String) user.get(\"username\");\n\t\t\t\tString password = (String) user.get(\"password\");\n\t\t\t\tString account = (String) user.get(\"account\");\n\n\t\t\t\tif(account.equals(\"employee\")) {\n\t\t\t\t\tMain.userList.add(new Employee(username, name, surname, password));\n\t\t\t\t} else {\n\t\t\t\t\tMain.userList.add(new Customer(username, name, surname, password));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void readUserFile() {\n\t\ttry {\n\t\t\tObjectInputStream readFile = new ObjectInputStream(new FileInputStream(userFile));\n\t\t\tVerify.userList = (ArrayList<User>) readFile.readObject();\n\t\t\treadFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//add contents of file to separate lists\n\t\tfor (int i=0; i<Verify.userList.size(); i++) {\n\t\t\tVerify.userIds.add(Verify.userList.get(i).getUserId());\n\t\t\tVerify.usernames.add(Verify.userList.get(i).getUsername());\n\t\t\tif (Verify.userList.get(i).getAccounts() != null) {\n\t\t\t\tVerify.accountList.addAll(Verify.userList.get(i).getAccounts());\n\t\t\t}\n\t\t\tif (Verify.userList.get(i).getRequests() != null) {\n\t\t\t\tVerify.requestList.addAll(Verify.userList.get(i).getRequests());\t\n\t\t\t}\n\t\t}\n\t\tfor (Account account: Verify.accountList) {\n\t\t\tVerify.accountIds.add(account.getAccountId());\n\t\t}\n\t}", "public static void UserAccounts() throws FileNotFoundException{\n\t\tScanner input = new Scanner(new File(AccountFile));\t\t\t\t//Creats objects and adds to array list.\r\n\t\t\r\n\t\twhile (input.hasNextLine()) {\t\t\t\t\t\t\t\t\t//Loops as long as there is another line\r\n\t\t\t\r\n\t\t\tString line = input.nextLine();\r\n\t\t\tif(line.equals(\"ADMIN\")) {\t\t\t\t\t\t\t\t\t//Checks if the data is for Admin, creats admin object\r\n\t\t\t\tString AdminUsername = input.nextLine();\r\n\t\t\t\tString AdminPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tAdmin admin = new Admin(AdminUsername, AdminPassword);\r\n\t\t\t\taccounts.add(admin);\r\n\t\t\t\t\r\n\t\t\t} if(line.equals(\"COORDINATOR\")){\r\n\t\t\t\tString coordinatorUsername = input.nextLine();\r\n\t\t\t\tString coordinatorPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tCoordinator coordinator = new Coordinator(coordinatorUsername, coordinatorPassword);\r\n\t\t\t\taccounts.add(coordinator);\r\n\r\n\t\t\t} if(line.equals(\"APPROVER\")){\r\n\t\t\t\tString approverUsername = input.nextLine();\r\n\t\t\t\tString approverPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tApprover approver = new Approver(approverUsername, approverPassword);\r\n\t\t\t\taccounts.add(approver);\r\n\r\n\t\t\t} if(line.equals(\"CASUAL\")){\r\n\t\t\t\tString casualUsername = input.nextLine();\r\n\t\t\t\tString casualPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tCasualStaff casual = new CasualStaff(casualUsername, casualPassword);\r\n\t\t\t\taccounts.add(casual);\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} loginSystem();\r\n\t}", "public static void createOrOpenUsersFile() {\n try {\r\n File usersFile = new File(\"users.txt\");\r\n if (usersFile.createNewFile()) {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" has been created.\");\r\n } else {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" is ready.\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "private void loadUsers() throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileInputStream fileInputStream = new FileInputStream(accounts);\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));\n\n for (String line = bufferedReader.readLine(); line != null; line = bufferedReader.readLine()) {\n String[] pair = line.split(\":\");\n userAccounts.put(pair[0], pair[1]);\n }\n }", "public void saveUsers() {\n\t\ttry {\n\t\t\t\n\t\t\tFile xmlFile = new File(\"Users.xml\");\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument document = builder.parse(xmlFile);\n\t\t\tElement users = document.getDocumentElement();\n\t\t\t\n\t\t\tArrayList<Student> u = ManageUsers.getActiveList();\n\t\t\tfor (int i = 0; i < u.size(); i++) {\n\t\t\t\t// Grab the info for a specific student\n\t\t\t\tStudent s = u.get(i);\n\t\t\t\tString fName = s.getFirstName();\n\t\t\t\tString lName = s.getLastName();\n\t\t\t\tint ucid = s.getUcid();\n\t\t\t\tint currentBorrowing = s.getCurrentBorrowing();\n\t\t\t\tboolean isActive = true;\n\t\t\t String username = s.getUsername();\n\t\t\t String password = s.getPassword();\n\t\t\t boolean isLibrarian = s.getIsLibrarian();\n\t\t\t \n\t\t\t Element student = document.createElement(\"student\");\n\t\t\t \n\t\t\t // Make a new element <student>\n\t\t\t // Add the element to the xml as a child of <Users>\n\t\t\t // Add the above fields (fName, etc.) as child nodes to the new student node\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Something went wrong with writing to the xml\");\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "private void registerUser() throws FileNotFoundException, IOException\r\n\t{\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tString fname;\r\n\t\tString lname;\r\n\t\tint attempt = 0;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\t//PrintWriter wrapped around a BufferedWriter that is wrapped around a FileWriter\r\n\t\t//used to write on a file\r\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"UserAccount.txt\", true)));\t//true allows appending\r\n\t\t\r\n\t\t//gets user's first and last name\r\n\t\tSystem.out.println(\"Enter your first name: \");\r\n\t\tfname = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name: \");\r\n\t\tlname = input.nextLine();\r\n\t\t\r\n\t\t//gets user's desired username\r\n\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\tusername = input.nextLine();\r\n\t\tattempt++;\r\n\t\twhile (checkUserExists(username) != -1)\t\t//username already exists\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nThat username already exists\");\r\n\t\t\tif (attempt == 2)\t\t//generate random username with 8 characters after 2 attempts\r\n\t\t\t{\r\n\t\t\t\tif (lname.length() < 6)\t\t\t\t//if last name has less than six characters\r\n\t\t\t\t\tusername = lname;\r\n\t\t\t\telse\t\t\t\t\t\t\t\t//else if last name has six characters or greater\r\n\t\t\t\t\tusername = lname.substring(0, 6);\r\n\t\t\t\tfor (int i = username.length(); i < 8; i++)\t\t\t//loop runs until username has 8 characters\r\n\t\t\t\t\tusername += random.nextInt(9) + 1;\t\t\t\t//concatenate random number between 0 - 9 to the username\r\n\t\t\t\tSystem.out.println(\"A randomly generated username has been chosen for you.\");\r\n\t\t\t\tSystem.out.println(\"Your username is \" + username);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\t\t\tusername = input.nextLine();\r\n\t\t\t\tattempt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpw.println(username);\r\n\t\tuserAccounts[0][numOfUsers] = username;\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//get user's password\r\n\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\tpassword = input.nextLine();\r\n\t\twhile (password.length() < 8)\t\t\t//continues to loop until pass is at least 8 characters long\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nPassword must be at least eight characters long\");\r\n\t\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\t\tpassword = input.nextLine();\r\n\t\t}\r\n\t\tpw.println(password);\r\n\t\tuserAccounts[1][numOfUsers] = password;\r\n\t\tnumOfUsers++;\r\n\t\tpw.close();\r\n\t}", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "static void loadUser() {\n\t\tScanner inputStream = null; // create object variable\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStream = new Scanner(new File(\"user.txt\"));\n\t\t\tinputStream.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No User Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStream.hasNext()) {\n\n\t\t\t\tString instanceOf = inputStream.next();\n\n\t\t\t\tString readUserName = inputStream.next();\n\t\t\t\tString readPassword = inputStream.next();\n\t\t\t\tString readEmployeeNumber = inputStream.next();\n\t\t\t\tString readName = inputStream.next();\n\t\t\t\tString readPhone = inputStream.next();\n\t\t\t\tString readEmail = inputStream.next();\n\t\t\t\tif (instanceOf.contains(\"*AD*\")) {\n\t\t\t\t\tAdmin a1 = new Admin(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Admin User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CC*\")) {\n\t\t\t\t\tCourseCoordinator a1 = new CourseCoordinator(readUserName, readPassword, readEmployeeNumber,\n\t\t\t\t\t\t\treadName, readPhone, readEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an CC User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*AP*\")) {\n\t\t\t\t\tApproval a1 = new Approval(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Approval User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CA*\")) {\n\t\t\t\t\tCasual a1 = new Casual(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\ta1.setHrly_rate(inputStream.nextInt());\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Casual User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStream.close();\n\t}", "private void loadDataFromFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // load data for new users after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // load data for existing users after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "private void modify() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.set(i,\r\n\t\t\t\t\t\tnew LoginUser(logTxtIp.getText(), logTxtId.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPw.getText(), logTxtSdi.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPort.getText(), dbType.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.toString()));\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tinitTableView();\r\n\r\n\t}", "public void userLogInInfoRead(String filepath2, HashMap<String, EmpInfo> mergeData) {\n String data;\n String[] userLogInInfoToken;\n File userLogInInfoFile = new File(filepath2);\n Scanner scanner = null;\n try {\n scanner = new Scanner(userLogInInfoFile);\n } catch (FileNotFoundException e) {\n out.println(\"file not found\");\n }\n if (scanner != null) {\n while (scanner.hasNextLine()) {\n data = scanner.nextLine();\n userLogInInfoToken = data.split(\",\");\n // store userid in mergeData as a key\n EmpInfo empInfo = new EmpInfo(Integer.parseInt(userLogInInfoToken[0]),\n userLogInInfoToken[1], userLogInInfoToken[2], userLogInInfoToken[3]);\n EmpInfo uRole = mergeData.get(userLogInInfoToken[0]);\n uRole.setUserRole(userLogInInfoToken[3]);\n /* merge data have already 6 key and 6 emp information if new key is equal to old key\n then hash map not put new key and hashmap put userRole at old key,hashmap allowed only unique kay*/\n mergeData.put(userLogInInfoToken[0], uRole);\n // all employee log in information add in arraylist for printing information\n userLogInInfo.add(empInfo);\n }\n }\n }", "public void adduserFile(Usuari usuari) throws FileNotFoundException, IOException{\r\n FileWriter fw = new FileWriter(fitxerUsuaris, true);\r\n \r\n fw.write(usuari.getDni());\r\n fw.write(usuari.getNom());\r\n fw.write(usuari.getCognom1());\r\n fw.write(usuari.getCognom2());\r\n fw.write(usuari.getPassword());\r\n \r\n fw.close();\r\n }", "private List<User> readFromFile() {\n\n List<String> lines = new ArrayList<>();\n List<User> contactList = new ArrayList<>();\n Map<String, PhoneNumber> phoneNumbersNewUser = new HashMap<>();\n\n try (BufferedReader in = new BufferedReader(new FileReader(contactsFile))) {\n String line;\n while ((line = in.readLine()) != null) {\n lines.add(line);\n }\n\n } catch (IOException ex) {\n System.out.println(\"File not found \\n\" + ex);\n ;\n }\n\n for (String line : lines) {\n String[] userProperties = line.split(\"\\\\|\");\n\n int id = Integer.parseInt(userProperties[0]);\n String fName = userProperties[1];\n String lName = userProperties[2];\n String email = userProperties[3];\n int age = Integer.parseInt(userProperties[4]);\n String[] phones = userProperties[5].split(\"\\\\,\");\n String[] homePhone = phones[0].split(\"\\\\_\");\n String[] mobilePhone = phones[1].split(\"\\\\_\");\n String[] workPhone = phones[2].split(\"\\\\_\");\n phoneNumbersNewUser.put(homePhone[0], new PhoneNumber(homePhone[1], homePhone[2]));\n phoneNumbersNewUser.put(mobilePhone[0], new PhoneNumber(mobilePhone[1], mobilePhone[2]));\n phoneNumbersNewUser.put(workPhone[0], new PhoneNumber(workPhone[1], workPhone[2]));\n String[] homeAdress = userProperties[6].split(\"\\\\,\");\n Address homeAdressNewUser = new Address(homeAdress[0], Integer.parseInt(homeAdress[1]), Integer.parseInt(homeAdress[2]),\n homeAdress[3], homeAdress[4], homeAdress[5], homeAdress[6]);\n String title = userProperties[7];\n String[] companyProperties = userProperties[8].split(\"\\\\_\");\n String[] companyAddress = companyProperties[1].split(\"\\\\,\");\n Address companyAddressNewUser = new Address(companyAddress[0], Integer.parseInt(companyAddress[1]),\n Integer.parseInt(companyAddress[2]), companyAddress[3], companyAddress[4], companyAddress[5],\n companyAddress[6]);\n String companyName = companyProperties[0];\n Company companyNewUser = new Company(companyName, companyAddressNewUser);\n boolean isFav = Boolean.parseBoolean(userProperties[9]);\n User user = new User(id, fName, lName, email, age, phoneNumbersNewUser, homeAdressNewUser, title, companyNewUser, isFav);\n contactList.add(user);\n }\n\n\n return contactList;\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "public static void createUsername(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeeUsername = \"\";\n\t\tdo {\n\t\t\temployeeUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (!newEmp.setUsername(employeeUsername)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong employee name, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeeUsername));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/username.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeeUsername + \", \");\n\t\toutputFile.close();\n\t}", "public void createUser(List<User> list) {\n\n Gson gson = new Gson();\n FileService writerService = new FileService();\n for (User user : list) {\n String userData = gson.toJson(user);\n writerService.writeToUserData(userData);\n }\n\n }", "public static void writeTo(String filename, List<User> users){\r\n\t\tPrintWriter pw=null;\r\n\t\ttry{\r\n\t\t\tpw=new PrintWriter(new FileOutputStream(new File(filename),false));//false because don't append,\r\n\t\t\tfor(User user : users){//it replaces all with new updated data\r\n\t\t\t\tpw.write(user+\"\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tpw.close();\r\n\t\t}\r\n\t}", "public static boolean addNewLogin(String username, String password) {\n\t\tif (users.getEntry(\"salt\", \"username\", username) != null)\n\t\t\treturn false;\n\n\t\tint bits = 256;\n\n\t\t// generate a random salt\n\t\tBigInteger lowerBound = new BigInteger(2).pow(bits - 1);\n\n\t\tBigInteger upperBound = new BigInteger(2).pow(bits);\n\n\t\tBigInteger rand = BigInteger.randomBigInteger(upperBound.subtract(lowerBound)).add(lowerBound);\n\n\t\tString salt = rand.toString(16);\n\n\t\t// generate the hash for the password given the salt\n\t\tbyte[] binary = hashPassword(password.toCharArray(), DatatypeConverter.parseHexBinary(salt), 10, 256);\n\n\t\tString hexBinary = DatatypeConverter.printHexBinary(binary);\n\n\t\t// save the values to the csv file\n\t\tString entry = String.format(\"%s, %s, %s\", username, salt, hexBinary);\n\n\t\tchar[] entryArray = entry.toCharArray();\n\t\tuserFile.writeChar('\\r');\n\t\tuserFile.writeChar('\\n');\n\t\tfor (char character : entryArray) {\n\t\t\tuserFile.writeChar(character);\n\t\t}\n\n\t\tusers.refreshData();\n\t\t\n\t\t// save the file back to the drive\n\t\ttry {\n\t\t\tuserFile.save(new File(FileLocations.getUserLoginFile()));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn true;\n\t}", "public void newUserDirectory() {\n\t\tusers = new LinkedAbstractList<User>(100);\n\t}", "public void saveUsers() {\n FileWriter fileWriter = null;\n PrintWriter printWriter = null;\n try {\n fileWriter = new FileWriter(pathData);\n printWriter = new PrintWriter(fileWriter);\n if (users != null) {\n \n for (Map.Entry m : users.entrySet()) {\n printWriter.println(m.getKey() + spChar + m.getValue() + \"\\n\");\n }\n }\n printWriter.close();\n } catch (IOException e) {\n }\n }", "public void addUser(User user) {\n users.add(new User(user.getUsername(), Hash.md5(user.getPassword())));\n // Naively dump the whole users list to file\n reader.dumpToFile(users);\n }", "public void writeUsers() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/users.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(users);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public void addUser(String username, String password, String balance) throws IOException {\r\n // create a new user\r\n User user = new User(username, password, balance);\r\n // add new user to arraylist\r\n this.users.add(user);\r\n // write the new user to the text file\r\n this.userInfo.writeToFile(this.users.get(this.users.size() - 1).getUsername(), this.users.get(this.users.size() - 1).getPassword(password), this.users.get(this.users.size() - 1).getBalance());\r\n }", "public static void writeUserFile(List<User> List) {\n\t\ttry {\n\t\t\tObjectOutputStream writeFile = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\t\twriteFile.writeObject(List);\n\t\t\twriteFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void StoreUsers(ArrayList<User> usersList) {\r\n\t\ttry {\r\n\t\t\tfw = new FileWriter(\".\\\\data\\\\users.txt\"); // writes data into\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \\\\data\\\\books.txt\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tfor (int i = 0; i < usersList.size(); i++) { // for loop will run\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// till\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the size of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// list usersList\r\n\t\t\t\tString content = \"\"; // Content is declared as String\r\n\t\t\t\tUser user = usersList.get(i); // Gets content of the array list\r\n\t\t\t\tcontent += user.getId() + \"::\"; // Gets ID of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getName() + \"::\"; // Gets Name of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getNumBooksBorrowed() + \"::\"; // Gets Number of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Books\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Borrowed of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and adds ::\r\n\t\t\t\tcontent += user.getPhone() + \"::\"; // Gets Phone Number of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Member and adds ::\r\n\t\t\t\tcontent += user.getreturndate() + \"\\n\"; // Gets Return Date of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\r\n\t\t\t\tbw.write(content); // writes the content of the Members in the\r\n\t\t\t\t\t\t\t\t\t// text file\r\n\r\n\t\t\t}\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Complete storing all users!\", \"Store Users\",\r\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE); // confirms with a message that\r\n\t\t\t\t\t\t\t\t\t\t\t\t// the Members are stored\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null)\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\tif (fw != null)\r\n\t\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "public static void createPassword(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeePassword = \"\";\n\t\tdo {\n\t\t\temployeePassword = JOptionPane.showInputDialog(\"Please enter a password.\");\n\t\t\tif (!newEmp.setUsername(employeePassword)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong password, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeePassword + \", \"));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/password.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeePassword + \", \");\n\t\toutputFile.close();\n\t}", "public void loadUsers() {\n CustomUser userOne = new CustomUser();\n userOne.setUsername(SpringJPABootstrap.MWESTON);\n userOne.setPassword(SpringJPABootstrap.PASSWORD);\n\n CustomUser userTwo = new CustomUser();\n userTwo.setUsername(SpringJPABootstrap.TEST_ACCOUNT_USER_NAME);\n userTwo.setPassword(SpringJPABootstrap.TEST_ACCOUNT_PASSWORD);\n\n String firstUserName = userOne.getUsername();\n\n /*\n * for now I am not checking for a second user because there is no delete method being\n * used so if the first user is created the second user is expected to be created. this\n * could cause a bug later on but I will add in more logic if that is the case in a\n * future build.\n */\n if(userService.isUserNameTaken(firstUserName)) {\n log.debug(firstUserName + \" is already taken\");\n return ;\n }\n userService.save(userOne);\n userService.save(userTwo);\n\n log.debug(\"Test user accounts have been loaded!\");\n }", "public void load(String fileName) throws IOException{\n\t\tFileInputStream fileIn=null;\n\t try {\n\t\t\tfileIn = new FileInputStream(fileName);\n\t\t\tArrayList<User1> userList; // = new ArrayList<User1>();\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t// Tramite la funzione readValue riottengo la lista degli utenti a partire dalla stringa con codifica JSON\n\t\t\t//userList = mapper.readValue(fileIn, new TypeReference<ArrayList<User1>>());\n\t\t\tUser1[] array = mapper.readValue(fileIn, User1[].class);\n\t\t\tuserList=new ArrayList<>(Arrays.asList(array));\n\t\t\tfor(User1 userWrapped : userList) // Per ogni utente nella lista, riottengo l'oggetto User, andando a ripopolare il Realm (ripristino)\n\t\t\t{\n\t\t\t\tUser user = new User(userWrapped.getIdentifier(), userWrapped.getSecret());\n\t\t\t\trealm.getUsers().add(user); // Aggiungo l'utente alla lista\n\t\t\t}\n\t\t\tfileIn.close();\n\t\t} catch (IOException e){\n\t\t\tif(fileIn!=null)fileIn.close();\n\t \tthrow e;\n\t\t}\n\n\t}", "@Override\n public boolean addUserPersonalInfo(String text) \n {\n \n User tmp = this.getLoggedUser();\n tmp.setPersonal_details(text);\n if(this.setLoggedUser(tmp)) System.out.print(\"done\");\n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO user_personal_information (user_id,information) VALUES ( \" + this.getLoggedUser().getId() + \" , '\" + text + \"')\";\n \n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n \n }", "public void add(String fullName, String username, String password, String accType, String email, String salary){\n\t\t\n\t\t// Determine position where new User needs to be added\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\t// Check if the list contains only the head\n\t\tif(marker.getNext()!= null){\n\t\tmarker = marker.getNext();\t\t\t\t\t\t\t\t\t/* ====> If not then skip the head */\n\t\t}\n\t\t\n\t\t\n\t\t/*Iterate through the whole list and compare Strings. Move the marker until it reaches the end or until the input\n\t\t * username is greater than the marker's username . */\n\t\twhile((marker.getNext() != null) && (username.compareTo(marker.getUsername())>0)){\n\t\t\t\t\tmarker = marker.getNext();\n\t\t\t\t}\t\t\n\t\t\n\t\t/* When marker finds a user whose username is greater than the input it moves the marker back a position so that the new\n\t\t * user can be appended to that marker */\n\t\tif(marker.getPrev() != null){\n\t\t\t\tif(username.compareTo(marker.getUsername())<0){\n\t\t\t\t\tmarker = marker.getPrev();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Create new user with the method's parameters as properties. Append it to the marker\n\t\tUser newUser = new User(marker.getNext(), marker);\n\t\tnewUser.setFullName(fullName);\n\t\tnewUser.setUsername(username);\n\t\tnewUser.setPassword(password);\n\t\tnewUser.setAccType(accType);\n\t\tnewUser.setEmail(email);\n\t\tnewUser.setSalary(salary);\n\t\t\n\t\t// Set connections to the new User\n\t\tnewUser.getPrev().setNext(newUser);\n\t\tif(newUser.getNext() != null){\n\t\tnewUser.getNext().setPrev(newUser);\n\t\t}\n\n\t}", "protected void saveUserAccounts(List<UserInfo> userList) throws RepositoryException {\n RepositoryFileManager fileManager = repositoryManager.getFileManager();\n boolean success = false;\n fileManager.startChangeSet();\n\n try {\n File usersFile = new File( fileManager.getRepositoryLocation(), REPOSITORY_USERS_FILE );\n RepositoryUsers repoUsers = new RepositoryUsers();\n Marshaller marshaller = jaxbContext.createMarshaller();\n\n repoUsers.getUser().addAll( userList );\n fileManager.addToChangeSet( usersFile );\n\n marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, true );\n marshaller.setProperty( \"com.sun.xml.bind.namespacePrefixMapper\", new NamespacePrefixMapper() {\n public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {\n return REPOSITORY_EXT_NAMESPACE.equals( namespaceUri ) ? \"r\" : suggestion;\n }\n\n @Override\n public String[] getPreDeclaredNamespaceUris() {\n return new String[] {REPOSITORY_EXT_NAMESPACE};\n }\n } );\n marshaller.setSchema( validationSchema );\n marshaller.marshal( objectFactory.createRepositoryUsers( repoUsers ), usersFile );\n\n fileManager.commitChangeSet();\n userFileLastModified = -1;\n success = true;\n\n } catch (JAXBException e) {\n throw new RepositoryException( \"Error committing user updates to file system.\", e );\n\n } finally {\n try {\n if (!success) {\n fileManager.rollbackChangeSet();\n }\n } catch (Exception e) {\n // Ignore error and continue\n }\n }\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n // check for correct usage\n if (args.length < 1) {\n System.out.println(\"usage: java Vault [-au] <filename>\");\n System.exit(1);\n }\n\n // check for au option\n boolean addUser = false;\n if (args.length == 2)\n addUser = true;\n\n // open the file, or print error and exit\n Scanner sc = null;\n try {\n sc = new Scanner(new FileReader((addUser ? args[1] : args[0])));\n }catch (IOException e) {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' could not be opened.\");\n System.exit(2);\n }\n \n // read each line of the file, storing each user in users\n ArrayList<User> users = new ArrayList<User>();\n while (sc.hasNextLine()) {\n String[] line = sc.nextLine().split(\" \");\n \n if (line.length == 4 && line[0].equals(\"user\")) {\n users.add(new User(line[1], line[2], line[3]));\n\n }else if (line.length == 4 && line[0].equals(\"data\")) {\n for (int i = 0; i < users.size(); i++) {\n if (users.get(i).getName().equals(line[1]))\n users.get(i).addDatum(line[2], line[3]);\n }\n\n }else {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' improperly formatted.\");\n System.exit(3);\n }\n\n }\n //close read file\n sc.close();\n\n // ask user for username and password\n System.out.print(\"username: \");\n String name = System.console().readLine();\n System.out.print(\"password: \");\n char[] password = System.console().readPassword();\n\n // if au option, collect info and add to file, then quit\n if (addUser) {\n PrintWriter pw = null;\n try {\n pw = new PrintWriter(new File(args[1]));\n } catch (FileNotFoundException fnfe) {\n fnfe.printStackTrace();\n System.exit(6);\n }\n\n System.out.print(\"Hash algorithm: \");\n String hashAlg = System.console().readLine();\n\n // perform checks and hash password\n for (char c : password) {\n if ((int)c < 42 || (int)c > 122) {\n System.out.println(\"Error! Invalid symbol '\" + c + \"' in password.\");\n System.exit(7);\n }\n }\n Hasher hasher = null;\n String passhash = null;\n if (hashAlg.equals(\"clear\")) {\n hasher = new Clear();\n }else if (hashAlg.equals(\"shift+caesar\")) {\n hasher = new Caesar();\n }else if (hashAlg.equals(\"shift+vigenere\")) {\n hasher = new Vigenere();\n }else {\n System.out.println(\"Error! Hash algorithm '\" + hashAlg + \"' not supported.\");\n System.exit(8);\n }\n passhash = hasher.hash(password);\n for (User u : users) {\n if (u.getName().equals(name)) {\n System.out.print(\"Error! Username '\" + name + \"' already in use.\");\n System.exit(9);\n }\n }\n \n users.add(new User(name, hashAlg, passhash));\n for (User u : users) {\n pw.println(String.join(\" \", \"user\", u.getName(), u.getHashAlg(), u.getHash()));\n }\n\n pw.close();\n System.exit(0);\n }\n\n // determine access, exit if denied\n boolean access = false;\n User curr = null;\n for (User u : users) {\n if (u.getName().equals(name)) {\n try {\n if (u.validate(password)) {\n System.out.println(\"Access granted!\");\n access = true;\n curr = u;\n }\n break;\n }catch (UnsupportedHashException e) {\n System.out.println(\"Error! Hash algorithm '\" + u.getHashAlg() + \n \"' not supported.\");\n System.exit(4);\n }\n }\n }\n if (!access) {\n System.out.println(\"Access denied!\");\n System.exit(5);\n }\n\n // if granted access, open prompt for commands\n System.out.print(\"> \");\n sc = new Scanner(System.in);\n String cmd = null;\n ArrayList<Datum> data = curr.getData();\n while (!(cmd = sc.next()).equals(\"quit\")) {\n switch(cmd) {\n case \"labels\": for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n System.out.println(plain.split(\"_\")[0]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" +\n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break;\n\n case \"get\": cmd = sc.next();\n for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n if (plain.split(\"_\", 2)[0].equals(cmd))\n System.out.println(plain.split(\"_\", 2)[1]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" + \n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break; \n\n default: System.out.println(\"Unknown command '\" + cmd + \"'.\");\n break;\n }\n System.out.print(\"> \");\n\n }\n\n \n\n }", "void addNewAccountToFile(Account newAccount);", "public void addUserCredentials(String login, String password) throws SQLException;", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "void addUserpan(String userid,String username,String userpwd);", "private final void loadDefaultUsers() throws Exception {\r\n // Get the default User definitions from the XML defaults file. \r\n File defaultsFile = findDefaultsFile();\r\n // Add these users to the database if we've found a default file. \r\n if (defaultsFile.exists()) {\r\n server.getLogger().info(\"Loading User defaults from \" + defaultsFile.getPath()); \r\n Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();\r\n Users users = (Users) unmarshaller.unmarshal(defaultsFile);\r\n for (User user : users.getUser()) {\r\n user.setLastMod(Tstamp.makeTimestamp());\r\n this.dbManager.storeUser(user, this.makeUser(user), this.makeUserRefString(user));\r\n }\r\n }\r\n }", "@Override\n\tpublic void addUsers(Session session){\n\t\ttry{\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\n\t\t\tSystem.out.print(\"+++++++++++Add Customer/Admin here+++++++++++\\n\");\n\n\t\t\tSystem.out.println(\"Enter 'Admin' to add a new admin to database\");\n\t\t\tSystem.out.println(\"Enter 'Customer' to add a new admin to database\");\n\t\t\tSystem.out.println(\"--------------Enter one from above------------------\");\n\t\t\tString accType = scanner.nextLine();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter First Name:\");\n\t\t\tString firstName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Last Name:\");\n\t\t\tString lastName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter UserId:\");\n\t\t\tString inputLoginId = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Password:\");\n\t\t\tString inputLoginPwd = scanner.nextLine();\n\n\t\t\t//pass these input fields to client controller\n\t\t\tsamp=mvc.addUsers(session,accType,firstName,lastName,inputLoginId,inputLoginPwd);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Users Exception: \" +e.getMessage());\n\t\t}\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "@Override\n public void updateUserJson() {\n synchronized (lockUpdateUserJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Users.json\")) {\n ArrayList<User> userAsArray = new ArrayList<>();\n for (Map.Entry<String, User> entry : mapOfRegisteredUsersByUsername.entrySet()) {\n userAsArray.add(entry.getValue());\n }\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"users\", writer.toJsonTree(userAsArray));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "public void addUser(String fullName,String loginName,String password,boolean isAdmin) throws IOException {\n userManager.addUser(fullName, loginName, password, isAdmin);\n userManager.emptyLists();\n userManager.fillLists();\n AdminMainViewController.emptyStaticLists();\n AdminMainViewController.adminsObservableList.addAll(userManager.getAdminsList());\n AdminMainViewController.usersObservableList.addAll(userManager.getUsersList());\n }", "public void writeUserRegister(int id, String username, String password, boolean isNotified, String county) {\n try {\n JSONObject obj = (JSONObject) jsonParser.parse(new FileReader(file.getPath()));\n\n JSONObject newRegister = new JSONObject();\n\n JSONArray registerlist = (JSONArray) obj.get(\"Registry\");\n\n newRegister.put(\"id\", id);\n newRegister.put(\"name\", username);\n newRegister.put(\"password\", password);\n newRegister.put(\"county\", county);\n newRegister.put(\"isInfected\", false);\n newRegister.put(\"isNotified\", isNotified);\n\n registerlist.add(newRegister);\n\n JSONArray countyList = (JSONArray) obj.get(\"Counties\");\n JSONArray unregisteredUsers = (JSONArray) obj.get(\"UnregisteredUsers\");\n\n JSONObject objWrite = new JSONObject();\n\n objWrite.put(\"UnregisteredUsers\", unregisteredUsers);\n objWrite.put(\"Registry\", registerlist);\n objWrite.put(\"Counties\", countyList);\n\n FileWriter fileWriter = new FileWriter(file.getPath());\n\n fileWriter.write(objWrite.toJSONString());\n\n fileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public static void writeData(List<User> users) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = new FileOutputStream(USER_SAVE_FILE_NAME, false);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(users);\n oos.close();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n if (fos != null && oos != null) {\n try {\n oos.close();\n fos.close();\n } catch (Exception ex) {\n Logger.getLogger(Utilities.UserDataIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n\n }\n }\n }", "@Override\n public void save(String fileName){\n FileWriter addEmployeeDetails = null;\n\n try{\n addEmployeeDetails = new FileWriter(fileName,true);\n addEmployeeDetails.append(getUsername());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPassword());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getFirstname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getLastname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(DMY.format(getDoB()));//format,convert,save\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getContactNumber());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getEmail());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(String.valueOf(getSalary()));\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPositionStatus());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n //************Saves the address in the file.****************\n homeAddress.save(addEmployeeDetails);\n //**********************************************************\n addEmployeeDetails.append(\"$$$\");\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.close();\n addEmployeeDetails = null;\n\n }//end try\n catch (IOException ioe){}//end catch\n }", "public static void signIn(Login [] newLogin, Employee[] employee) {\n\t\tString myUsername = \"\";\n\t\tdo {\n\t\t\tmyUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (myUsername.length() == 0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid username, please try again.\");\n\t\t\t}\n\t\t} while (myUsername.length() == 0);\n\t\tScanner validateUsername;\n\t\ttry {\n\t\t\tvalidateUsername = new Scanner(new FileInputStream(\"./src/Phase5/username.txt\"));\n\t\t\twhile (validateUsername.hasNextLine()) {\n\t\t\t\tString copy = validateUsername.nextLine();\n\t\t\t\tif (copy.contains(myUsername + \",\")) {\n\n\t\t\t\t\tString myPassword = \"\";\n\t\t\t\t\tdo {\n\t\t\t\t\t\tmyPassword = JOptionPane.showInputDialog(\"Please enter a password.\");\n\t\t\t\t\t\tif (myPassword.length() == 0) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid password, please try again.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (myPassword.length() == 0);\n\t\t\t\t\tScanner validatePassword;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvalidatePassword = new Scanner(new FileInputStream(\"./src/Phase5/password.txt\"));\n\t\t\t\t\t\twhile (validatePassword.hasNextLine()) {\n\t\t\t\t\t\t\tString passwordCopy = validatePassword.nextLine();\n\t\t\t\t\t\t\tif (passwordCopy.contains(myPassword + \",\")) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Welcome\");\n\t\t\t\t\t\t\t\twork(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Password not found, try again.\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File not found\");\n\t\t\t\t\t}\t\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Username not found, try again.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\");\n\t\t}\n\n\t}", "public void addLoginRecord(String username, String password, String phoneNumber) throws ClirNetAppException {\n SQLiteDatabase db = this.getWritableDatabase();\n try {\n ContentValues contentValue = new ContentValues();\n\n contentValue.put(KEY_NAME, username);\n contentValue.put(KEY_PASSWORD, password);\n contentValue.put(PHONE_NUMBER, phoneNumber);\n\n // Inserting Row\n db.delete(TABLE_USER, null, null);\n db.insert(TABLE_USER, null, contentValue);\n } catch (Exception e) {\n throw new ClirNetAppException(\"Error inserting data\");\n } finally {\n if (db != null) {\n db.close(); // Closing database connection\n }\n }\n\n }", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "public void saveUser(User user) {\n\t\tFile d = new File(\"users\");\n\t\t\n\t\tif (!d.exists() || !d.isDirectory()) {\n\t\t\td.mkdir();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\t//Document document = builder.parse(f);\n\t\t\t\n\t\t\tDocument document = builder.newDocument();\n\t\t\t\n\t\t\tElement root = document.createElement(\"User\");\n\t\t\tdocument.appendChild(root);\n\t\t\t\n\t\t\troot.setAttribute(\"username\", user.name);\n\t\t\troot.setAttribute(\"password\", user.password);\n\t\t\t\n\t\t\t//System.out.println(\"Save: \" + user.password);\n\t\t\t\n\t\t\tIterator i = user.record.entrySet().iterator();\n\t\t\t\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tMap.Entry u = (Map.Entry)i.next();\n\t\t\t\tString name = (String)u.getKey();\n\t\t\t\tString record = (String)u.getValue();\n\n\t\t\t\tElement precord = document.createElement(\"Record\");\n\t\t\t\t\n\t\t\t\tprecord.setAttribute(\"username\", name);\n\t\t\t\tprecord.setTextContent(record);\n\t\t\t\troot.appendChild(precord);\n\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory tfactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = tfactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(document);\n\t\t\tStreamResult result = new StreamResult(new File(\"users/\" + user.name + \".xml\"));\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadUsersFromFile(String fileName) {\n\t\ttry {\n\t\t\tusers = UserRecordIO.readUserRecords(fileName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to read file \" + fileName);\n\t\t}\n\t}", "public void create_loginFile(String account){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.LOGIN_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(account+\" logged in,\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "private static ArrayList<User> loadInitialData(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t// From the users list get all the user names\n\t\tfor (String username:Utils.FileUtils.getFileLines(Global.Constants.LIST_OF_USERS)){ // refers \"users\" file\n\t\t\tArrayList<Directory> directories = new ArrayList<Directory>();\n\t\t\t// For a user name, read the names of directories registered\n\t\t\t// Note: All directory names are provided in the file bearing user name\n\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION + username)) { // refers to a specific user file \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // that has directories\n\t\t\t\tfor (String dir:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username)) {\n\t\t\t\t\tArrayList<String> documents = new ArrayList<String>();\n\t\t\t\t\t// For each directory, read names of files saved\n\t\t\t\t\t// Note: All file names are provided in the file bearing username$dirname\n\t\t\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION, username + \"$\" + dir)) {\n\t\t\t\t\t\tfor (String doc:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username + \"$\" + dir)) {\n\t\t\t\t\t\t\tdocuments.add(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectories.add(new Directory(dir, documents));\n\t\t\t\t}\n\t\t\t}\n\t\t\tusers.add(new User(username, directories));\n\t\t}\n\t\treturn users;\n\t}", "public static void addAccount(String user, String password)\r\n\t\t\tthrows IOException {\n\r\n\t\tFile file = getAccountFile();\r\n\r\n\t\tFileWriter fw = new FileWriter(file, true);\r\n\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(user);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(password);\r\n\r\n\t\twriter.close();\r\n\t\tfw.close();\r\n\t\tfile = null;\r\n\t}", "public void newEntry(String file, User user) {\r\n TableEntry entry = new TableEntry();\r\n entry.fileName = file;\r\n entry.userName = user.getName();\r\n entry.date = DateUtils.getISO8601Date(System.currentTimeMillis());\r\n \r\n int sz = m_entries.size();\r\n if ( (MAX_SIZE > 0) && (sz >= MAX_SIZE) ) {\r\n clear();\r\n sz = 0;\r\n }\r\n \r\n synchronized(m_entries) {\r\n m_entries.add(entry);\r\n ++sz;\r\n }\r\n fireTableRowsInserted(sz, sz);\r\n }", "public void addData(String User, String password) throws SQLException\n {\n }", "public static void writePasswdFile (Map<String, String> users, File dst) throws Exception{\n\t\tStringBuffer s = new StringBuffer(\"# Passwords for edu.ucar.dls.schemedit.security.login.FileLogin\");\n\t\tfor (String username : users.keySet() ) {\n\t\t\tString password = users.get(username);\n\t\t\tString passwdFileEntry = username + \":\" + Encrypter.encryptBaseSHA164(password);\n\t\t\ts.append(\"\\n\" + passwdFileEntry);\n\t\t}\n\t\tprtln(\"writing \" + users.size() + \" users to \" + dst);\n\t\t\n\t\tFiles.writeFile(s + \"\\n\", dst);\n\t\t// prtln (s.toString());\n\t}", "public void writeData(UserInfo info)\n\t{\n\t\tSystem.out.println(\"file has been written!\");\n\t\tuserinfos.add(info);\n\t}", "public void addBase(String baseIdentifier, String fileName, String user, String password) {\n bases.put(baseIdentifier, fileName);\r\n NeoDatisConfig config2 = config.copy();\r\n\r\n config2.setIsLocal(false);\r\n if(user != null && password != null) {\r\n config2.setUser(user);\r\n config2.setPassword(password);\r\n }\r\n sessionManagers.put(baseIdentifier, new SessionManager(new IOFileParameter(fileName, true, config2)));\r\n if(config2.isInfoEnabled(LOG_ID)) {\r\n DLogger.info(\"ODBServer:Adding base : name=\" + baseIdentifier + \" (file=\" + fileName + \") to server\");\r\n }\r\n }", "protected void reloadUsers() {\r\n\t\tif (smscListener != null) {\r\n\t\t\ttry {\r\n\t\t\t\tif (users != null) {\r\n\t\t\t\t\tusers.reload();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tusers = new Table(usersFileName);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Users file reloaded.\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\tevent.write(e, \"reading users file \" + usersFileName);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tevent.write(e, \"reading users file \" + usersFileName);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}", "private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"[email protected]\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"[email protected]\", 50), new User(\"Sita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"[email protected]\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"[email protected]\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}", "private void saveDataToFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // path for new accounts after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // path for existing accounts after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void writeNewUser(String name,String email,String password) {\n mDatabase.child(\"User\").child(name).child(\"Email\").setValue(email);\n mDatabase.child(\"User\").child(name).child(\"Password\").setValue(password);\n }", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void fillUsers(int totalEntries) {\n\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n storeOperations.createAccount(\"user_\" + i, \"password_\" + i, Fairy.create().person().getFirstName(), Fairy.create().person().getLastName());\n }\n }", "public static boolean addUserIntoFile(DSUser user) {\n\t\tDSUsers dsUsers = getUsersFromFile();\n\t\tboolean addResult = false;\n\t\tif (dsUsers != null) {\n\t\t\taddResult = dsUsers.getUsers().add(user);\n\t\t}\n\t\tboolean emptyResult = emptyFile(USERS_FILE);\n\t\tString json = gson.toJson(dsUsers);\n\t\tboolean writeResult = writeToFile(USERS_FILE, json);\n\n\t\treturn (addResult && emptyResult && writeResult);\n\t}", "@Override\n\tpublic boolean addNewUser() {\n\t\treturn false;\n\t}", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "@Override\n\tpublic User add(String name, String pwd, String phone) {\n\t\tSystem.out.println(\"OracleDao is add\");\n\t\treturn null;\n\t}", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "void addUser() throws NoSuchAlgorithmException\r\n\t{\r\n\t\tSystem.out.print(\"Create a user ID: \");\r\n\t\tString userIDinput = scan.next();\r\n\t\tSystem.out.print(\"Create a password: \");\r\n\t\tmakePassword(userIDinput, scan.next());\r\n\t}", "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "public void addPoint (String user, double point) throws IOException { \r\n this.point = this.point + point; \r\n Owner o = new Owner(user, password);\r\n String lineSplit[];\r\n out = new FileReader(\"Customer.txt\");\r\n BufferedReader read = new BufferedReader(out);\r\n \r\n String line;\r\n String data = \"\";\r\n \r\n while((line = read.readLine()) != null){\r\n lineSplit = null;\r\n lineSplit = line.split(\",\");\r\n userName = lineSplit[0];\r\n password = lineSplit[1];\r\n status = o.changeStatus(this.point);\r\n \r\n if(user.equals(userName)){\r\n data+=userName+\",\"+password+\",\"+status+\",\"+this.point+\"\\r\\n\";\r\n System.out.println(data);\r\n }\r\n else{\r\n data+=line+\"\\r\\n\";\r\n }\r\n }\r\n read.close();\r\n in = new FileWriter(\"Customer.txt\");\r\n in.write(data);\r\n in.close();\r\n }", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public static void serializeUsers(ListOfAllUsers list) throws FileNotFoundException, IOException {\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\toos.writeObject(list);\n\t\toos.close();\n\t\t//System.out.println(\"Serialized.\");\n\t}", "public abstract void saveUserDetails(User user) throws InlogException;" ]
[ "0.72991174", "0.6855459", "0.6586949", "0.6549896", "0.65038306", "0.64913654", "0.6479701", "0.645284", "0.6396378", "0.63917655", "0.63806", "0.63620186", "0.6292061", "0.6242891", "0.6168011", "0.6165869", "0.613007", "0.6119469", "0.6116803", "0.6116371", "0.6113373", "0.60936373", "0.6087758", "0.6015665", "0.5997707", "0.59810394", "0.59703445", "0.5969167", "0.59404355", "0.5935049", "0.592161", "0.5918031", "0.59125537", "0.58982337", "0.58815545", "0.58591247", "0.58424014", "0.58383816", "0.58347183", "0.582984", "0.58058727", "0.5801478", "0.5797809", "0.57948005", "0.57947266", "0.578163", "0.5781057", "0.5761973", "0.57604", "0.5756662", "0.5748453", "0.57420343", "0.57402605", "0.5739067", "0.5736349", "0.57174885", "0.57158107", "0.5700497", "0.5693582", "0.5683377", "0.5678002", "0.5675187", "0.5667591", "0.5660408", "0.56508243", "0.5649384", "0.5643585", "0.56392425", "0.56227297", "0.5620387", "0.56171495", "0.5600111", "0.56000197", "0.55835414", "0.5581018", "0.5579215", "0.5574393", "0.55733824", "0.556623", "0.55657095", "0.55636436", "0.5554892", "0.55530584", "0.55492496", "0.5548459", "0.5542999", "0.5539662", "0.5522398", "0.552113", "0.5519557", "0.5513761", "0.55093807", "0.5507539", "0.550377", "0.55009097", "0.5500906", "0.5499203", "0.54891145", "0.5482632", "0.54729867", "0.5471584" ]
0.0
-1
This method is used to add new users to the LoginDetails file without overwitting the contents of the file
public static void writeFile(String fileToWriteTo, String info) throws IOException { FileWriter write = new FileWriter(fileToWriteTo, true); write.write(info); write.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToFile(User newUser){\r\n //If the user name is not already in the file then we do not want to re-add the user.\r\n if (f.searchForUsername(newUser.getUsername()) == -1) {\r\n newUser.setPassword(encrypt(newUser.getPassword()));\r\n f.write(newUser);\r\n } else {\r\n System.err.println(\"User already exists\");\r\n }\r\n }", "public void userSettings(String userName, String password, File nameFile,File passFile, String fileadd) {\n try\n {\n \n if(!nameFile.exists())\n {\n nameFile.createNewFile();\n }\n if(!passFile.exists())\n {\n passFile.createNewFile();\n }\n \n FileReader ufr = new FileReader(nameFile);\n FileReader pfr = new FileReader(passFile);\n \n BufferedReader ubr = new BufferedReader(ufr);\n BufferedReader pbr = new BufferedReader(pfr);\n \n ArrayList<String> uName = new ArrayList<>();\n ArrayList<String> uPass = new ArrayList<>();\n for (int i = 0; i < lineNum(fileadd); i++) {\n uName.add(ubr.readLine());\n uPass.add(pbr.readLine());\n }\n for (int i = 0; i < lineNum(fileadd); i++) \n {\n if (userName.equals(uName.get(i)))\n {\n uPass.set(i, password);\n } \n }\n \n ufr.close();\n pfr.close();\n FileWriter fw = new FileWriter(passFile);\n PrintWriter pw = new PrintWriter(fw);\n pw.print(\"\");\n \n FileWriter fw2 = new FileWriter(passFile, true);\n PrintWriter pw2 = new PrintWriter(fw2, true);\n \n for (int j = 0; j < uPass.size() -1; j++)\n {\n \n pw.print(uPass.get(j));\n pw.println();\n \n }\n pw.close();\n }catch(Exception e)\n {\n e.printStackTrace();\n }\n \n }", "private void readFileToUser(String fileName){\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\t// FileReader reads text files in the default encoding.\r\n\t\t\tFileReader fileReader = \r\n\t\t\t\t\tnew FileReader(fileName);\r\n\r\n\t\t\t// Always wrap FileReader in BufferedReader.\r\n\t\t\tBufferedReader bufferedReader = \r\n\t\t\t\t\tnew BufferedReader(fileReader);\r\n\r\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\tString[] split = line.split(\",\", 3);\r\n\t\t\t\tString username = split[0];\r\n\t\t\t\tString password = split[1];\r\n\t\t\t\tString user = split[2];\r\n\t\t\t\tusers.add(new User(username,password,user));\r\n\r\n\t\t\t} \r\n\t\t\tbufferedReader.close(); \r\n\t\t}\r\n\t\tcatch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Unable to open file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t\tcatch(IOException ex) {\r\n\t\t\tSystem.out.println(\"Error reading file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t}", "private void setUserAccount() throws FileNotFoundException\r\n\t{\r\n\t\tint index = 0;\r\n\t\tFile inputFile = new File(\"UserAccount.txt\");\r\n\t\tScanner input = new Scanner(inputFile);\r\n\t\tif (!inputFile.exists())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The text file \\\"UserAccount.txt\\\" is missing\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\twhile(input.hasNextLine())\r\n\t\t{\r\n\t\t\tuserAccounts[0][index] = input.nextLine();\t\t\t//stores the username\r\n\t\t\tuserAccounts[1][index] = input.nextLine();\t\t\t//stores the password\r\n\t\t\tnumOfUsers++;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}", "public void adminLoad() {\n try {\n File file = new File(adminPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n String data = scanner.nextLine();\n String[]userData = data.split(separator);\n AdminAccounts adminAccounts = new AdminAccounts();\n adminAccounts.setUsername(userData[0]);\n adminAccounts.setPassword(userData[1]);\n users.add(adminAccounts);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void addNewClient(String username,String password){\n try(FileWriter fileWriter = new FileWriter(\"ClientsInformation.txt\",true)){\n fileWriter.write(username + \", \" + password + \"\\n\"); // Writes new client information in the database\n usersDataBase.put(username,password); // Updates the map with new client information\n }catch (IOException ioException)\n {\n System.out.println(\"From ClientsInformationManager - \" + ioException.getMessage());\n }\n }", "public void addToFile(String username, String password, int state){\r\n User newUser = new User(username, password, state);\r\n addToFile(newUser);\r\n }", "void addUserInfo(String user, String password) {\r\n if (!userInfo.containsKey(user)) {\r\n userInfo.put(user, password);\r\n } else {\r\n System.out.println(\"User already exist!\");\r\n }\r\n writeToFile(\"Password.bin\", userInfo);\r\n }", "public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void addUser(String filename, String username, String userkey) {\n\t\ttry {\n\t\t\t// Open the user file, create new one if not exists\n\t\t\tFileWriter fileWriterUser = new FileWriter(filename, true);\n\t\t\t// User BufferedWriter to add new line\n\t\t\tBufferedWriter bufferedWriterdUser = new BufferedWriter(fileWriterUser);\n\n\t\t\t// Concatenate user name and key with a space\n\t\t\tbufferedWriterdUser.write(username + \" \" + userkey);\n\t\t\t// One user one line\n\t\t\tbufferedWriterdUser.newLine();\n\n\t\t\t// Always close files.\n\t\t\tbufferedWriterdUser.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + filename + \"'\");\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void registerNewUser(String _login, char[] _password) {\n try {\n File passwordFile = new File(\"passwords.txt\");\n FileWriter fw = new FileWriter(passwordFile, true);\n BufferedWriter bw = new BufferedWriter(fw);\n\n bw.write(_login);\n bw.write(\",\");\n bw.write(_password);\n bw.newLine();\n bw.close();\n fw.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n }\n }", "public void loadAllUsers(String filename) throws Exception {\r\n BufferedReader br = new BufferedReader(new FileReader(filename));\r\n String name;\r\n try {\r\n while ((name = br.readLine()) != null)\r\n addUser(name);\r\n } catch (Exception e) {\r\n throw new Exception(\"Error: File not Readable\");\r\n }\r\n }", "public void importUsers(String filename) throws Exception {\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\twhile(true) {\r\n\t\t\tString line = br.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tbreak;\r\n\t\t\tString[] tokens = line.split(\",\");\r\n\t\t\tString userLastName = tokens[0].trim();\r\n\t\t\tString userFirstName = tokens[1].trim();\r\n\t\t\tString userMiddleName = tokens[2].trim();\t\t\t\r\n\t\t\tString email = tokens[3].trim();\r\n\t\t\tString userName = tokens[4].trim();\r\n\t\t\tString password = tokens[5].trim();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Line:\"+line);\r\n\t\t\tSystem.out.println(\"LastName:\"+userLastName);\r\n\t\t\tSystem.out.println(\"FirstName:\"+userFirstName);\r\n\t\t\tSystem.out.println(\"MiddleName:\"+userMiddleName);\r\n\t\t\tSystem.out.println(\"Email:\"+email);\r\n\t\t\tSystem.out.println(\"UserName:\"+userName);\r\n\t\t\tSystem.out.println(\"Password:\"+password);\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\tuser.setLastName(userLastName);\r\n\t\t\tuser.setFirstName(userFirstName);\r\n\t\t\tuser.setMiddleName(userMiddleName);\r\n\t\t\tuser.setEmailAddress(email);\r\n\t\t\tuser.setUserName(userName);\r\n\t\t\tuser.setPassword(password);\t\t\t\r\n\t\t\tuser.setStatus(UserStatus.ACTIVE);\r\n\t\t\t\r\n\t\t\tem.persist(user);\r\n\t\t}\r\n\t\t\r\n\t\tbr.close();\r\n\t\tfr.close();\r\n\t}", "public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}", "private static void readUserListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"users.json\")) {\n\n\t\t\tJSONArray userListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < userListJSON.size(); i++) {\n\t\t\t\tJSONObject user = (JSONObject) userListJSON.get(i);\n\t\t\t\tString name = (String) user.get(\"name\");\n\t\t\t\tString surname = (String) user.get(\"surname\");\n\t\t\t\tString username = (String) user.get(\"username\");\n\t\t\t\tString password = (String) user.get(\"password\");\n\t\t\t\tString account = (String) user.get(\"account\");\n\n\t\t\t\tif(account.equals(\"employee\")) {\n\t\t\t\t\tMain.userList.add(new Employee(username, name, surname, password));\n\t\t\t\t} else {\n\t\t\t\t\tMain.userList.add(new Customer(username, name, surname, password));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void readUserFile() {\n\t\ttry {\n\t\t\tObjectInputStream readFile = new ObjectInputStream(new FileInputStream(userFile));\n\t\t\tVerify.userList = (ArrayList<User>) readFile.readObject();\n\t\t\treadFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//add contents of file to separate lists\n\t\tfor (int i=0; i<Verify.userList.size(); i++) {\n\t\t\tVerify.userIds.add(Verify.userList.get(i).getUserId());\n\t\t\tVerify.usernames.add(Verify.userList.get(i).getUsername());\n\t\t\tif (Verify.userList.get(i).getAccounts() != null) {\n\t\t\t\tVerify.accountList.addAll(Verify.userList.get(i).getAccounts());\n\t\t\t}\n\t\t\tif (Verify.userList.get(i).getRequests() != null) {\n\t\t\t\tVerify.requestList.addAll(Verify.userList.get(i).getRequests());\t\n\t\t\t}\n\t\t}\n\t\tfor (Account account: Verify.accountList) {\n\t\t\tVerify.accountIds.add(account.getAccountId());\n\t\t}\n\t}", "public static void UserAccounts() throws FileNotFoundException{\n\t\tScanner input = new Scanner(new File(AccountFile));\t\t\t\t//Creats objects and adds to array list.\r\n\t\t\r\n\t\twhile (input.hasNextLine()) {\t\t\t\t\t\t\t\t\t//Loops as long as there is another line\r\n\t\t\t\r\n\t\t\tString line = input.nextLine();\r\n\t\t\tif(line.equals(\"ADMIN\")) {\t\t\t\t\t\t\t\t\t//Checks if the data is for Admin, creats admin object\r\n\t\t\t\tString AdminUsername = input.nextLine();\r\n\t\t\t\tString AdminPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tAdmin admin = new Admin(AdminUsername, AdminPassword);\r\n\t\t\t\taccounts.add(admin);\r\n\t\t\t\t\r\n\t\t\t} if(line.equals(\"COORDINATOR\")){\r\n\t\t\t\tString coordinatorUsername = input.nextLine();\r\n\t\t\t\tString coordinatorPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tCoordinator coordinator = new Coordinator(coordinatorUsername, coordinatorPassword);\r\n\t\t\t\taccounts.add(coordinator);\r\n\r\n\t\t\t} if(line.equals(\"APPROVER\")){\r\n\t\t\t\tString approverUsername = input.nextLine();\r\n\t\t\t\tString approverPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tApprover approver = new Approver(approverUsername, approverPassword);\r\n\t\t\t\taccounts.add(approver);\r\n\r\n\t\t\t} if(line.equals(\"CASUAL\")){\r\n\t\t\t\tString casualUsername = input.nextLine();\r\n\t\t\t\tString casualPassword = input.nextLine();\r\n\t\t\t\t\r\n\t\t\t\tCasualStaff casual = new CasualStaff(casualUsername, casualPassword);\r\n\t\t\t\taccounts.add(casual);\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} loginSystem();\r\n\t}", "public static void createOrOpenUsersFile() {\n try {\r\n File usersFile = new File(\"users.txt\");\r\n if (usersFile.createNewFile()) {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" has been created.\");\r\n } else {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" is ready.\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "private void loadUsers() throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileInputStream fileInputStream = new FileInputStream(accounts);\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));\n\n for (String line = bufferedReader.readLine(); line != null; line = bufferedReader.readLine()) {\n String[] pair = line.split(\":\");\n userAccounts.put(pair[0], pair[1]);\n }\n }", "public void saveUsers() {\n\t\ttry {\n\t\t\t\n\t\t\tFile xmlFile = new File(\"Users.xml\");\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument document = builder.parse(xmlFile);\n\t\t\tElement users = document.getDocumentElement();\n\t\t\t\n\t\t\tArrayList<Student> u = ManageUsers.getActiveList();\n\t\t\tfor (int i = 0; i < u.size(); i++) {\n\t\t\t\t// Grab the info for a specific student\n\t\t\t\tStudent s = u.get(i);\n\t\t\t\tString fName = s.getFirstName();\n\t\t\t\tString lName = s.getLastName();\n\t\t\t\tint ucid = s.getUcid();\n\t\t\t\tint currentBorrowing = s.getCurrentBorrowing();\n\t\t\t\tboolean isActive = true;\n\t\t\t String username = s.getUsername();\n\t\t\t String password = s.getPassword();\n\t\t\t boolean isLibrarian = s.getIsLibrarian();\n\t\t\t \n\t\t\t Element student = document.createElement(\"student\");\n\t\t\t \n\t\t\t // Make a new element <student>\n\t\t\t // Add the element to the xml as a child of <Users>\n\t\t\t // Add the above fields (fName, etc.) as child nodes to the new student node\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Something went wrong with writing to the xml\");\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "private void registerUser() throws FileNotFoundException, IOException\r\n\t{\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tString fname;\r\n\t\tString lname;\r\n\t\tint attempt = 0;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\t//PrintWriter wrapped around a BufferedWriter that is wrapped around a FileWriter\r\n\t\t//used to write on a file\r\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"UserAccount.txt\", true)));\t//true allows appending\r\n\t\t\r\n\t\t//gets user's first and last name\r\n\t\tSystem.out.println(\"Enter your first name: \");\r\n\t\tfname = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name: \");\r\n\t\tlname = input.nextLine();\r\n\t\t\r\n\t\t//gets user's desired username\r\n\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\tusername = input.nextLine();\r\n\t\tattempt++;\r\n\t\twhile (checkUserExists(username) != -1)\t\t//username already exists\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nThat username already exists\");\r\n\t\t\tif (attempt == 2)\t\t//generate random username with 8 characters after 2 attempts\r\n\t\t\t{\r\n\t\t\t\tif (lname.length() < 6)\t\t\t\t//if last name has less than six characters\r\n\t\t\t\t\tusername = lname;\r\n\t\t\t\telse\t\t\t\t\t\t\t\t//else if last name has six characters or greater\r\n\t\t\t\t\tusername = lname.substring(0, 6);\r\n\t\t\t\tfor (int i = username.length(); i < 8; i++)\t\t\t//loop runs until username has 8 characters\r\n\t\t\t\t\tusername += random.nextInt(9) + 1;\t\t\t\t//concatenate random number between 0 - 9 to the username\r\n\t\t\t\tSystem.out.println(\"A randomly generated username has been chosen for you.\");\r\n\t\t\t\tSystem.out.println(\"Your username is \" + username);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\t\t\tusername = input.nextLine();\r\n\t\t\t\tattempt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpw.println(username);\r\n\t\tuserAccounts[0][numOfUsers] = username;\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//get user's password\r\n\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\tpassword = input.nextLine();\r\n\t\twhile (password.length() < 8)\t\t\t//continues to loop until pass is at least 8 characters long\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nPassword must be at least eight characters long\");\r\n\t\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\t\tpassword = input.nextLine();\r\n\t\t}\r\n\t\tpw.println(password);\r\n\t\tuserAccounts[1][numOfUsers] = password;\r\n\t\tnumOfUsers++;\r\n\t\tpw.close();\r\n\t}", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "static void loadUser() {\n\t\tScanner inputStream = null; // create object variable\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStream = new Scanner(new File(\"user.txt\"));\n\t\t\tinputStream.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No User Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStream.hasNext()) {\n\n\t\t\t\tString instanceOf = inputStream.next();\n\n\t\t\t\tString readUserName = inputStream.next();\n\t\t\t\tString readPassword = inputStream.next();\n\t\t\t\tString readEmployeeNumber = inputStream.next();\n\t\t\t\tString readName = inputStream.next();\n\t\t\t\tString readPhone = inputStream.next();\n\t\t\t\tString readEmail = inputStream.next();\n\t\t\t\tif (instanceOf.contains(\"*AD*\")) {\n\t\t\t\t\tAdmin a1 = new Admin(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Admin User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CC*\")) {\n\t\t\t\t\tCourseCoordinator a1 = new CourseCoordinator(readUserName, readPassword, readEmployeeNumber,\n\t\t\t\t\t\t\treadName, readPhone, readEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an CC User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*AP*\")) {\n\t\t\t\t\tApproval a1 = new Approval(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Approval User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CA*\")) {\n\t\t\t\t\tCasual a1 = new Casual(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\ta1.setHrly_rate(inputStream.nextInt());\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Casual User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStream.close();\n\t}", "private void loadDataFromFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // load data for new users after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // load data for existing users after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "private void modify() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.set(i,\r\n\t\t\t\t\t\tnew LoginUser(logTxtIp.getText(), logTxtId.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPw.getText(), logTxtSdi.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPort.getText(), dbType.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.toString()));\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tinitTableView();\r\n\r\n\t}", "public void userLogInInfoRead(String filepath2, HashMap<String, EmpInfo> mergeData) {\n String data;\n String[] userLogInInfoToken;\n File userLogInInfoFile = new File(filepath2);\n Scanner scanner = null;\n try {\n scanner = new Scanner(userLogInInfoFile);\n } catch (FileNotFoundException e) {\n out.println(\"file not found\");\n }\n if (scanner != null) {\n while (scanner.hasNextLine()) {\n data = scanner.nextLine();\n userLogInInfoToken = data.split(\",\");\n // store userid in mergeData as a key\n EmpInfo empInfo = new EmpInfo(Integer.parseInt(userLogInInfoToken[0]),\n userLogInInfoToken[1], userLogInInfoToken[2], userLogInInfoToken[3]);\n EmpInfo uRole = mergeData.get(userLogInInfoToken[0]);\n uRole.setUserRole(userLogInInfoToken[3]);\n /* merge data have already 6 key and 6 emp information if new key is equal to old key\n then hash map not put new key and hashmap put userRole at old key,hashmap allowed only unique kay*/\n mergeData.put(userLogInInfoToken[0], uRole);\n // all employee log in information add in arraylist for printing information\n userLogInInfo.add(empInfo);\n }\n }\n }", "public void adduserFile(Usuari usuari) throws FileNotFoundException, IOException{\r\n FileWriter fw = new FileWriter(fitxerUsuaris, true);\r\n \r\n fw.write(usuari.getDni());\r\n fw.write(usuari.getNom());\r\n fw.write(usuari.getCognom1());\r\n fw.write(usuari.getCognom2());\r\n fw.write(usuari.getPassword());\r\n \r\n fw.close();\r\n }", "private List<User> readFromFile() {\n\n List<String> lines = new ArrayList<>();\n List<User> contactList = new ArrayList<>();\n Map<String, PhoneNumber> phoneNumbersNewUser = new HashMap<>();\n\n try (BufferedReader in = new BufferedReader(new FileReader(contactsFile))) {\n String line;\n while ((line = in.readLine()) != null) {\n lines.add(line);\n }\n\n } catch (IOException ex) {\n System.out.println(\"File not found \\n\" + ex);\n ;\n }\n\n for (String line : lines) {\n String[] userProperties = line.split(\"\\\\|\");\n\n int id = Integer.parseInt(userProperties[0]);\n String fName = userProperties[1];\n String lName = userProperties[2];\n String email = userProperties[3];\n int age = Integer.parseInt(userProperties[4]);\n String[] phones = userProperties[5].split(\"\\\\,\");\n String[] homePhone = phones[0].split(\"\\\\_\");\n String[] mobilePhone = phones[1].split(\"\\\\_\");\n String[] workPhone = phones[2].split(\"\\\\_\");\n phoneNumbersNewUser.put(homePhone[0], new PhoneNumber(homePhone[1], homePhone[2]));\n phoneNumbersNewUser.put(mobilePhone[0], new PhoneNumber(mobilePhone[1], mobilePhone[2]));\n phoneNumbersNewUser.put(workPhone[0], new PhoneNumber(workPhone[1], workPhone[2]));\n String[] homeAdress = userProperties[6].split(\"\\\\,\");\n Address homeAdressNewUser = new Address(homeAdress[0], Integer.parseInt(homeAdress[1]), Integer.parseInt(homeAdress[2]),\n homeAdress[3], homeAdress[4], homeAdress[5], homeAdress[6]);\n String title = userProperties[7];\n String[] companyProperties = userProperties[8].split(\"\\\\_\");\n String[] companyAddress = companyProperties[1].split(\"\\\\,\");\n Address companyAddressNewUser = new Address(companyAddress[0], Integer.parseInt(companyAddress[1]),\n Integer.parseInt(companyAddress[2]), companyAddress[3], companyAddress[4], companyAddress[5],\n companyAddress[6]);\n String companyName = companyProperties[0];\n Company companyNewUser = new Company(companyName, companyAddressNewUser);\n boolean isFav = Boolean.parseBoolean(userProperties[9]);\n User user = new User(id, fName, lName, email, age, phoneNumbersNewUser, homeAdressNewUser, title, companyNewUser, isFav);\n contactList.add(user);\n }\n\n\n return contactList;\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "public static void createUsername(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeeUsername = \"\";\n\t\tdo {\n\t\t\temployeeUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (!newEmp.setUsername(employeeUsername)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong employee name, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeeUsername));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/username.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeeUsername + \", \");\n\t\toutputFile.close();\n\t}", "public void createUser(List<User> list) {\n\n Gson gson = new Gson();\n FileService writerService = new FileService();\n for (User user : list) {\n String userData = gson.toJson(user);\n writerService.writeToUserData(userData);\n }\n\n }", "public static void writeTo(String filename, List<User> users){\r\n\t\tPrintWriter pw=null;\r\n\t\ttry{\r\n\t\t\tpw=new PrintWriter(new FileOutputStream(new File(filename),false));//false because don't append,\r\n\t\t\tfor(User user : users){//it replaces all with new updated data\r\n\t\t\t\tpw.write(user+\"\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tpw.close();\r\n\t\t}\r\n\t}", "public static boolean addNewLogin(String username, String password) {\n\t\tif (users.getEntry(\"salt\", \"username\", username) != null)\n\t\t\treturn false;\n\n\t\tint bits = 256;\n\n\t\t// generate a random salt\n\t\tBigInteger lowerBound = new BigInteger(2).pow(bits - 1);\n\n\t\tBigInteger upperBound = new BigInteger(2).pow(bits);\n\n\t\tBigInteger rand = BigInteger.randomBigInteger(upperBound.subtract(lowerBound)).add(lowerBound);\n\n\t\tString salt = rand.toString(16);\n\n\t\t// generate the hash for the password given the salt\n\t\tbyte[] binary = hashPassword(password.toCharArray(), DatatypeConverter.parseHexBinary(salt), 10, 256);\n\n\t\tString hexBinary = DatatypeConverter.printHexBinary(binary);\n\n\t\t// save the values to the csv file\n\t\tString entry = String.format(\"%s, %s, %s\", username, salt, hexBinary);\n\n\t\tchar[] entryArray = entry.toCharArray();\n\t\tuserFile.writeChar('\\r');\n\t\tuserFile.writeChar('\\n');\n\t\tfor (char character : entryArray) {\n\t\t\tuserFile.writeChar(character);\n\t\t}\n\n\t\tusers.refreshData();\n\t\t\n\t\t// save the file back to the drive\n\t\ttry {\n\t\t\tuserFile.save(new File(FileLocations.getUserLoginFile()));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn true;\n\t}", "public void newUserDirectory() {\n\t\tusers = new LinkedAbstractList<User>(100);\n\t}", "public void saveUsers() {\n FileWriter fileWriter = null;\n PrintWriter printWriter = null;\n try {\n fileWriter = new FileWriter(pathData);\n printWriter = new PrintWriter(fileWriter);\n if (users != null) {\n \n for (Map.Entry m : users.entrySet()) {\n printWriter.println(m.getKey() + spChar + m.getValue() + \"\\n\");\n }\n }\n printWriter.close();\n } catch (IOException e) {\n }\n }", "public void addUser(User user) {\n users.add(new User(user.getUsername(), Hash.md5(user.getPassword())));\n // Naively dump the whole users list to file\n reader.dumpToFile(users);\n }", "public void writeUsers() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/users.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(users);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public void addUser(String username, String password, String balance) throws IOException {\r\n // create a new user\r\n User user = new User(username, password, balance);\r\n // add new user to arraylist\r\n this.users.add(user);\r\n // write the new user to the text file\r\n this.userInfo.writeToFile(this.users.get(this.users.size() - 1).getUsername(), this.users.get(this.users.size() - 1).getPassword(password), this.users.get(this.users.size() - 1).getBalance());\r\n }", "public static void writeUserFile(List<User> List) {\n\t\ttry {\n\t\t\tObjectOutputStream writeFile = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\t\twriteFile.writeObject(List);\n\t\t\twriteFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void StoreUsers(ArrayList<User> usersList) {\r\n\t\ttry {\r\n\t\t\tfw = new FileWriter(\".\\\\data\\\\users.txt\"); // writes data into\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \\\\data\\\\books.txt\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tfor (int i = 0; i < usersList.size(); i++) { // for loop will run\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// till\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the size of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// list usersList\r\n\t\t\t\tString content = \"\"; // Content is declared as String\r\n\t\t\t\tUser user = usersList.get(i); // Gets content of the array list\r\n\t\t\t\tcontent += user.getId() + \"::\"; // Gets ID of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getName() + \"::\"; // Gets Name of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getNumBooksBorrowed() + \"::\"; // Gets Number of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Books\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Borrowed of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and adds ::\r\n\t\t\t\tcontent += user.getPhone() + \"::\"; // Gets Phone Number of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Member and adds ::\r\n\t\t\t\tcontent += user.getreturndate() + \"\\n\"; // Gets Return Date of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\r\n\t\t\t\tbw.write(content); // writes the content of the Members in the\r\n\t\t\t\t\t\t\t\t\t// text file\r\n\r\n\t\t\t}\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Complete storing all users!\", \"Store Users\",\r\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE); // confirms with a message that\r\n\t\t\t\t\t\t\t\t\t\t\t\t// the Members are stored\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null)\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\tif (fw != null)\r\n\t\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "public static void createPassword(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeePassword = \"\";\n\t\tdo {\n\t\t\temployeePassword = JOptionPane.showInputDialog(\"Please enter a password.\");\n\t\t\tif (!newEmp.setUsername(employeePassword)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong password, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeePassword + \", \"));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/password.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeePassword + \", \");\n\t\toutputFile.close();\n\t}", "public void loadUsers() {\n CustomUser userOne = new CustomUser();\n userOne.setUsername(SpringJPABootstrap.MWESTON);\n userOne.setPassword(SpringJPABootstrap.PASSWORD);\n\n CustomUser userTwo = new CustomUser();\n userTwo.setUsername(SpringJPABootstrap.TEST_ACCOUNT_USER_NAME);\n userTwo.setPassword(SpringJPABootstrap.TEST_ACCOUNT_PASSWORD);\n\n String firstUserName = userOne.getUsername();\n\n /*\n * for now I am not checking for a second user because there is no delete method being\n * used so if the first user is created the second user is expected to be created. this\n * could cause a bug later on but I will add in more logic if that is the case in a\n * future build.\n */\n if(userService.isUserNameTaken(firstUserName)) {\n log.debug(firstUserName + \" is already taken\");\n return ;\n }\n userService.save(userOne);\n userService.save(userTwo);\n\n log.debug(\"Test user accounts have been loaded!\");\n }", "public void load(String fileName) throws IOException{\n\t\tFileInputStream fileIn=null;\n\t try {\n\t\t\tfileIn = new FileInputStream(fileName);\n\t\t\tArrayList<User1> userList; // = new ArrayList<User1>();\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t// Tramite la funzione readValue riottengo la lista degli utenti a partire dalla stringa con codifica JSON\n\t\t\t//userList = mapper.readValue(fileIn, new TypeReference<ArrayList<User1>>());\n\t\t\tUser1[] array = mapper.readValue(fileIn, User1[].class);\n\t\t\tuserList=new ArrayList<>(Arrays.asList(array));\n\t\t\tfor(User1 userWrapped : userList) // Per ogni utente nella lista, riottengo l'oggetto User, andando a ripopolare il Realm (ripristino)\n\t\t\t{\n\t\t\t\tUser user = new User(userWrapped.getIdentifier(), userWrapped.getSecret());\n\t\t\t\trealm.getUsers().add(user); // Aggiungo l'utente alla lista\n\t\t\t}\n\t\t\tfileIn.close();\n\t\t} catch (IOException e){\n\t\t\tif(fileIn!=null)fileIn.close();\n\t \tthrow e;\n\t\t}\n\n\t}", "@Override\n public boolean addUserPersonalInfo(String text) \n {\n \n User tmp = this.getLoggedUser();\n tmp.setPersonal_details(text);\n if(this.setLoggedUser(tmp)) System.out.print(\"done\");\n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO user_personal_information (user_id,information) VALUES ( \" + this.getLoggedUser().getId() + \" , '\" + text + \"')\";\n \n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n \n }", "public void add(String fullName, String username, String password, String accType, String email, String salary){\n\t\t\n\t\t// Determine position where new User needs to be added\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\t// Check if the list contains only the head\n\t\tif(marker.getNext()!= null){\n\t\tmarker = marker.getNext();\t\t\t\t\t\t\t\t\t/* ====> If not then skip the head */\n\t\t}\n\t\t\n\t\t\n\t\t/*Iterate through the whole list and compare Strings. Move the marker until it reaches the end or until the input\n\t\t * username is greater than the marker's username . */\n\t\twhile((marker.getNext() != null) && (username.compareTo(marker.getUsername())>0)){\n\t\t\t\t\tmarker = marker.getNext();\n\t\t\t\t}\t\t\n\t\t\n\t\t/* When marker finds a user whose username is greater than the input it moves the marker back a position so that the new\n\t\t * user can be appended to that marker */\n\t\tif(marker.getPrev() != null){\n\t\t\t\tif(username.compareTo(marker.getUsername())<0){\n\t\t\t\t\tmarker = marker.getPrev();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Create new user with the method's parameters as properties. Append it to the marker\n\t\tUser newUser = new User(marker.getNext(), marker);\n\t\tnewUser.setFullName(fullName);\n\t\tnewUser.setUsername(username);\n\t\tnewUser.setPassword(password);\n\t\tnewUser.setAccType(accType);\n\t\tnewUser.setEmail(email);\n\t\tnewUser.setSalary(salary);\n\t\t\n\t\t// Set connections to the new User\n\t\tnewUser.getPrev().setNext(newUser);\n\t\tif(newUser.getNext() != null){\n\t\tnewUser.getNext().setPrev(newUser);\n\t\t}\n\n\t}", "protected void saveUserAccounts(List<UserInfo> userList) throws RepositoryException {\n RepositoryFileManager fileManager = repositoryManager.getFileManager();\n boolean success = false;\n fileManager.startChangeSet();\n\n try {\n File usersFile = new File( fileManager.getRepositoryLocation(), REPOSITORY_USERS_FILE );\n RepositoryUsers repoUsers = new RepositoryUsers();\n Marshaller marshaller = jaxbContext.createMarshaller();\n\n repoUsers.getUser().addAll( userList );\n fileManager.addToChangeSet( usersFile );\n\n marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, true );\n marshaller.setProperty( \"com.sun.xml.bind.namespacePrefixMapper\", new NamespacePrefixMapper() {\n public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {\n return REPOSITORY_EXT_NAMESPACE.equals( namespaceUri ) ? \"r\" : suggestion;\n }\n\n @Override\n public String[] getPreDeclaredNamespaceUris() {\n return new String[] {REPOSITORY_EXT_NAMESPACE};\n }\n } );\n marshaller.setSchema( validationSchema );\n marshaller.marshal( objectFactory.createRepositoryUsers( repoUsers ), usersFile );\n\n fileManager.commitChangeSet();\n userFileLastModified = -1;\n success = true;\n\n } catch (JAXBException e) {\n throw new RepositoryException( \"Error committing user updates to file system.\", e );\n\n } finally {\n try {\n if (!success) {\n fileManager.rollbackChangeSet();\n }\n } catch (Exception e) {\n // Ignore error and continue\n }\n }\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n // check for correct usage\n if (args.length < 1) {\n System.out.println(\"usage: java Vault [-au] <filename>\");\n System.exit(1);\n }\n\n // check for au option\n boolean addUser = false;\n if (args.length == 2)\n addUser = true;\n\n // open the file, or print error and exit\n Scanner sc = null;\n try {\n sc = new Scanner(new FileReader((addUser ? args[1] : args[0])));\n }catch (IOException e) {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' could not be opened.\");\n System.exit(2);\n }\n \n // read each line of the file, storing each user in users\n ArrayList<User> users = new ArrayList<User>();\n while (sc.hasNextLine()) {\n String[] line = sc.nextLine().split(\" \");\n \n if (line.length == 4 && line[0].equals(\"user\")) {\n users.add(new User(line[1], line[2], line[3]));\n\n }else if (line.length == 4 && line[0].equals(\"data\")) {\n for (int i = 0; i < users.size(); i++) {\n if (users.get(i).getName().equals(line[1]))\n users.get(i).addDatum(line[2], line[3]);\n }\n\n }else {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' improperly formatted.\");\n System.exit(3);\n }\n\n }\n //close read file\n sc.close();\n\n // ask user for username and password\n System.out.print(\"username: \");\n String name = System.console().readLine();\n System.out.print(\"password: \");\n char[] password = System.console().readPassword();\n\n // if au option, collect info and add to file, then quit\n if (addUser) {\n PrintWriter pw = null;\n try {\n pw = new PrintWriter(new File(args[1]));\n } catch (FileNotFoundException fnfe) {\n fnfe.printStackTrace();\n System.exit(6);\n }\n\n System.out.print(\"Hash algorithm: \");\n String hashAlg = System.console().readLine();\n\n // perform checks and hash password\n for (char c : password) {\n if ((int)c < 42 || (int)c > 122) {\n System.out.println(\"Error! Invalid symbol '\" + c + \"' in password.\");\n System.exit(7);\n }\n }\n Hasher hasher = null;\n String passhash = null;\n if (hashAlg.equals(\"clear\")) {\n hasher = new Clear();\n }else if (hashAlg.equals(\"shift+caesar\")) {\n hasher = new Caesar();\n }else if (hashAlg.equals(\"shift+vigenere\")) {\n hasher = new Vigenere();\n }else {\n System.out.println(\"Error! Hash algorithm '\" + hashAlg + \"' not supported.\");\n System.exit(8);\n }\n passhash = hasher.hash(password);\n for (User u : users) {\n if (u.getName().equals(name)) {\n System.out.print(\"Error! Username '\" + name + \"' already in use.\");\n System.exit(9);\n }\n }\n \n users.add(new User(name, hashAlg, passhash));\n for (User u : users) {\n pw.println(String.join(\" \", \"user\", u.getName(), u.getHashAlg(), u.getHash()));\n }\n\n pw.close();\n System.exit(0);\n }\n\n // determine access, exit if denied\n boolean access = false;\n User curr = null;\n for (User u : users) {\n if (u.getName().equals(name)) {\n try {\n if (u.validate(password)) {\n System.out.println(\"Access granted!\");\n access = true;\n curr = u;\n }\n break;\n }catch (UnsupportedHashException e) {\n System.out.println(\"Error! Hash algorithm '\" + u.getHashAlg() + \n \"' not supported.\");\n System.exit(4);\n }\n }\n }\n if (!access) {\n System.out.println(\"Access denied!\");\n System.exit(5);\n }\n\n // if granted access, open prompt for commands\n System.out.print(\"> \");\n sc = new Scanner(System.in);\n String cmd = null;\n ArrayList<Datum> data = curr.getData();\n while (!(cmd = sc.next()).equals(\"quit\")) {\n switch(cmd) {\n case \"labels\": for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n System.out.println(plain.split(\"_\")[0]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" +\n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break;\n\n case \"get\": cmd = sc.next();\n for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n if (plain.split(\"_\", 2)[0].equals(cmd))\n System.out.println(plain.split(\"_\", 2)[1]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" + \n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break; \n\n default: System.out.println(\"Unknown command '\" + cmd + \"'.\");\n break;\n }\n System.out.print(\"> \");\n\n }\n\n \n\n }", "void addNewAccountToFile(Account newAccount);", "public void addUserCredentials(String login, String password) throws SQLException;", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "void addUserpan(String userid,String username,String userpwd);", "private final void loadDefaultUsers() throws Exception {\r\n // Get the default User definitions from the XML defaults file. \r\n File defaultsFile = findDefaultsFile();\r\n // Add these users to the database if we've found a default file. \r\n if (defaultsFile.exists()) {\r\n server.getLogger().info(\"Loading User defaults from \" + defaultsFile.getPath()); \r\n Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();\r\n Users users = (Users) unmarshaller.unmarshal(defaultsFile);\r\n for (User user : users.getUser()) {\r\n user.setLastMod(Tstamp.makeTimestamp());\r\n this.dbManager.storeUser(user, this.makeUser(user), this.makeUserRefString(user));\r\n }\r\n }\r\n }", "@Override\n\tpublic void addUsers(Session session){\n\t\ttry{\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\n\t\t\tSystem.out.print(\"+++++++++++Add Customer/Admin here+++++++++++\\n\");\n\n\t\t\tSystem.out.println(\"Enter 'Admin' to add a new admin to database\");\n\t\t\tSystem.out.println(\"Enter 'Customer' to add a new admin to database\");\n\t\t\tSystem.out.println(\"--------------Enter one from above------------------\");\n\t\t\tString accType = scanner.nextLine();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter First Name:\");\n\t\t\tString firstName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Last Name:\");\n\t\t\tString lastName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter UserId:\");\n\t\t\tString inputLoginId = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Password:\");\n\t\t\tString inputLoginPwd = scanner.nextLine();\n\n\t\t\t//pass these input fields to client controller\n\t\t\tsamp=mvc.addUsers(session,accType,firstName,lastName,inputLoginId,inputLoginPwd);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Users Exception: \" +e.getMessage());\n\t\t}\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "@Override\n public void updateUserJson() {\n synchronized (lockUpdateUserJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Users.json\")) {\n ArrayList<User> userAsArray = new ArrayList<>();\n for (Map.Entry<String, User> entry : mapOfRegisteredUsersByUsername.entrySet()) {\n userAsArray.add(entry.getValue());\n }\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"users\", writer.toJsonTree(userAsArray));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "public void addUser(String fullName,String loginName,String password,boolean isAdmin) throws IOException {\n userManager.addUser(fullName, loginName, password, isAdmin);\n userManager.emptyLists();\n userManager.fillLists();\n AdminMainViewController.emptyStaticLists();\n AdminMainViewController.adminsObservableList.addAll(userManager.getAdminsList());\n AdminMainViewController.usersObservableList.addAll(userManager.getUsersList());\n }", "public void writeUserRegister(int id, String username, String password, boolean isNotified, String county) {\n try {\n JSONObject obj = (JSONObject) jsonParser.parse(new FileReader(file.getPath()));\n\n JSONObject newRegister = new JSONObject();\n\n JSONArray registerlist = (JSONArray) obj.get(\"Registry\");\n\n newRegister.put(\"id\", id);\n newRegister.put(\"name\", username);\n newRegister.put(\"password\", password);\n newRegister.put(\"county\", county);\n newRegister.put(\"isInfected\", false);\n newRegister.put(\"isNotified\", isNotified);\n\n registerlist.add(newRegister);\n\n JSONArray countyList = (JSONArray) obj.get(\"Counties\");\n JSONArray unregisteredUsers = (JSONArray) obj.get(\"UnregisteredUsers\");\n\n JSONObject objWrite = new JSONObject();\n\n objWrite.put(\"UnregisteredUsers\", unregisteredUsers);\n objWrite.put(\"Registry\", registerlist);\n objWrite.put(\"Counties\", countyList);\n\n FileWriter fileWriter = new FileWriter(file.getPath());\n\n fileWriter.write(objWrite.toJSONString());\n\n fileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public static void writeData(List<User> users) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = new FileOutputStream(USER_SAVE_FILE_NAME, false);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(users);\n oos.close();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n if (fos != null && oos != null) {\n try {\n oos.close();\n fos.close();\n } catch (Exception ex) {\n Logger.getLogger(Utilities.UserDataIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n\n }\n }\n }", "@Override\n public void save(String fileName){\n FileWriter addEmployeeDetails = null;\n\n try{\n addEmployeeDetails = new FileWriter(fileName,true);\n addEmployeeDetails.append(getUsername());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPassword());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getFirstname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getLastname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(DMY.format(getDoB()));//format,convert,save\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getContactNumber());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getEmail());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(String.valueOf(getSalary()));\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPositionStatus());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n //************Saves the address in the file.****************\n homeAddress.save(addEmployeeDetails);\n //**********************************************************\n addEmployeeDetails.append(\"$$$\");\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.close();\n addEmployeeDetails = null;\n\n }//end try\n catch (IOException ioe){}//end catch\n }", "public static void signIn(Login [] newLogin, Employee[] employee) {\n\t\tString myUsername = \"\";\n\t\tdo {\n\t\t\tmyUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (myUsername.length() == 0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid username, please try again.\");\n\t\t\t}\n\t\t} while (myUsername.length() == 0);\n\t\tScanner validateUsername;\n\t\ttry {\n\t\t\tvalidateUsername = new Scanner(new FileInputStream(\"./src/Phase5/username.txt\"));\n\t\t\twhile (validateUsername.hasNextLine()) {\n\t\t\t\tString copy = validateUsername.nextLine();\n\t\t\t\tif (copy.contains(myUsername + \",\")) {\n\n\t\t\t\t\tString myPassword = \"\";\n\t\t\t\t\tdo {\n\t\t\t\t\t\tmyPassword = JOptionPane.showInputDialog(\"Please enter a password.\");\n\t\t\t\t\t\tif (myPassword.length() == 0) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid password, please try again.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (myPassword.length() == 0);\n\t\t\t\t\tScanner validatePassword;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvalidatePassword = new Scanner(new FileInputStream(\"./src/Phase5/password.txt\"));\n\t\t\t\t\t\twhile (validatePassword.hasNextLine()) {\n\t\t\t\t\t\t\tString passwordCopy = validatePassword.nextLine();\n\t\t\t\t\t\t\tif (passwordCopy.contains(myPassword + \",\")) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Welcome\");\n\t\t\t\t\t\t\t\twork(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Password not found, try again.\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File not found\");\n\t\t\t\t\t}\t\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Username not found, try again.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\");\n\t\t}\n\n\t}", "public void addLoginRecord(String username, String password, String phoneNumber) throws ClirNetAppException {\n SQLiteDatabase db = this.getWritableDatabase();\n try {\n ContentValues contentValue = new ContentValues();\n\n contentValue.put(KEY_NAME, username);\n contentValue.put(KEY_PASSWORD, password);\n contentValue.put(PHONE_NUMBER, phoneNumber);\n\n // Inserting Row\n db.delete(TABLE_USER, null, null);\n db.insert(TABLE_USER, null, contentValue);\n } catch (Exception e) {\n throw new ClirNetAppException(\"Error inserting data\");\n } finally {\n if (db != null) {\n db.close(); // Closing database connection\n }\n }\n\n }", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "public void saveUser(User user) {\n\t\tFile d = new File(\"users\");\n\t\t\n\t\tif (!d.exists() || !d.isDirectory()) {\n\t\t\td.mkdir();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\t//Document document = builder.parse(f);\n\t\t\t\n\t\t\tDocument document = builder.newDocument();\n\t\t\t\n\t\t\tElement root = document.createElement(\"User\");\n\t\t\tdocument.appendChild(root);\n\t\t\t\n\t\t\troot.setAttribute(\"username\", user.name);\n\t\t\troot.setAttribute(\"password\", user.password);\n\t\t\t\n\t\t\t//System.out.println(\"Save: \" + user.password);\n\t\t\t\n\t\t\tIterator i = user.record.entrySet().iterator();\n\t\t\t\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tMap.Entry u = (Map.Entry)i.next();\n\t\t\t\tString name = (String)u.getKey();\n\t\t\t\tString record = (String)u.getValue();\n\n\t\t\t\tElement precord = document.createElement(\"Record\");\n\t\t\t\t\n\t\t\t\tprecord.setAttribute(\"username\", name);\n\t\t\t\tprecord.setTextContent(record);\n\t\t\t\troot.appendChild(precord);\n\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory tfactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = tfactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(document);\n\t\t\tStreamResult result = new StreamResult(new File(\"users/\" + user.name + \".xml\"));\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadUsersFromFile(String fileName) {\n\t\ttry {\n\t\t\tusers = UserRecordIO.readUserRecords(fileName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to read file \" + fileName);\n\t\t}\n\t}", "public void create_loginFile(String account){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.LOGIN_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(account+\" logged in,\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "private static ArrayList<User> loadInitialData(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t// From the users list get all the user names\n\t\tfor (String username:Utils.FileUtils.getFileLines(Global.Constants.LIST_OF_USERS)){ // refers \"users\" file\n\t\t\tArrayList<Directory> directories = new ArrayList<Directory>();\n\t\t\t// For a user name, read the names of directories registered\n\t\t\t// Note: All directory names are provided in the file bearing user name\n\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION + username)) { // refers to a specific user file \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // that has directories\n\t\t\t\tfor (String dir:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username)) {\n\t\t\t\t\tArrayList<String> documents = new ArrayList<String>();\n\t\t\t\t\t// For each directory, read names of files saved\n\t\t\t\t\t// Note: All file names are provided in the file bearing username$dirname\n\t\t\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION, username + \"$\" + dir)) {\n\t\t\t\t\t\tfor (String doc:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username + \"$\" + dir)) {\n\t\t\t\t\t\t\tdocuments.add(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectories.add(new Directory(dir, documents));\n\t\t\t\t}\n\t\t\t}\n\t\t\tusers.add(new User(username, directories));\n\t\t}\n\t\treturn users;\n\t}", "public static void addAccount(String user, String password)\r\n\t\t\tthrows IOException {\n\r\n\t\tFile file = getAccountFile();\r\n\r\n\t\tFileWriter fw = new FileWriter(file, true);\r\n\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(user);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(password);\r\n\r\n\t\twriter.close();\r\n\t\tfw.close();\r\n\t\tfile = null;\r\n\t}", "public void newEntry(String file, User user) {\r\n TableEntry entry = new TableEntry();\r\n entry.fileName = file;\r\n entry.userName = user.getName();\r\n entry.date = DateUtils.getISO8601Date(System.currentTimeMillis());\r\n \r\n int sz = m_entries.size();\r\n if ( (MAX_SIZE > 0) && (sz >= MAX_SIZE) ) {\r\n clear();\r\n sz = 0;\r\n }\r\n \r\n synchronized(m_entries) {\r\n m_entries.add(entry);\r\n ++sz;\r\n }\r\n fireTableRowsInserted(sz, sz);\r\n }", "public void addData(String User, String password) throws SQLException\n {\n }", "public static void writePasswdFile (Map<String, String> users, File dst) throws Exception{\n\t\tStringBuffer s = new StringBuffer(\"# Passwords for edu.ucar.dls.schemedit.security.login.FileLogin\");\n\t\tfor (String username : users.keySet() ) {\n\t\t\tString password = users.get(username);\n\t\t\tString passwdFileEntry = username + \":\" + Encrypter.encryptBaseSHA164(password);\n\t\t\ts.append(\"\\n\" + passwdFileEntry);\n\t\t}\n\t\tprtln(\"writing \" + users.size() + \" users to \" + dst);\n\t\t\n\t\tFiles.writeFile(s + \"\\n\", dst);\n\t\t// prtln (s.toString());\n\t}", "public void writeData(UserInfo info)\n\t{\n\t\tSystem.out.println(\"file has been written!\");\n\t\tuserinfos.add(info);\n\t}", "public void addBase(String baseIdentifier, String fileName, String user, String password) {\n bases.put(baseIdentifier, fileName);\r\n NeoDatisConfig config2 = config.copy();\r\n\r\n config2.setIsLocal(false);\r\n if(user != null && password != null) {\r\n config2.setUser(user);\r\n config2.setPassword(password);\r\n }\r\n sessionManagers.put(baseIdentifier, new SessionManager(new IOFileParameter(fileName, true, config2)));\r\n if(config2.isInfoEnabled(LOG_ID)) {\r\n DLogger.info(\"ODBServer:Adding base : name=\" + baseIdentifier + \" (file=\" + fileName + \") to server\");\r\n }\r\n }", "protected void reloadUsers() {\r\n\t\tif (smscListener != null) {\r\n\t\t\ttry {\r\n\t\t\t\tif (users != null) {\r\n\t\t\t\t\tusers.reload();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tusers = new Table(usersFileName);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Users file reloaded.\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\tevent.write(e, \"reading users file \" + usersFileName);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tevent.write(e, \"reading users file \" + usersFileName);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}", "private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"[email protected]\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"[email protected]\", 50), new User(\"Sita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"[email protected]\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"[email protected]\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}", "private void saveDataToFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // path for new accounts after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // path for existing accounts after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void writeNewUser(String name,String email,String password) {\n mDatabase.child(\"User\").child(name).child(\"Email\").setValue(email);\n mDatabase.child(\"User\").child(name).child(\"Password\").setValue(password);\n }", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void fillUsers(int totalEntries) {\n\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n storeOperations.createAccount(\"user_\" + i, \"password_\" + i, Fairy.create().person().getFirstName(), Fairy.create().person().getLastName());\n }\n }", "public static boolean addUserIntoFile(DSUser user) {\n\t\tDSUsers dsUsers = getUsersFromFile();\n\t\tboolean addResult = false;\n\t\tif (dsUsers != null) {\n\t\t\taddResult = dsUsers.getUsers().add(user);\n\t\t}\n\t\tboolean emptyResult = emptyFile(USERS_FILE);\n\t\tString json = gson.toJson(dsUsers);\n\t\tboolean writeResult = writeToFile(USERS_FILE, json);\n\n\t\treturn (addResult && emptyResult && writeResult);\n\t}", "@Override\n\tpublic boolean addNewUser() {\n\t\treturn false;\n\t}", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "@Override\n\tpublic User add(String name, String pwd, String phone) {\n\t\tSystem.out.println(\"OracleDao is add\");\n\t\treturn null;\n\t}", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "void addUser() throws NoSuchAlgorithmException\r\n\t{\r\n\t\tSystem.out.print(\"Create a user ID: \");\r\n\t\tString userIDinput = scan.next();\r\n\t\tSystem.out.print(\"Create a password: \");\r\n\t\tmakePassword(userIDinput, scan.next());\r\n\t}", "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "public void addPoint (String user, double point) throws IOException { \r\n this.point = this.point + point; \r\n Owner o = new Owner(user, password);\r\n String lineSplit[];\r\n out = new FileReader(\"Customer.txt\");\r\n BufferedReader read = new BufferedReader(out);\r\n \r\n String line;\r\n String data = \"\";\r\n \r\n while((line = read.readLine()) != null){\r\n lineSplit = null;\r\n lineSplit = line.split(\",\");\r\n userName = lineSplit[0];\r\n password = lineSplit[1];\r\n status = o.changeStatus(this.point);\r\n \r\n if(user.equals(userName)){\r\n data+=userName+\",\"+password+\",\"+status+\",\"+this.point+\"\\r\\n\";\r\n System.out.println(data);\r\n }\r\n else{\r\n data+=line+\"\\r\\n\";\r\n }\r\n }\r\n read.close();\r\n in = new FileWriter(\"Customer.txt\");\r\n in.write(data);\r\n in.close();\r\n }", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public static void serializeUsers(ListOfAllUsers list) throws FileNotFoundException, IOException {\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\toos.writeObject(list);\n\t\toos.close();\n\t\t//System.out.println(\"Serialized.\");\n\t}", "public abstract void saveUserDetails(User user) throws InlogException;" ]
[ "0.72991174", "0.6855459", "0.6586949", "0.6549896", "0.65038306", "0.64913654", "0.6479701", "0.645284", "0.6396378", "0.63917655", "0.63806", "0.63620186", "0.6292061", "0.6242891", "0.6168011", "0.6165869", "0.613007", "0.6119469", "0.6116803", "0.6116371", "0.6113373", "0.60936373", "0.6087758", "0.6015665", "0.5997707", "0.59810394", "0.59703445", "0.5969167", "0.59404355", "0.5935049", "0.592161", "0.5918031", "0.59125537", "0.58982337", "0.58815545", "0.58591247", "0.58424014", "0.58383816", "0.58347183", "0.582984", "0.58058727", "0.5801478", "0.5797809", "0.57948005", "0.57947266", "0.578163", "0.5781057", "0.5761973", "0.57604", "0.5756662", "0.5748453", "0.57420343", "0.57402605", "0.5739067", "0.5736349", "0.57174885", "0.57158107", "0.5700497", "0.5693582", "0.5683377", "0.5678002", "0.5675187", "0.5667591", "0.5660408", "0.56508243", "0.5649384", "0.5643585", "0.56392425", "0.56227297", "0.5620387", "0.56171495", "0.5600111", "0.56000197", "0.55835414", "0.5581018", "0.5579215", "0.5574393", "0.55733824", "0.556623", "0.55657095", "0.55636436", "0.5554892", "0.55530584", "0.55492496", "0.5548459", "0.5542999", "0.5539662", "0.5522398", "0.552113", "0.5519557", "0.5513761", "0.55093807", "0.5507539", "0.550377", "0.55009097", "0.5500906", "0.5499203", "0.54891145", "0.5482632", "0.54729867", "0.5471584" ]
0.0
-1
Since Accessing files is slow, we decided to only access the file two times, at the start and at the end This method is simply just transfering all the data from the file into Multidimensional ArrayLists
public static void populateLists() throws IOException { File loginInfo = new File("loginDetails.txt"); File topics = new File("task.txt"); File games = new File("game.txt"); File questions = new File("Questions.txt"); File topic = new File("Topics.txt"); //File userinfo=new File Scanner fileReader; String[] temp; loginDetails.add(new ArrayList<String>()); loginDetails.add(new ArrayList<String>()); loginDetails.add(new ArrayList<String>()); topicsMenu.add(new ArrayList<String>()); topicsMenu.add(new ArrayList<String>()); gameMenu.add(new ArrayList<String>()); gameMenu.add(new ArrayList<String>()); topicMenu.add(new ArrayList<String>()); topicMenu.add(new ArrayList<String>()); for(int i=0; i<9; i++) questionDetails.add(new ArrayList<String>()); if(loginInfo.exists()) { fileReader = new Scanner(loginInfo); while(fileReader.hasNext()) { temp = fileReader.nextLine().split(","); for(int i=0; i<loginDetails.size(); i++) loginDetails.get(i).add(temp[i]); } fileReader.close(); }writeToFile(loginInfo,""); if(topics.exists()) { fileReader = new Scanner(topics); while(fileReader.hasNext()) { temp = fileReader.nextLine().split(","); for(int i=0; i<topicsMenu.size(); i++) topicsMenu.get(i).add(temp[i]); } fileReader.close(); } if(topic.exists()) { fileReader = new Scanner(topic); while(fileReader.hasNext()) { temp = fileReader.nextLine().split(","); for(int i=0; i<topicMenu.size(); i++) topicMenu.get(i).add(temp[i]); } fileReader.close(); } if(games.exists()) { fileReader = new Scanner(games); while(fileReader.hasNext()) { temp = fileReader.nextLine().split(","); for(int i=0; i<gameMenu.size(); i++) gameMenu.get(i).add(temp[i]); } fileReader.close(); } if(questions.exists()) { fileReader = new Scanner(questions); while(fileReader.hasNext()) { temp = fileReader.nextLine().split(","); for(int i=0; i<questionDetails.size(); i++) questionDetails.get(i).add(temp[i]); } fileReader.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }", "public void readFile() {\n ArrayList<Movement> onetime = new ArrayList<Movement>(); \n Movement newone = new Movement(); \n String readLine; \n\n File folder = new File(filefolder); \n File[] listOfFiles = folder.listFiles(); \n for (File file : listOfFiles) {\n if (file.isFile()&& file.getName().contains(\"200903\")) {\n try {\n onetime = new ArrayList<Movement>(); \n newone = new Movement(); \n BufferedReader br = new BufferedReader(new FileReader(filefolder+\"\\\\\"+file.getName())); \n readLine = br.readLine (); \n String[] previouline = readLine.split(\",\"); \n int previousint = Integer.parseInt(previouline[7]); \n while ( readLine != null) {\n String[] currentline = readLine.split(\",\"); \n if (Integer.parseInt(currentline[7]) == previousint)\n {\n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]); \n newone.ID = Integer.parseInt(currentline[7]); \n newone.filedate = file.getName();\n } else\n { \n onetime.add(newone); \n newone = new Movement(); \n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]);\n }\n previousint = Integer.parseInt(currentline[7]); \n readLine = br.readLine ();\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n rawdata.add(onetime);\n } \n }\n println(rawdata.size());\n}", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "private void getDataLists(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(path);\n\t\t\tfile.createNewFile();\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\t\t\t\n\t\t\tString str = null;\n\t\t\twhile((str = fileReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tthis.dataList.push(str);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed : data list read\");\n\t\t}\n\t}", "public ArrayList<String> readFromFile(){\n ArrayList<String> results = new ArrayList<>();\n //Wrap code in a try/ catch to help with exception handling.\n try{\n //Create a object of Scanner class\n Scanner s = new Scanner(new FileReader(path));\n //While loop for iterating thru the file.\n // Reads the data and adds it to the ArrayList.\n while(s.hasNext()) {\n String c1 = s.next();\n String c2 = s.next();\n String w = s.next();\n results.add(c1);\n results.add(c2);\n results.add(w);\n }return results;\n\n }//File not found exception block.\n catch(FileNotFoundException e){\n System.out.println(e);\n }\n return results;//default return.\n }", "void readData(File file) {\n // Common Place?--\n // Bool--\n List<DirectoryEntry>directoryEntries = new ArrayList<DirectoryEntry>();\n List<String>directoryTypes = new ArrayList<String>();\n try {\n FileInputStream excelFile = new FileInputStream(file);\n Workbook workbook = new XSSFWorkbook(excelFile);\n Sheet datatypeSheet = workbook.getSheetAt(0);\n Iterator<Row> iterator = datatypeSheet.iterator();\n\n int rowCnt=0;\n while (iterator.hasNext()) {\n Row currentRow = iterator.next();\n\n // skip the first 3 rows\n rowCnt++;\n if(rowCnt<=3) {\n continue ;\n }\n\n\n // iterate over cells on the row\n int columnCnt=0;\n String name = null;\n String phoneNumber = null;\n String starCodePattern = null;\n String categoryTab = null;\n\n Iterator<Cell> columnIterator = currentRow.iterator();\n while (columnIterator.hasNext()) {\n Cell currentCell = columnIterator.next();\n\n //getCellTypeEnum shown as deprecated for version 3.15\n //getCellTypeEnum ill be renamed to getCellType starting from version 4.0\n String value = \"\";\n if (currentCell.getCellTypeEnum() == CellType.STRING) {\n value = currentCell.getStringCellValue();\n } else if (currentCell.getCellTypeEnum() == CellType.NUMERIC) {\n value = \"\" + currentCell.getNumericCellValue();\n }\n\n columnCnt++;\n switch(columnCnt) {\n case 1:\n name = value;\n break;\n case 2:\n phoneNumber = value;\n break;\n case 3:\n starCodePattern = value;\n break;\n case 4:\n categoryTab = value;\n if( !directoryTypes.contains(categoryTab) ) {\n directoryTypes.add(categoryTab);\n }\n break;\n }\n }\n\n if(StringUtils.isNotBlank(name)) {\n directoryEntries.add(new DirectoryEntry(name, phoneNumber, starCodePattern, categoryTab));\n data.add(new DirectoryEntry(name, phoneNumber, starCodePattern, categoryTab));\n }\n }\n\n workbook.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public static ArrayList<ArrayList<String>> readGrid(String fileName) {\n\t\t\n\n\t\tFile input = new File(fileName);\n\t\tArrayList<ArrayList<String>> information = new ArrayList<ArrayList<String>>();\n\t\t\n\t\t\n\t\t//uses a simple try catch to read the file\n\t\ttry {\n\t\t\t\n\t\t\tScanner fileReader = new Scanner(input);\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tString rowInfo;\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\trowInfo = fileReader.nextLine();\n\t\t\t\trow = new ArrayList<String>(Arrays.asList(rowInfo.split(\",\")));\n\t\t\t\tinformation.add(row);\n\t\t\t}\n\t\t\t\n\t\t\tfileReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn information;\n\t}", "private static ArrayList<ArrayList<Integer>> populateListOfInputs() {\n\t\t\n\t\tArrayList<ArrayList<Integer>> listOflist = new ArrayList<ArrayList<Integer>>();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(filePath);\n\t\t\tBufferedReader br = new BufferedReader(fr);\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t// Remove all spaces, '[' and ']'\n\t\t\t\tString numbers = line.replace(\" \", \"\");\n\t\t\t\tnumbers = numbers.replace(\"[\", \"\");\n\t\t\t\tnumbers = numbers.replace(\"]\", \"\");\n\t\t\t\t\n\t\t\t\tif(line.equals(\"\")) {\n\t\t\t\t\t//if empty line leave it and continue the loop\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tString[] individualnums = numbers.split(\",\");\n\t\t\t\tfor (int i = 0; i < individualnums.length; i++) {\t\t\t\t\t\n\t\t\t\t\tlist.add(Integer.parseInt(individualnums[i]));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlistOflist.add(list);\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listOflist;\n\t}", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "static void ReadAndWriteDataSet(String folderName) throws IOException\n\t{\n\t\t\n\t\t String path = \"data\"+FS+\"data_stage_one\"+FS+folderName; // Folder path \n\t\t \n\t\t String filename, line;\n\t\t File folder = new File(path);\n\t\t File[] listOfFiles = folder.listFiles();\n\t\t BufferedReader br = null;\n\t\t for(int i=0; i < listOfFiles.length; i++)\n\t\t { \n\t\t\t System.out.println(listOfFiles[i].getName());\n\t\t\t filename = path+FS+listOfFiles[i].getName();\n\t\t\t try\n\t\t\t {\n\t\t\t\t br= new BufferedReader(new FileReader(new File(filename)));\n\t\t\t\t while((line = br.readLine())!= null)\n\t\t\t\t {\n\t\t\t\t\tfor(int j=0; j<prep.length; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t\t\twhile(st.hasMoreTokens())\n\t\t\t\t\t\t\tif(st.nextToken().equalsIgnoreCase(prep[j]))\n\t\t\t\t\t\t\t{\t//System.out.println(line);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(arr[j] == null)\n\t\t\t\t\t\t\t\t\tarr[j] = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarr[j].add(line.toLowerCase().replaceAll(\"\\\\p{Punct}\",\"\").trim().replaceAll(\"\\\\s+\", \" \"));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t catch(Exception e)\n\t\t\t {\n\t\t\t\t System.err.println(\"exception: \"+e.getMessage() );\n\t\t\t\t e.printStackTrace();\n\t\t\t\t System.exit(0);\n\t\t\t }\n\t\t\t finally\n\t\t\t {\n\t\t\t\t br.close();\n\t\t\t }\n\t\t }\n\t\t \n\t\t // Writes the entire arraylist(preposition wise seperated files)\n\t\t \n\t\t WriteSeperated(folderName);\n\t\t \n\t\t for(int i=0; i<prep.length; i++)\n\t\t {\n\t\t\t arr[i].clear();\n\t\t }\n\t\t \n\t}", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i);\n StringTokenizer star = new StringTokenizer(st, SEPARATOR);\n int movieID = Integer.parseInt(star.nextToken().trim());\n String email = star.nextToken().trim();\n String comment = star.nextToken().trim();\n Review review = new Review(movieID, email, comment);\n alr.add(review);\n }\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n return alr;\n }", "private ArrayList<ArrayList<String>> initArrArrList(ArrayList<String> packetNames) throws FileNotFoundException, IOException {\n ArrayList<ArrayList<String>> arrList=new ArrayList();\n LoadAndSave las=new LoadAndSave();\n for(int x=0;x<packetNames.size();x++) {\n las.load(packetNames.get(x));\n arrList.add(las.loader1);\n arrList.add(las.loader2);\n }\n return arrList;\n \n }", "@SuppressWarnings(\"unchecked\")\n public ArrBag( String infileName ) throws Exception\n {\n count = 0; // i.e. logical size, actual number of elems in the array\n BufferedReader infile = new BufferedReader( new FileReader( infileName ) );\n while ( infile.ready() )\n this.add( (T) infile.readLine() );\n infile.close();\n }", "public void readAlbumCollectionFromFile(Object fileName)\r\n {\r\n\t// Initialise variables to hold album title, artist and tracks\r\n\tList<Track> albumTracks = new ArrayList<>();\r\n\tString albumTitle = \"\";\r\n\tString albumArtist = \"\";\r\n\tString file = (String) fileName;\r\n\ttry\r\n\t{\r\n\t // Read in the album data file line by line\r\n\t BufferedReader buffer;\r\n\t buffer = new BufferedReader(new FileReader(file));\r\n\t String currentLine;\r\n\t Album album = null;\r\n\r\n\t while ((currentLine = buffer.readLine()) != null)\r\n\t {\r\n\t\t// Lines in the album data file begin with a letter when the line \r\n\t\t// contains an album title and artist, or an integer when it \r\n\t\t// contains track info\r\n\t\t\r\n\r\n\t\t// For each line, check whether first character is a letter. If so,\r\n\t\t// assume we are at a new Album title/artist\r\n\t\tif (Character.isLetter(currentLine.charAt(0)))\r\n\t\t{\r\n\t\t // Album title found\r\n\t\t \r\n\t\t // Get Album title and artist from the current line\r\n\t\t String[] split = currentLine.split(\":\");\r\n\t\t albumArtist = split[0].trim();\r\n\t\t albumTitle = split[1].trim();\r\n\r\n\r\n\t\t // check that current album does not exist in collection\r\n\t\t // try to get album by title\r\n\t\t Album albumByTitle = this.getAlbumByTitle(albumTitle);\r\n\t\t //only add album if albumByTitle returned null\r\n\t\t //TODO checking by artist will not work here as only first album by title found is returned. Need method to check for more albums of same name.\r\n\t\t if (albumByTitle == null || !albumByTitle.getAlbumArtist().equals(albumArtist))\r\n\t\t {\r\n\t\t\t// We are at the end of the current album. Therefore, create\r\n\t\t\t// the album and add it to the album collection\r\n\t\t\talbum = new Album(albumArtist, albumTitle);\r\n\t\t\tthis.addAlbum(album);\r\n\t\t }\r\n\t\t}\r\n\t\t// If first char is not a letter assume the line is a new track\r\n\t\telse if (album != null)\r\n\t\t{\r\n\t\t // Track found - get its title and duration\r\n\t\t String[] split = currentLine.split(\"-\", 2); // ', 2' prevents \r\n\t\t //splitting where '-' character occurs in title of the track\r\n\t\t String strTrackDuration = split[0].trim();\r\n\t\t String trackTitle = split[1].trim();\r\n\r\n\t\t // create duration object from string\r\n\t\t Duration trackDuration = new Duration(strTrackDuration);\r\n\t\t // create track object and add to album track list\r\n\t\t Track track = new Track(trackTitle, trackDuration);\r\n\t\t album.addTrack(track);\r\n\t\t}\r\n\t }\r\n\r\n\t} catch (IOException e)\r\n\t{\r\n\t // if error occurs, print the IOException\r\n\t System.out.println(e);\r\n\t}\r\n }", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void readRootData() {\n String[] temp;\n synchronized (this.mRootDataList) {\n this.mRootDataList.clear();\n File file = getRootDataFile();\n if (!file.exists()) {\n HiLog.error(RootDetectReport.HILOG_LABEL, \"readRootData file NOT exist!\", new Object[0]);\n return;\n }\n try {\n FileInputStream fileInputStream = new FileInputStream(file);\n InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, \"UTF-8\");\n BufferedReader reader = new BufferedReader(inputStreamReader);\n StringBuffer sb = new StringBuffer((int) MAX_STR_LEN);\n while (true) {\n int intChar = reader.read();\n if (intChar == -1) {\n break;\n } else if (sb.length() >= MAX_STR_LEN) {\n break;\n } else {\n sb.append((char) intChar);\n }\n }\n for (String str : sb.toString().split(System.lineSeparator())) {\n this.mRootDataList.add(str);\n }\n reader.close();\n inputStreamReader.close();\n fileInputStream.close();\n } catch (FileNotFoundException e) {\n HiLog.error(RootDetectReport.HILOG_LABEL, \"file root result list cannot be found\", new Object[0]);\n } catch (IOException e2) {\n HiLog.error(RootDetectReport.HILOG_LABEL, \"Failed to read root result list\", new Object[0]);\n }\n }\n }", "private static void readFile(String filePath) {\n\t\ttry {\n\t\t\tString [] data; // Array of strings that contains the different cells.\n\t\t\t\n\t\t\t// Open the file and read it.\n\t\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\t// Read the next line;\n\t\t\tdata = bufferedReader.readLine().split(ONE_SPACE);\n\t\t\t\n\t\t\t// Number of photos.\n\t\t\tSystem.out.println(\">> Reading number of photos...\");\n\t\t\tnumberPhotos = Integer.parseInt(data[0]);\n\t\t\t\n\t\t\tSystem.out.println(\">> Reading photos info...\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tfor (int i = 0; i < numberPhotos; i++) {\n\t\t\t\tdata = bufferedReader.readLine().split(ONE_SPACE);\n\t\t\t\t\n\t\t\t\tList<String> tagList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\tfor (int j = 2; j < data.length; j++) {\n\t\t\t\t\ttagList.add(data[j]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (data[0].toUpperCase().equals(\"V\")) {\n\t\t\t\t\tphotoList.add(new Photo(true, i, tagList));\n\t\t\t\t} else {\n\t\t\t\t\tslideList.add(new Slide(i, i, tagList));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Close the file.\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error while reading the input file: \" + e);\n\t\t}\n\t}", "private void readSavedFile() {\n\n String[] files = new String[0];\n \n // On récupère la liste des fichiers\n File file = new File(folderName);\n\n // check if the specified pathname is directory first\n if(file.isDirectory()){\n //list all files on directory\n files = file.list();\n }\n\n if (files != null) {\n for(String currentFile : files) {\n Vehicule voiture;\n try {\n FileInputStream fileIn = new FileInputStream(folderName + \"/\" + currentFile);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n voiture = (Vehicule) in.readObject();\n addVoitureToList(voiture);\n in.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"#Erreur : Impossible de récupérer l'objet \" + currentFile);\n c.printStackTrace();\n return;\n }\n }\n }\n }", "void readData(String fileName){ \r\n\t\ttry{ \r\n\t\t\tScanner sc = new Scanner(new File(fileName), \"UTF-8\");\r\n\t\t\t\r\n\t\t\t// input grid dimensions and simulation duration in timesteps\r\n\t\t\tdimt = sc.nextInt();\r\n\t\t\tdimx = sc.nextInt(); \r\n\t\t\tdimy = sc.nextInt();\r\n\t\t\t//System.out.println(dimt+\" \"+dimx + \" \"+dimy);\r\n\t\t\t// initialize and load advection (wind direction and strength) and convection\r\n\t\t\tadvection = new Vector[dimt][dimx][dimy];\r\n\t\t\tconvection = new float[dimt][dimx][dimy];\r\n\t\t\tfor(int t = 0; t < dimt; t++)\r\n\t\t\t\tfor(int x = 0; x < dimx; x++)\r\n\t\t\t\t\tfor(int y = 0; y < dimy; y++){\r\n\t\t\t\t\t\tadvection[t][x][y] = new Vector();\r\n\t\t\t\t\t\tadvection[t][x][y].x = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tadvection[t][x][y].y = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tconvection[t][x][y] = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\t//System.out.println(advection[t][x][y].x+\" \"+advection[t][x][y].y + \" \"+convection[t][x][y]);\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\tclassification = new int[dimt][dimx][dimy];\r\n\t\t\tsc.close(); \r\n\t\t} \r\n\t\tcatch (IOException e){ \r\n\t\t\tSystem.out.println(\"Unable to open input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (InputMismatchException e){ \r\n\t\t\tSystem.out.println(\"Malformed input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "private ArrayList<ArrayList<Integer>> processMatrixFile(String inputFile){\r\n\t\tArrayList<ArrayList<Integer>> matrix = new ArrayList<ArrayList<Integer>>();\r\n\t\trowToMutRateMap = new HashMap<Integer, Double>();\r\n\t\tcodeToMutRateMap = new HashMap<String, Double>();\r\n\t\tBufferedReader input = null;\r\n\t\ttry{\r\n\t\t\tinput = new BufferedReader(new FileReader(inputFile));\r\n\t\t\tprocessFirstLine(input.readLine());\r\n\t\t\tString currLine;\r\n\t\t\tint counter = 0;\r\n\t\t\twhile ((currLine = input.readLine()) != null) {\r\n\t\t\t\tmatrix.add(processLine(currLine, counter));\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Unforeseen IOException!\");\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (input != null) input.close();\r\n\t\t\t} catch (IOException e){\r\n\t\t\t\tSystem.out.println(\"Unforeseen IOException when closing file!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Transposed for the new type of input. CHECK FOR DOUBLE TRANSPOSITIONS.\r\n\t\tmatrix = transposeMatrix(matrix);\r\n\t\t//printMatrix(matrix);\r\n\t\t//System.out.println(rowToMutRateMap.toString());\r\n\t\treturn matrix;\r\n\t}", "private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "private void readInFile()\n {\n try\n {\n file = new File(fileAddress);//Create new file from the given file name\n fileScanner = new Scanner(file);//Create a file scanner to scan for all the integers\n }\n catch(FileNotFoundException e) //Throws a FileNotFountException if the given file name doesn't exist\n {\n System.out.println(\"The file \" + fileAddress + \" could not be found\");\n }\n\n int i = 0;\n\n for(int j = 0; j < 1000; j++)\n {\n integerList[j] = fileScanner.nextInt();//Store the next integer from the file in to the integerList\n\n //Check to see if the index is at the end of the array and the file still has more integers,\n //then we reallocate more space for the array.\n\n /* if(i > (integerList.length - 1) && fileScanner.hasNextInt())\n resizeArray();\n i++;*/\n }\n\n /*while(fileScanner.hasNextInt())//Iterate through the file until there are no more integers\n {\n integerList[i] = fileScanner.nextInt();//Store the next integer from the file in to the integerList\n\n //Check to see if the index is at the end of the array and the file still has more integers,\n //then we reallocate more space for the array.\n\n if(i >= (integerList.length - 1) && fileScanner.hasNextInt())\n resizeArray();\n i++;\n }*/\n\n fileScanner.close();//close the scanner\n }", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void getDataFromFile(){\n\n try\n {\n File file = new File( fileName );\n FileInputStream fis = new FileInputStream( file );\n DataInputStream in = new DataInputStream(fis);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String message = \"\", eachLine = \"\";\n\n while ((eachLine = br.readLine()) != null) {\n message += eachLine;\n }\n\n //System.out.println(message);\n StringTokenizer tokens = new StringTokenizer(message);\n\n //to set the coordination and demand of each customer\n size = Integer.parseInt(tokens.nextToken());\n processingTime = new double[size][size];\n\n for(int i = 0 ; i < size ; i ++ ){\n for(int j = 0 ; j < size ; j ++ ){\n processingTime[i][j] = Double.parseDouble(tokens.nextToken());\n }\n }\n } //end try\n catch( Exception e )\n {\n e.printStackTrace();\n System.out.println(e.toString());\n } // end catch\n //System.out.println( \"done\" );\n }", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void readData(String fileName) {\n\t\ttry {\n\t\t\tFile file = new File(fileName);;\n\t\t\tif( !file.isFile() ) {\n\t\t\t\tSystem.out.println(\"ERRO\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tBufferedReader buffer = new BufferedReader( new FileReader(file) );\n\t\t\t/* Reconhece o valor do numero de vertices */\n\t\t\tString line = buffer.readLine();\n\t\t\tStringTokenizer token = new StringTokenizer(line, \" \");\n\t\t\tthis.num_nodes = Integer.parseInt( token.nextToken() );\n\t\t\tthis.nodesWeigths = new int[this.num_nodes];\n\t\t\t\n\t\t\t/* Le valores dos pesos dos vertices */\n\t\t\tfor(int i=0; i<this.num_nodes; i++) { // Percorre todas a linhas onde seta valorado os pesos dos vertices\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se existe a linha a ser lida\n\t\t\t\t\tbreak;\n\t\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\t\tthis.nodesWeigths[i] = Integer.parseInt( token.nextToken() ); // Adiciona o peso de vertice a posicao do arranjo correspondente ao vertice\n\t\t\t}\n\t\t\t\n\t\t\t/* Mapeia em um array de lista todas as arestas */\n\t\t\tthis.edges = new LinkedList[this.num_nodes];\n\t\t\tint cont = 0; // Contador com o total de arestas identificadas\n\t\t\t\n\t\t\t/* Percorre todas as linhas */\n\t\t\tfor(int row=0, col; row<this.num_nodes; row++) {\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se ha a nova linha no arquivo\n\t\t\t\t\tbreak;\n\t\t\t\tthis.edges[row] = new LinkedList<Integer>(); // Aloca nova lista no arranjo, representado a linha o novo vertice mapeado\n\t\t\t\tcol = 0;\n\t\t\t\ttoken = new StringTokenizer(line, \" \"); // Divide a linha pelos espacos em branco\n\t\t\t\t\n\t\t\t\t/* Percorre todas as colunas */\n\t\t\t\twhile( token.hasMoreTokens() ) { // Enquanto ouver mais colunas na linha\n\t\t\t\t\tif( token.nextToken().equals(\"1\") ) { // Na matriz binaria, onde possui 1, e onde ha arestas\n//\t\t\t\t\t\tif( row != col ) { // Ignora-se os lacos\n\t\t\t\t\t\t\t//System.out.println(cont + \" = \" + (row+1) + \" - \" + (col+1) );\n\t\t\t\t\t\t\tthis.edges[row].add(col); // Adiciona no arranjo de listas a aresta\n\t\t\t\t\t\t\tcont++; // Incrementa-se o total de arestas encontradas\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.num_edges = cont; // Atribui o total de arestas encontradas\n\n\t\t\tif(true) {\n//\t\t\t\tfor(int i=0; i<this.num_nodes; i++) {\n//\t\t\t\t\tSystem.out.print(this.nodesWeigths[i] + \"\\n\");\n//\t\t\t\t}\n\t\t\t\tSystem.out.print(\"num edges = \" + cont + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tbuffer.close(); // Fecha o buffer\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}", "public static void readInstances(ArrayList<MISPData> data, String path_folder) throws IOException {\n\t\tfinal File folder = new File(path_folder);\r\n\t\tfor (final File fileEntry : folder.listFiles()) {//recorre los files de la carpeta folder\r\n\t\t\tif (fileEntry.isDirectory()) {\r\n\t\t\t\treadInstances(data, fileEntry.getPath());\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t//System.out.println(\"Leyendo: \" + fileEntry.getName());\r\n\t\t\t\tMISPData mispd = new MISPData();//Declara una nueva variable MISPData, con atributos vacios\r\n\t\t\t\treadFile(mispd.getInstance(), fileEntry.getPath());//metodo readFile, recibe un parametro instancia vacio y el nombre del file correspondiente a una instancia a leer \r\n\t\t\t\t//mispd.instance.getIndependenSet().Print_ListAdya();//Imprime por consola la lista enlazada\r\n\t\t\t\tdata.add(mispd);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "String [][] importData (String path);", "private int[][][] readData(int startElement, int startLine, int endElement, int endLine) throws AreaFileException {\r\n// int[][][]myData = new int[numBands][dir[AD_NUMLINES]][dir[AD_NUMELEMS]];\r\n int numLines = endLine - startLine;\r\n int numEles = endElement - startElement;\r\n// System.out.println(\"linePrefixLength: \" + linePrefixLength);\r\n int[][][] myData = new int[numBands][numLines][numEles];\r\n \r\n if (! fileok) {\r\n throw new AreaFileException(\"Error reading AreaFile data\");\r\n }\r\n\r\n short shdata;\r\n int intdata;\r\n boolean isBrit = \r\n areaDirectory.getCalibrationType().equalsIgnoreCase(\"BRIT\"); \r\n long newPos = 0;\r\n\r\n for (int i = 0; i<numLines; i++) {\r\n newPos = datLoc + linePrefixLength + lineLength * (i + startLine) + startElement * dir[AD_DATAWIDTH];\r\n position = newPos;\r\n// System.out.println(position);\r\n try {\r\n af.seek(newPos);\r\n } catch (IOException e1) {\r\n e1.printStackTrace();\r\n }\r\n \r\n for (int k=0; k<numEles; k++) {\r\n for (int j = 0; j<numBands; j++) {\r\n try {\r\n if (dir[AD_DATAWIDTH] == 1) {\r\n myData[j][i][k] = (int)af.readByte();\r\n if (myData[j][i][k] < 0 && isBrit) {\r\n myData[j][i][k] += 256;\r\n } \r\n// position = position + 1;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 2) {\r\n shdata = af.readShort();\r\n if (flipwords) {\r\n myData[j][i][k] = (int) ( ((shdata >> 8) & 0xff) | \r\n ((shdata << 8) & 0xff00) );\r\n } else {\r\n myData[j][i][k] = (int) (shdata);\r\n }\r\n// position = position + 2;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 4) {\r\n intdata = af.readInt();\r\n if (flipwords) {\r\n myData[j][i][k] = ( (intdata >>> 24) & 0xff) | \r\n ( (intdata >>> 8) & 0xff00) | \r\n ( (intdata & 0xff) << 24 ) | \r\n ( (intdata & 0xff00) << 8);\r\n } else {\r\n myData[j][i][k] = intdata;\r\n }\r\n// position = position + 4;\r\n } \r\n } \r\n catch (IOException e) {\r\n myData[j][i][k] = 0;\r\n }\r\n }\r\n }\r\n }\r\n return myData;\r\n }", "public HashMap<String, ArrayList<Trajectory>> readTrajectories(String trajFileName) {\n Scanner csv = null;\n HashMap<String, ArrayList<Trajectory>> trajectories = new HashMap<String, ArrayList<Trajectory>>();\n try {\n csv = new Scanner(new File(trajFileName));\n ArrayList<Trajectory> tj = new ArrayList<Trajectory>();\n String currentId = \"\";\n while (csv.hasNextLine()) {\n String[] line = csv.nextLine().split(\",\");\n line[0] = line[0].substring(6, line[0].length() - 1);\n String[] locs = line[0].split(\" \");\n\n if (currentId.equals(\"\")) // first device\n {\n currentId = line[1];\n } else if (!currentId.equals(line[1])) // we are looking at a new device, add arrayList to the map, reset arrayList\n {\n trajectories.put(currentId, tj);\n tj = new ArrayList<Trajectory>();\n currentId = line[1];\n }\n tj.add(new Trajectory(Double.parseDouble(locs[0]), Double.parseDouble(locs[1]), line[1], Double.parseDouble(line[2])));\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return trajectories;\n }", "public ArrayList<Room> readRoomFile(String path, HashMap<String, Item> itemStringHashMap, ArrayList<Suspect> suspectsArrayList)\n {\n // Create an empty items arrayList to be populated\n ArrayList<Room> roomsArray = new ArrayList<>();\n\n\n try(BufferedReader fileReader = new BufferedReader(new FileReader(path)))\n {\n // Reads file until the reader reaches the end of the file\n while((e = fileReader.readLine()) != null)\n {\n String[] info = e.split(\"/\");\n //Creates a new empty Room, itemArray, and exitArray every loop, and suspectArray that is specific to each room.\n Room r = new Room();\n ArrayList<Item> itemsArray = new ArrayList<>();\n ArrayList<String> exitsArray = new ArrayList<>();\n ArrayList<Suspect> suspectsArray = new ArrayList<>();\n\n // Loop to add items to rooms if item.location == room.getname\n for(Item item : itemStringHashMap.values())\n {\n // If the RoomName(Info[0]) is also the location of the Item Object\n // If they are equal, add the Item to the items in the room array.\n if(info[0].equalsIgnoreCase(item.getRoomLocation()))\n {\n itemsArray.add(item);\n }\n\n }\n\n //Takes the suspectArrayList of ALL suspects, add them to another suspect array specific to the room.\n for(Suspect s : suspectsArrayList)\n {\n // Checks suspect location, with room name to make sure suspects go in the right rooms.\n if(info[0].equalsIgnoreCase(s.getLocation()))\n {\n suspectsArray.add(s);\n }\n }\n\n // 2 Is the index where the room exits start on the file\n for(int i = 2; i < info.length; i++)\n {\n exitsArray.add(info[i]);\n }\n\n // Then construct the Room\n r.setName(info[0]);\n r.setDesc(info[1]);\n r.setContents(itemsArray);\n r.setSuspects(suspectsArray);\n\n //Convert array list to array as that's what is used in Room class\n String[] newArray = new String[exitsArray.size()];\n for(int i = 0; i < exitsArray.size(); i++)\n {\n newArray[i] = exitsArray.get(i);\n }\n r.setExits(newArray);\n\n //If the room is the bedroom, make inaccessible\n if(r.getName().equalsIgnoreCase(\"Bedroom\"))\n r.setType(RoomType.INACCESSIBLE);\n\n //Finally add the Room to an ArrayList of Rooms\n roomsArray.add(r);\n\n // Once the for loop ends, Room and itemsArray get renewed as empty.\n }\n }\n catch(IOException ex)\n {\n System.out.println(\"File not found\");\n }\n\n return roomsArray;\n }", "public void populateListFromFile() \n\t{\n\t\tBufferedReader bufferedReader = null;\n\t\tallQuestions = new ArrayList<ArrayList<String>>();\n\t\tquestionAndAnswers = new ArrayList<String>();\n\n\t\ttry {\n\t\t bufferedReader = new BufferedReader(new FileReader(\"questions.txt\"));\n\t\t String line = \"\";\n\t\t \n\t\t while ((line = bufferedReader.readLine()) != null) \n\t\t {\t\t\t \t\n\t\t \tif(line.length() > 0)\n\t\t \t\tquestionAndAnswers.add(line);\n\t\t \telse if (line.length() == 0)\n\t\t \t{\n\t\t \t\tallQuestions.add(questionAndAnswers);\n\t\t \t\tquestionAndAnswers = new ArrayList<String>();\n\t\t \t}\n\t\t } \n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t}", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }", "private static ArrayList<Ms3Person> readCSV(String fileName) {\r\n\t\tArrayList<Ms3Person> personsList = new ArrayList<>();\r\n\t\ttry (Scanner sc = new Scanner(new File(fileName))) {\r\n\t\t\t// skip the first line which is having column headers name\r\n\t\t\tsc.nextLine();\r\n\t\t\tint index = 1;\r\n\t\t\t// loop will go till end of file is reached ie.\r\n\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t// read single line at a time\r\n\t\t\t\tString personData = sc.nextLine();\r\n\t\t\t\tif(index >=5999)\r\n\t\t\t\t\tSystem.out.println(index+\" index\"+personData);\r\n\t\t\t\t//System.out.println(personData);\r\n\t\t\t\t//split the string by delimiter ,\r\n\t\t\t\tif(personData.length()>2) {\r\n\t\t\t\t\tString singlePersonRecord[] = personData.split(\",\");\r\n\t\t\t\t\t//the data we get is in form of sTring we need to convert\r\n\t\t\t\t\t//it to required data type for usage\r\n\t\t\t\t\tMs3Person person = convertDataToRequiredDataType(singlePersonRecord,index);\r\n\t\t\t\t\tif (person != null) {\r\n\t\t\t\t\t\t// add the person object in ArrayList\r\n\t\t\t\t\t\tpersonsList.add(person);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// bad data so create new file & write data\r\n // writing to the logfile\r\n \r\n \r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"index: \" + index);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tif(personData.length()<1) {//if no more line is there or only empty lines left\r\n\t\t\t\t\t\tSystem.out.println(\"finished reading the file...\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// if any exception arises while reading the file data that exception\r\n\t\t\t// will be caught in this block\r\n\t\t\tSystem.out.println(\"EXCEPTION: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn personsList;\r\n\t}", "public static List<File> splitData(String treeFileName, int foldSize) {\n ArrayList<File> tempFilePaths = new ArrayList<File>();\n Random random = new Random(100);\n for (int i = 0; i < foldSize+1; i++) {\n tempFilePaths.add(new File(String.valueOf(random.nextInt())));\n }\n URL treeResource = CommonUtils.class.getClassLoader().getResource(treeFileName);\n if (treeResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + treeFileName);\n return null;\n }\n\n URL trainResource = null;\n\n File treeFile = new File(treeResource.getPath());\n ArrayList<String> tempAttributeList = new ArrayList<String>();\n try {\n FileReader treeFileInputStream = new FileReader(treeFile);\n BufferedReader bufferedReader = new BufferedReader(treeFileInputStream);\n String line = null;\n String line1 = null;\n int count = 0;\n try {\n while ((line = bufferedReader.readLine()) != null) {\n if (count == 0) {\n trainResource = CommonUtils.class.getClassLoader().getResource(line);\n if (trainResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + line);\n return null;\n }\n FileReader fileReader = new FileReader(new File(trainResource.getPath()));\n BufferedReader bufferedReader1 = new BufferedReader(fileReader);\n int count1 = 0;\n while ((line1 = bufferedReader1.readLine()) != null) {\n if (count1 == 0) {\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tempFilePaths.get(0)));\n bufferedWriter.write(line1);\n bufferedWriter.write(\"\\n\");\n bufferedWriter.flush();\n bufferedWriter.close();\n }else {\n tempAttributeList.add(line1);\n }\n count1++;\n }\n }\n count++;\n logger.info(line);\n }\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n // now we randomly write data\n int fileIndex = 1;\n while(tempAttributeList.size()!=0) {\n int index0 = new Random(100).nextInt();\n if(index0<0){\n index0 = index0 * -1;\n }\n String s = tempAttributeList.get(index0 % tempAttributeList.size());\n\n try {\n BufferedWriter bufferedWriter1 = new BufferedWriter(new FileWriter(tempFilePaths.get(fileIndex),true));\n bufferedWriter1.write(s);\n bufferedWriter1.write(\"\\n\");\n bufferedWriter1.flush();\n bufferedWriter1.close();\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n tempAttributeList.remove(s);\n if(fileIndex==foldSize){\n fileIndex=1;\n }else{\n fileIndex++;\n }\n }\n return tempFilePaths;\n }", "private void readFileList() throws IOException {\n\t\tint entries = metadataFile.readInt();\n\n\t\tfor (int i = 0; i < entries; i++) {\n\t\t\tint hash = metadataFile.readInt();\n\t\t\tlong dataOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tlong dataSize = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathListIndex = metadataFile.readInt();\n\n\t\t\tlong position = metadataFile.getPosition();\n\t\t\tmetadataFile.setPosition(pathListOffset + 8 + (pathListIndex * 8));\n\n\t\t\tlong pathOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathSize = metadataFile.readInt();\n\n\t\t\tmetadataFile.setPosition(pathListOffset + pathOffset);\n\t\t\tString path = metadataFile.readString(pathSize).trim();\n\n\t\t\tif (hash == hash(path)) \n\t\t\t\tfileEntries.add(new RAFFileEntry(dataOffset, dataSize, path));\n\t\t\telse\n\t\t\t\tthrow new IOException(\"Invalid hash for item '\" + path + \"'.\");\n\n\t\t\tmetadataFile.setPosition(position);\n\t\t}\n\t}", "private List<String> init(Path path) throws Exception {\n List<String> lines = Files.readAllLines(path);\n if (lines.size() != 0) {\n int numberOfFields = Integer.parseInt(lines.get(0));\n fillFieldsList(lines, numberOfFields);\n fillPlayersList(lines, numberOfFields);\n } else {\n throw new FileEmptyException();\n }\n return lines;\n }", "protected List<List<String>> readFile() throws FileNotFoundException {\n\n List<List<String>> list = new ArrayList<>();\n\n File dire = new File(dir);\n File file = new File(dire, filename);\n\n try (Scanner in = new Scanner(file)) {\n\n while (in.hasNextLine()) {\n \n String line = in.nextLine();\n \n String temp[] = line.split(delimiter);\n \n list.add(Arrays.asList(temp));\n }\n in.close();\n } catch (IOException e) {\n System.out.println(\"Error reading file!\");\n }\n return list;\n }", "private ArrayList<String> getArrayList() throws IOException {\n long jumpTo = 0;\n ArrayList<String> arrayList = new ArrayList<String>();\n arrayList.add(readStringUntil0x());\n boolean notFound = true;\n while (notFound == true) {\n ins.skip(jumpTo);\n String actIndex = readStringUntil0x();\n long lowerIndex = readJumpOffset();\n long upperIndex = readJumpOffset();\n if ((searchIndex.compareTo(actIndex) < 0) && (lowerIndex > 0)) {\n jumpTo = lowerIndex - 1;\n } else if ((searchIndex.compareTo(actIndex) > 0) && upperIndex > 0) {\n jumpTo = upperIndex - 1;\n } else if (searchIndex.compareTo(actIndex) == 0) {\n notFound = false;\n // reading all the found lines\n actIndex = readStringUntil0x();\n while (!actIndex.equalsIgnoreCase(\"\")) {\n arrayList.add(actIndex);\n actIndex = readStringUntil0x();\n }\n } else {\n notFound = false;\n arrayList = null;\n }\n }\n return arrayList;\n }", "private HashMap<String, SubsetElement> LoadFile(String fileName) {\n final HashMap<String, SubsetElement> tempMap = new HashMap<String, SubsetElement>();\r\n try {\r\n final Scanner input = new Scanner(new File(fileName));\r\n String line = input.nextLine();\r\n final String[] headers = line.split(\"\\t\");\r\n\r\n Integer i = 1;\r\n while (input.hasNext()) {\r\n line = input.nextLine();\r\n final String[] values = line.split(\"\\t\");\r\n // if(values.length!=headers.length){\r\n // System.out.println(\"Missing values in data row \"+ i);\r\n // break;\r\n // }\r\n\r\n final SubsetElement element = new SubsetElement(headers,\r\n values, this.subsetIdName, this.conceptIdName);\r\n tempMap.put(element.getHash(), element);\r\n i++;\r\n }\r\n input.close();\r\n\r\n } catch (final FileNotFoundException e) {\r\n System.err.println(\"Unable to open and parse file \" + fileName);\r\n e.printStackTrace();\r\n }\r\n\r\n return tempMap;\r\n }", "public static ArrayList<Data> getDataSet(String fileName) {\n ArrayList<Data> dataset = new ArrayList<>();\n Scanner input = new Scanner(Main.class.getResourceAsStream(fileName));\n input.nextLine();\n String line = null;\n int size = 0;\n\n while (input.hasNextLine()) {\n String str = null;\n\n line = input.nextLine();\n line = line.replace(\" \", \"\");\n\n size = line.length() - 1;\n Data data = new Data(size);\n\n for (int i = 0; i < line.length() - 1; i++) {\n data.variables[i] = Character.getNumericValue(line.charAt(i));\n }\n data.setOutput(Character.getNumericValue(line.charAt(size)));\n\n dataset.add(data);\n }\n\n dataset.forEach((data) -> {\n System.out.println(data.printVariables() + \" \" + data.getOutput());\n });\n System.out.println(\"Data loaded\");\n COND_LEN = size;\n GENE_SIZE = (COND_LEN + 1) * NUM_RULES;\n return dataset;\n }", "public static ArrayList<Stue> getStueData() {\n ArrayList<Stue> fillArray = new ArrayList<>();\n\n try {\n File fileIn = new File(\"Stuedata.txt\");\n\n Scanner in = new Scanner(fileIn);\n\n while (in.hasNext()) {\n Stue stueData = new Stue();\n stueData.idRum = in.next();\n stueData.navn = in.next();\n stueData.motto = in.next();\n stueData.etage = in.next();\n fillArray.add(stueData);\n }\n in.close(); //WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY?\n } catch (IOException i) {\n i.printStackTrace();\n System.exit(0);\n }\n return fillArray;\n }", "public String[][] loadData(String fileName)\n{\n String[] rows = loadStrings(fileName);\n String[][] dataa = new String [24][7];\n int i = 0;\n for (String row : rows) \n {\n String[] columns = row.split(\",\");\n if (columns.length >= 7) \n {\n for (int j = 0; j < 7; j=j+1)\n {\n dataa [i][j]=columns[j];\n }\n i = i +1;\n }\n }\n return dataa;\n}", "private void generarListaData() throws FileStructureException {\n CarmasTimbresTemp timbre = null;\n HSSFWorkbook workbook = null;\n HSSFSheet sheet = null;\n Iterator<Row> rowIterator = null;\n Row row = null;\n DataFormatter formatter = new DataFormatter(Locale.getDefault());\n listaData.clear();\n InputStream inputStream = null;\n try {\n if (this.file != null) {\n inputStream = this.file.getInputStream();\n workbook = new HSSFWorkbook(inputStream);\n sheet = workbook.getSheetAt(0);\n rowIterator = sheet.iterator();\n while (rowIterator.hasNext()) {\n row = rowIterator.next();\n if (row.getRowNum() == 0) {\n validarEstructura(row);\n } else if (row != null) {\n if (!isEmptyRow(row)) {\n timbre = new CarmasTimbresTemp();\n timbre.setCajero(formatter.formatCellValue(row.getCell(0)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setProvdiasgteMaq(formatter.formatCellValue(row.getCell(1)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setProvdiasgteLin(formatter.formatCellValue(row.getCell(2)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setDiferencias(formatter.formatCellValue(row.getCell(3)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setObservacion(row.getCell(4) == null ? \"\" : row.getCell(4).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setOcca(formatter.formatCellValue(row.getCell(5)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setAumento(formatter.formatCellValue(row.getCell(6)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setDisminucion(formatter.formatCellValue(row.getCell(7)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setSobrante(formatter.formatCellValue(row.getCell(8)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setFaltante(formatter.formatCellValue(row.getCell(9)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setNovedad(row.getCell(10) == null ? \"\" : row.getCell(10).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setAsignadoA(row.getCell(11) == null ? \"\" : row.getCell(11).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setProveedor(row.getCell(12) == null ? \"\" : row.getCell(12).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setClasificacion(row.getCell(13) == null ? \"\" : row.getCell(13).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setTipificacionTransportadora(row.getCell(14) == null ? \"\" : row.getCell(14).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n listaData.add(timbre);\n }\n }\n }\n }\n } catch (OfficeXmlFileException ex) {\n abrirModal(\"SARA\", \"Formato Invalido\", ex);\n } catch (IOException ex) {\n abrirModal(\"SARA\", \"Seleccione archivo\", ex);\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException ex) {\n Logger.getLogger(CargarTimbresMasivosBean.class.getName()).log(Level.SEVERE, null, ex);\n inputStream = null;\n }\n }\n }\n }", "public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void readFile()\n {\n try {\n fileName = JOptionPane.showInputDialog(null,\n \"Please enter the file you'd like to access.\"\n + \"\\nHint: You want to access 'catalog.txt'!\");\n \n File aFile = new File(fileName);\n Scanner myFile = new Scanner(aFile);\n \n String artist, albumName; \n while(myFile.hasNext())\n { //first we scan the document\n String line = myFile.nextLine(); //for the next line. then we\n Scanner myLine = new Scanner(line); //scan that line for our info.\n \n artist = myLine.next();\n albumName = myLine.next();\n ArrayList<Track> tracks = new ArrayList<>();\n \n while(myLine.hasNext()) //to make sure we get all the tracks\n { //that are on the line.\n Track song = new Track(myLine.next());\n tracks.add(song);\n }\n myLine.close();\n Collections.sort(tracks); //sort the list of tracks as soon as we\n //get all of them included in the album.\n Album anAlbum = new Album(artist, albumName, tracks);\n catalog.add(anAlbum);\n }\n myFile.close();\n }\n catch (NullPointerException e) {\n System.err.println(\"You failed to enter a file name!\");\n System.exit(1);\n }\n catch (FileNotFoundException e) {\n System.err.println(\"Sorry, no file under the name '\" + fileName + \"' exists!\");\n System.exit(2);\n }\n }", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public ArrayList<Root> separateRoots(String fileName) throws FileNotFoundException {\n\t\t//TODO: Make this a constructor so that roots are automatically separated when a Separation object is created.\n\t\treadIn(fileName);\n\t\tsplitLevels();\n\t\tcombineSeeds();\n\t\tremoveSmallRoots(20); //Change this number to change size of \"small\" root\n\t\treturn allRoots;\n\t}", "public static void processData() {\n\t\tString dirName = \"C:\\\\research_data\\\\mouse_human\\\\homo_b47_data\\\\\";\r\n\t//\tString GNF1H_fName = \"GNF1H_genes_chopped\";\r\n\t//\tString GNF1M_fName = \"GNF1M_genes_chopped\";\r\n\t\tString GNF1H_fName = \"GNF1H\";\r\n\t\tString GNF1M_fName = \"GNF1M\";\r\n\t\tString mergedValues_fName = \"GNF1_merged_expression.txt\";\r\n\t\tString mergedPMA_fName = \"GNF1_merged_PMA.txt\";\r\n\t\tString discretizedMI_fName = \"GNF1_discretized_MI.txt\";\r\n\t\tString discretizedLevels_fName = \"GNF1_discretized_levels.txt\";\r\n\t\tString discretizedData_fName = \"GNF1_discretized_data.txt\";\r\n\t\t\r\n\t\tboolean useMotifs = false;\r\n\t\tMicroArrayData humanMotifs = null;\r\n\t\tMicroArrayData mouseMotifs = null;\r\n\t\t\r\n\t\tMicroArrayData GNF1H_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1H_PMA = new MicroArrayData();\r\n\t\tGNF1H_PMA.setDiscrete();\r\n\t\tMicroArrayData GNF1M_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1M_PMA = new MicroArrayData();\r\n\t\tGNF1M_PMA.setDiscrete();\r\n\t\t\r\n\t\ttry {\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma\"); */\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.txt.homob44\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.txt.homob44\"); */\r\n\t\t\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.sn.txt\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.sn.txt\");\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\tif (useMotifs) {\r\n\t\t\thumanMotifs = new MicroArrayData();\r\n\t\t\tmouseMotifs = new MicroArrayData();\r\n\t\t\tloadMotifs(humanMotifs,GNF1H_value.geneNames,mouseMotifs,GNF1M_value.geneNames);\r\n\t\t}\r\n\t\t\r\n\t\t// combine replicates in PMA values\r\n\t\tint[][] H_PMA = new int[GNF1H_PMA.numRows][GNF1H_PMA.numCols/2];\r\n\t\tint[][] M_PMA = new int[GNF1M_PMA.numRows][GNF1M_PMA.numCols/2];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\tint v = 0;\r\n\t\tk = 0;\r\n\t\tj = 0;\r\n\t\twhile (j<GNF1H_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<H_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1H_PMA.dvalues[i][j] > 0 & GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0 | GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tH_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tj = 0;\r\n\t\tk = 0;\r\n\t\twhile (j<GNF1M_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<M_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1M_PMA.dvalues[i][j] > 0 & GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0 | GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tM_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tint numMatched = 31;\r\n\t\t\r\n\t/*\tGNF1H_value.numCols = numMatched;\r\n\t\tGNF1M_value.numCols = numMatched; */\r\n\t\t\r\n\t\tint[][] matchPairs = new int[numMatched][2];\r\n\t\tfor(i=0;i<numMatched;i++) {\r\n\t\t\tmatchPairs[i][0] = i;\r\n\t\t\tmatchPairs[i][1] = i + GNF1H_value.numCols;\r\n\t\t}\r\n\t\t\r\n\t//\tDiscretizeAffyData H_discretizer = new DiscretizeAffyData(GNF1H_value.values,H_PMA,0);\r\n\t//\tH_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1H_value.values,H_PMA,GNF1H_value.numCols);\r\n\t\t\r\n\t//\tDiscretizeAffyData M_discretizer = new DiscretizeAffyData(GNF1M_value.values,M_PMA,0);\r\n\t//\tM_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1M_value.values,M_PMA,GNF1M_value.numCols);\r\n\t\t\r\n\t\tdouble[][] mergedExpression = new double[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[][] mergedPMA = new int[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[] species = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1H_value.values[i],0,mergedExpression[i],0,GNF1H_value.numCols);\r\n\t\t\tSystem.arraycopy(H_PMA[i],0,mergedPMA[i],0,GNF1H_value.numCols);\t\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1M_value.values[i],0,mergedExpression[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t\tSystem.arraycopy(M_PMA[i],0,mergedPMA[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate experiment and gene names\r\n\t\tfor (i=0;i<GNF1H_value.numCols;i++) {\r\n\t\t\tGNF1H_value.experimentNames[i] = \"h_\" + GNF1H_value.experimentNames[i];\r\n\t\t\tspecies[i] = 1;\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numCols;i++) {\r\n\t\t\tGNF1M_value.experimentNames[i] = \"m_\" + GNF1M_value.experimentNames[i];\r\n\t\t\tspecies[i+GNF1H_value.numCols] = 2;\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedExperimentNames = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\tSystem.arraycopy(GNF1H_value.experimentNames,0,mergedExperimentNames,0,GNF1H_value.numCols);\r\n\t\tSystem.arraycopy(GNF1M_value.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\tif (useMotifs) {\r\n\t\t\tSystem.arraycopy(humanMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols,humanMotifs.numCols);\r\n\t\t\tSystem.arraycopy(mouseMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols+humanMotifs.numCols,mouseMotifs.numCols);\r\n\t\t\tfor (i=0;i<humanMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols] = 3;\r\n\t\t\t}\r\n\t\t\tfor (i=0;i<mouseMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols] = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedGeneNames = new String[GNF1H_value.numRows];\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tmergedGeneNames[i] = GNF1H_value.geneNames[i] + \"|\" + GNF1M_value.geneNames[i];\r\n\t\t}\r\n\t\t\r\n\t\tint[] filterList = new int[GNF1M_value.numRows];\r\n\t\tint numFiltered = 0;\r\n\t\tdouble maxExpressedPercent = 1.25;\r\n\t\tint maxExpressed_H = (int) Math.floor(maxExpressedPercent*((double) GNF1H_value.numCols));\r\n\t\tint maxExpressed_M = (int) Math.floor(maxExpressedPercent*((double) GNF1M_value.numCols));\r\n\t\tint numExpressed_H = 0;\r\n\t\tint numExpressed_M = 0;\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tnumExpressed_H = 0;\r\n\t\t\tfor (j=0;j<GNF1H_value.numCols;j++) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1H_value.values[i][j])) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t\t\tnumExpressed_H++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnumExpressed_M = 0;\r\n\t\t\tfor (j=0;j<GNF1M_value.numCols;j++) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1M_value.values[i][j])) {\r\n\t\t\t\t\tnumExpressed_M++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (numExpressed_M >= maxExpressed_M | numExpressed_H >= maxExpressed_H) {\r\n\t\t\t\tfilterList[i] = 1;\r\n\t\t\t\tnumFiltered++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tGNF1H_value = null;\r\n\t\tGNF1H_PMA = null;\r\n\t\tGNF1M_value = null;\r\n\t\tGNF1M_PMA = null;\r\n\t\t\r\n\t\tdouble[][] mergedExpression2 = null;\r\n\t\tif (numFiltered > 0) {\r\n\t\t\tk = 0;\r\n\t\t\tint[][] mergedPMA2 = new int[mergedPMA.length-numFiltered][mergedPMA[0].length];\r\n\t\t\tif (!useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length];\r\n\t\t\t} else {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t}\r\n\t\t\tString[] mergedGeneNames2 = new String[mergedGeneNames.length-numFiltered];\r\n\t\t\tfor (i=0;i<filterList.length;i++) {\r\n\t\t\t\tif (filterList[i] == 0) {\r\n\t\t\t\t\tmergedPMA2[k] = mergedPMA[i];\r\n\t\t\t\t\tif (!useMotifs) {\r\n\t\t\t\t\t\tmergedExpression2[k] = mergedExpression[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[k],0,mergedExpression[i].length);\r\n\t\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[k],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[k],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmergedGeneNames2[k] = mergedGeneNames[i];\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmergedPMA = mergedPMA2;\r\n\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\tmergedGeneNames = mergedGeneNames2;\r\n\t\t} else {\r\n\t\t\tif (useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t\tfor (i=0;i<mergedExpression.length;i++) {\r\n\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[i],0,mergedExpression[i].length);\r\n\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[i],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[i],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t}\r\n\t\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tDiscretizeAffyPairedData discretizer = new DiscretizeAffyPairedData(mergedExpression,mergedPMA,matchPairs,20);\r\n\t\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = discretizer.expression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = discretizer.numExperiments;\r\n\t\tmergedData.numRows = discretizer.numGenes;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tdiscretizer.discretizeDownTree(dirName+discretizedMI_fName);\r\n\t\t\tdiscretizer.mergeDownLevels(3,dirName+discretizedLevels_fName);\r\n\t\t\tdiscretizer.transposeDExpression();\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t\tmergedData.dvalues = discretizer.dExpression;\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t/*\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = mergedExpression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = mergedExpression[0].length;\r\n\t\tmergedData.numRows = mergedExpression.length;\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t//\tmergedData.dvalues = simpleDiscretization(mergedExpression,mergedPMA);\r\n\t\t\tmergedData.dvalues = simpleDiscretization2(mergedExpression,species);\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} */\r\n\t\t\r\n\t}", "public Map<String, List<String>> processIncidenceFile(String fileName) throws AggregateFileInitializationException {\n \t\t\tFile file = new File(fileName);\n \t\t\tHashMap<String, List<String>> data = new HashMap<String,List<String>>();\n \t\t\t\n \t\t\ttry {\n \t\t String record; \n \t\t String header;\n \t\t int recCount = 0;\n \t\t List<String> headerElements = new ArrayList<String>();\n \t\t FileInputStream fis = new FileInputStream(file); \n \t\t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t\t \n \t\t //\n \t\t // Read the file header\n \t\t //\n \t\t if ( (header=d.readLine()) != null ) { \n \t\t \t\n \t\t\t StringTokenizer st = new StringTokenizer(header );\n \t\t\t \n \t\t\t while (st.hasMoreTokens()) {\n \t\t\t \t String val = st.nextToken(\",\");\n \t\t\t \t headerElements.add(val.trim());\n \t\t\t }\n \t\t } // read the header\n \t\t /////////////////////\n \t\t \n \t\t // set up the empty lists\n \t\t int numColumns = headerElements.size();\n \t\t for (int i = 0; i < numColumns; i ++) {\n \t\t \tString key = headerElements.get(i);\n \t\t \tdata.put(key, new ArrayList<String>());\n \t\t }\n \t\t \n \t\t // Here we check the type of the data file\n \t\t // by checking the header elements\n \t\t \n \t\t \n \t\t \n \t\t \n \t //////////////////////\n \t // Read the data\n \t //\n \t while ( (record=d.readLine()) != null ) { \n \t recCount++; \n \t \n \t StringTokenizer st = new StringTokenizer(record );\n \t int tcount = 0;\n \t\t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\t\t(data.get(key)).add(val.trim());\n \t\t\t\t\t\ttcount ++;\n \t\t\t\t\t}\n \t\t\t\t} // while file has data\n \t } catch (IOException e) { \n \t // catch io errors from FileInputStream or readLine()\n \t \t Activator.logError(\" IOException error!\", e);\n \t \t throw new AggregateFileInitializationException(e);\n \t }\n \t return data;\n \t\t }", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "private void readFromInternalStorage() {\n ArrayList<GeofenceObjects> returnlist = new ArrayList<>();\n if (!isExternalStorageReadable()) {\n System.out.println(\"not readable\");\n } else {\n returnlist = new ArrayList<>();\n try {\n FileInputStream fis = openFileInput(\"GeoFences\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n returnlist = (ArrayList<GeofenceObjects>) ois.readObject();\n ois.close();\n System.out.println(returnlist);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n currentList = returnlist;\n }", "public void readCsvFile(String path) {\n\n // make sure the ArrayList is empty before you start recording the data\n if (!Records.isEmpty()) {\n Records.clear();\n }\n try {\n // read data from the .csv file\n System.out.println(\"Reading array list....\");\n BufferedReader br = new BufferedReader(new FileReader(path));\n // Skip the first line\n String line = br.readLine();\n while ((line = br.readLine()) != null) {\n\n String[] fields = line.split(\",\");\n Record record = new Record( // the fields in .csv are jumbled\n Integer.parseInt(fields[2]), // skierID\n Integer.parseInt(fields[3]), // liftID\n Integer.parseInt(fields[1]), // dayNum\n Integer.parseInt(fields[4])); // time\n Records.add(record);\n }\n\n br.close();\n System.out.println(\"!!Reading completed!!\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "private void ReadFile (String filename)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner input = new Scanner(new FileReader(filename));\n\t\t\tScanner line = new Scanner(input.nextLine());\n\t\t\twhile (input.hasNextLine() || line.hasNext())\n\t\t\t{\n\t\t\t\tPolygon polygon = new Polygon ();\n\t\t\t\twhile (line.hasNextDouble())\n\t\t\t\t{\n\t\t\t\t\tdouble tmpX = line.nextDouble(),\n\t\t\t\t\t\t\ttmpY = line.nextDouble(),\n\t\t\t\t\t\t\ttmpZ = line.nextDouble();\n\t\t\t\t\tpolygon.add(new Vec4(tmpX, tmpY, tmpZ));\n\t\t\t\t}\n\t\t\t\tif (input.hasNextLine())\n\t\t\t\t{\n\t\t\t\t\tline = new Scanner(input.nextLine());\n\t\t\t\t}\n\t\t\t\tobject.add(polygon);\n\t\t\t}\n\t\t\tinput.close();\n\t\t\tline.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static List<List<String>> getCSV2(String filepath) { //this method words the best\r\n List<List<String>> records = new ArrayList<>();\r\n try (BufferedReader br = new BufferedReader(new FileReader(filepath))) {\r\n String line;\r\n int lineCounter = 1; // this is to stop it from reading lines after the data is done\r\n while ((line = br.readLine()) != null) {\r\n String[] values = line.split(\",\");\r\n if (values.length < 2 && lineCounter > 14) { // <----- the 14th line is chosen arbitrarily.\r\n System.out.println(\"end of file\");\r\n break;\r\n } else {\r\n records.add(Arrays.asList(values));\r\n lineCounter++;\r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return records;\r\n }", "public String[] buildEntries(String a) {\n try {\n File file = new File(a);\n Scanner input = new Scanner(file);\n while (input.hasNextLine()) {\n String line=input.nextLine();\n String name=line.substring(line.indexOf(\"\\t\"));\n name=name.substring(0,name.lastIndexOf(\"H\"));\n name=name.substring(0,name.lastIndexOf(\"\\t\"));\n int entries=Integer.parseInt(line.substring(line.lastIndexOf(\"\\t\")+1,line.lastIndexOf(\"E\")));\n while (entries>0) {\n entryList.add(name);\n entries--;\n System.out.println(\"Added: \"+name);\n }\n}\n return drawBE(entryList,a);\n }\n catch(FileNotFoundException b) {\n System.out.println(\"Error, no entries\"); \n String ret[] = new String[6];\n ret[0]=\"NOFILE\";\n return ret;\n }\n }", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static ArrayList<String> read(String fileName, boolean next) {\n\t\t\n\n\t\tFile input = new File(fileName);\n\t\tArrayList<String> information = new ArrayList<String>();\n\t\t\n\t\t\n\t\t//uses a simple try catch to read the file\n\t\ttry {\n\t\t\t\n\t\t\tScanner fileReader = new Scanner(input);\n\t\t\t\n\t\t\tif(next) //if reading by word, the ArrayList will contain info by word\n\t\t\t\twhile(fileReader.hasNext()) \n\t\t\t\t\tinformation.add(fileReader.next());\n\t\t\t\t\n\t\t\telse //otherwise the ArrayList will contain info by lines\n\t\t\t\twhile(fileReader.hasNextLine())\n\t\t\t\t\tinformation.add(fileReader.nextLine());\n\t\t\t\n\t\t\tfileReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn information;\n\t}", "void populateArray () {\r\n\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream (\"Bank.dat\");\r\n\t\t\tdis = new DataInputStream (fis);\r\n\t\t\t//Loop to Populate the Array.\r\n\t\t\twhile (true) {\r\n\t\t\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\t\t\trecords[rows][i] = dis.readUTF ();\r\n\t\t\t\t}\r\n\t\t\t\trows++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\ttotal = rows;\r\n\t\t\tif (total == 0) { }\r\n\t\t\telse {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdis.close();\r\n\t\t\t\t\tfis.close();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exp) { }\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public ArrayList<?> getItems(String filename){\n \n try {\n FileInputStream fis = new FileInputStream(filename);\n ObjectInputStream ois = new ObjectInputStream(fis);\n items = (ArrayList<?>) ois.readObject();\n ois.close();\n \n \n }catch(IOException e){\n System.out.println(e);\n }catch(ClassNotFoundException e){\n System.out.println(e);\n }\n \n return items;\n }", "public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }", "private static int[][] readInput() throws Exception {\r\n\t\t\r\n\t\t// Read the input into a array of strings.\r\n\t\tList<String> inputLines = new ArrayList<String>();\r\n\t\tString currLine = \"\";\r\n\t\ttry {\r\n\t\t\t// Read the content of the file into an array of strings.\r\n\t\t\tScanner myScanner = new Scanner(new File(myFileName));\r\n\t\t\twhile((currLine = myScanner.nextLine()) != null) {\r\n\t\t\t\t\r\n\t\t\t\tinputLines.add(currLine);\r\n\r\n\t\t\t\tif (!myScanner.hasNextLine()) {\r\n\t\t\t\t\tmyScanner.close();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Based out of the number of lines in the input file\r\n\t\t\t// create a nXn matrix.\r\n\t\t\tint max = inputLines.size();\r\n\t\t\tint[][] data = new int[max][max];\r\n\t\t\tint count = 0;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\tfor (int j = 0; j < max; j++) {\r\n\t\t\t\t\tdata[i][j] = INFINITY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Populate the nXn matrix.\r\n\t\t\tfor(int i = 0; i < inputLines.size(); i++) {\r\n\t\t\t\tcurrLine = inputLines.get(i);\r\n\t\t\t\tString[] splitLine = currLine.split(\"\\t\");\r\n\t\t\t\tfor(int j = 0; j < splitLine.length; j++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdata[count][j] = Integer.parseInt(splitLine[j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (NumberFormatException ex) { \r\n\t\t\t\t\t\t//do nothing\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\t\t\t\r\n\t\t\treturn data;\r\n\t\t\t\r\n\t\t} catch(Exception ex) {\r\n\t\t\tSystem.out.println(ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public static ArrayList<Player> readPlayersFromFile() \r\n {\r\n //Inisialize Arraylist \r\n ArrayList<Player> players = new ArrayList<Player>();\r\n //Inisialize FileInputStream\r\n FileInputStream fileIn = null;\r\n\r\n try \r\n {\r\n //Establish connection to file \r\n fileIn = new FileInputStream(\"players.txt\");\r\n while (true) \r\n {\r\n //Create an ObjectOutputStream \r\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\r\n //Read a Player object from the file and add it to the ArrayList\r\n players.add((Player)objectIn.readObject());\r\n }//end while\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e);\r\n }\r\n finally \r\n {\r\n usernamesTaken.clear();\r\n\r\n for(int i = 0; i < players.size(); i++)\r\n {\r\n usernamesTaken.add(players.get(i).getUsername());\r\n }//end for\r\n\r\n //Try to close the file and return the ArrayList\r\n try\r\n {\r\n //Check if the end of the file is reached\r\n if (fileIn != null)\r\n { \r\n //Close the file \r\n fileIn.close();\r\n //Return the ArrayList of players\r\n return players;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e)\r\n }//end try \r\n\r\n //Return null if there is an excetion \r\n return null;\r\n }//end try \r\n }", "private void loadDataFromMemory(String filename){\n shoppingList.clear();\n new ReadFromMemoryAsync(filename, getCurrentContext(), new ReadFromMemoryAsync.AsyncResponse(){\n\n @Override\n public void processFinish(List<ShoppingItem> output) {\n shoppingList.addAll(output);\n sortItems();\n }\n }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n// for (ShoppingItem item: items) {\n// shoppingList.add(item);\n// }\n// sortItems();\n }", "public static void readfile(String FILENAME) {\n\t\tString[] parts = null;\n\t\t// Initialising s as 9100 since the cardinality for a src is 9060\n\t\tint s = 2500;\n\t\t// Choosing m\n\t\tint m = 500000000;\n\t\tArrayList<ArrayList<Integer>> UniversalHashList = new ArrayList<ArrayList<Integer>>();\n\t\tArrayList<ArrayList<Integer>> XsrcMasterList = new ArrayList<ArrayList<Integer>>();\n\t\tList masterDstList = new ArrayList<ArrayList<String>>();\n\t\tString[] BitArray = new String[m];\n\t\tPrintStream out = null;\n\t\ttry {\n\t\t\tout = new PrintStream(new FileOutputStream(\"output_virbitmap.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString src = null;\n\t\tHashMap<String, List> srcDstMap = new HashMap<String, List>();\n\t\tArrayList<Integer> R = new ArrayList<Integer>();\n\t\tR = genRandomArray(s);\n\t\t// initializing bit array\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tBitArray[i] = \"False\";\n\t\t}\n\t\t// reading input file and writing to HashMap<src,dstlist>\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(FILENAME))) {\n\n\t\t\tString sCurrentLine;\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tparts = sCurrentLine.trim().split(\"\\\\s+\");\n\t\t\t\tsrc = parts[0];\n\t\t\t\tString dst = parts[1];\n\t\t\t\tif (!srcDstMap.containsKey(src)) {\n\t\t\t\t\tArrayList<String> dstList = new ArrayList<String>();\n\t\t\t\t\tdstList.add(dst);\n\t\t\t\t\tsrcDstMap.put(src, dstList);\n\t\t\t\t\t// hashing(B,convertIPAddress(tokens[0]));\n\t\t\t\t} else\n\t\t\t\t\tsrcDstMap.get(src).add(dst);\n\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> masterHashList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> XsrcList = new ArrayList<Integer>();\n\t\t\tUniversalHashList.add(masterHashList);\n\t\t\tXsrcMasterList.add(XsrcList);\n\t\t\t// System.out.println(\"XsrcmasterList\" + XsrcList);\n\n\t\t}\n\t\tIterator srcDstMapIt = srcDstMap.entrySet().iterator();\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> XsrcList = XsrcMasterList.get(i);\n\t\t\tArrayList<Integer> masterHashList = UniversalHashList.get(i);\n\t\t\twhile (srcDstMapIt.hasNext()) {\n\t\t\t\tMap.Entry pair = (Map.Entry) srcDstMapIt.next();\n\t\t\t\tsrc = pair.getKey().toString();\n\t\t\t\tList dstList = (List) pair.getValue();\n\t\t\t\tmasterDstList.add(dstList);\n\t\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\t\twhile (dstListIt.hasNext()) {\n\t\t\t\t\tint hashedSrc = masterHashSetGen(src, dstListIt.next().toString(), s, R);\n\t\t\t\t\t// String[] partsGeneratedStuff =\n\t\t\t\t\t// generatedStuff.trim().split(\":\");\n\t\t\t\t\t// String generatedIndex = partsGeneratedStuff[0];\n\t\t\t\t\t// String hashedSrc = partsGeneratedStuff[1];\n\t\t\t\t\tmasterHashList.add(hashedSrc % BitArray.length);\n\t\t\t\t\t// System.out.println(masterHashList);\n\t\t\t\t\tXsrcList.add(hashedSrc);\n\t\t\t\t\t// System.out.println(XsrcList);\n\t\t\t\t\tBitArray[Math.abs(hashedSrc % (BitArray.length))] = \"True\";\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tdouble bitMapCount = BitMapCount(BitArray, BitArray.length, s);\n\t\t// System.out.println(\"bitMapCount\"+bitMapCount);\n\n\t\tint XsrcIndexperDst = 0;\n\t\tIterator srcDstMapItrecons = srcDstMap.entrySet().iterator();\n\t\twhile (srcDstMapItrecons.hasNext()) {\n\t\t\tdouble XsrcRatio;\n\t\t\tMap.Entry pair = (Map.Entry) srcDstMapItrecons.next();\n\t\t\tsrc = pair.getKey().toString();\n\t\t\t// System.out.println(\"src\" + src);\n\t\t\tList dstList = (List) pair.getValue();\n\t\t\tmasterDstList.add(dstList);\n\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\tString[] srcArray = new String[s];\n\t\t\tdouble count = 0;\n\t\t\t\twhile(dstListIt.hasNext()) {\n\t\t\t\t\tXsrcIndexperDst = XsrcIndexperDst(XsrcMasterList, masterDstList, s, BitArray, src,dstListIt.next().toString(), R) % m;\n\t\t\t\t\t// System.out.println(\"Value\"+BitArray[XsrcIndexperDst]);\n\t\t\t\t\tif (BitArray[XsrcIndexperDst] == \"True\") {\n\t\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t}\n\t\t\t//System.out.println(\"count per source\" + count + \",\" + (s - count));\n\t\t\tXsrcRatio = -s * Math.log((s-count)/s);\n\t\t\tdouble estimatedSpread = -bitMapCount + XsrcRatio;\n\t\t\tif(estimatedSpread<=0)\n\t\t\t{\n\t\t\t\testimatedSpread=0;\n\t\t\t}\n\t\t\tout.println(dstList.size() + \",\" + estimatedSpread);\n\t\t}\n\n\t}", "public static ArrayList<BoardPair> readFile(String inFileName, String format) {\n ArrayList<BoardPair> boardPairs = new ArrayList<BoardPair>();\n try { \n File inFile = new File(inFileName); \n BufferedReader reader = new BufferedReader(new FileReader(inFile));\n String line = null;\n while ((line=reader.readLine()) != null) { // loop as long as there are input lines \n if(line.contains(\"id,delta\")) \n continue; // skip header\n String str = line.trim(); \n // line fields are: id, delta, start1..400, stop1..400\n String[] tokens = str.split(\",\"); \n int row_id = Integer.parseInt( tokens[0] );\n int delta = Integer.parseInt( tokens[1] );\n int[][] startBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n int[][] stopBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n for(int col=0; col<Consts.BOARD_SIDE; col++) { \n for(int row=0; row<Consts.BOARD_SIDE; row++) {\n if(format==\"train\") { \n // train format: id, delta, start.1-start.400, stop.1-stop.400\n // note column major order!\n int startIndex = col*Consts.BOARD_SIDE + row + 2; \n int stopIndex = startIndex + Consts.BOARD_SIDE*Consts.BOARD_SIDE;\n startBoard[row][col]= Integer.parseInt( tokens[startIndex] );\n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n } \n if(format==\"test\") {\n // test format is: id, delta, stop.1-stop.400\n // note column major order!\n int stopIndex = col*Consts.BOARD_SIDE + row + 2; \n startBoard = null; \n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n }\n }\n }\n boardPairs.add( new BoardPair(row_id, delta, startBoard, stopBoard) );\n } \n reader.close(); \n } catch (IOException e) {\n System.out.println(\"ERROR reading: \" + inFileName);\n }\n return boardPairs;\n }", "public void importData(){\n // get all files from the given path\n File folder = new File(pathDataset);\n List<File> files = new ArrayList<>(Arrays.asList(folder.listFiles()));\n // iterate all found files\n //while(files.iterator().hasNext()){\n for (int k=0;k<files.size();k++) {\n File file = files.get(k);\n LOG.debug(file.toString());\n FileInputStream fis;\n String collectionName = FilenameUtils.getBaseName(file.getName());\n // ensure that the right MongoDB collection is selected\n mongoApi.setCurrentMongoCollection(collectionName);\n List<Document> documents = new ArrayList<>();\n String tempLine;\n int i = 0;\n try {\n fis = new FileInputStream(file);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n // Iterate all lines and use them as Strings \n // to pass them over to the current MongoDB document collection\n while ((tempLine = in.readLine()) != null) {\n if ((lines > -1) && (i >= lines)){\n break;\n }\n documents.add(Document.parse(tempLine));\n }\n LOG.debug(\"Start importing Collection\"+collectionName);\n mongoApi.getCurrentMongoCollection().insertMany(documents);\n LOG.debug(\"Finished importing Collection\"+collectionName);\n // Close streams\n in.close();\n fis.close();\n // Catch important exceptions\n } catch (FileNotFoundException ex) {\n LOG.error(\"Dataset File not found\" + ex.getMessage() + ex.getCause());\n System.exit(-1);\n } catch (IOException ex) {\n LOG.error(\"IOException: \" + ex.getMessage() + ex.getCause());\n System.exit(-1);\n }\n // end while\n }\n }", "public ArrayList<SessionLog> readLogFile(){\n ArrayList<SessionLog> sessionLogList = new ArrayList<>();\n try {\n FileInputStream inputStream = getApplicationContext().openFileInput(logFileName);\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\n while(true){\n String line = reader.readLine();\n if (line != null){\n String[] data = line.split(\",\");\n Log.i(LOG_TAG, \" - \"+ Arrays.toString(data));\n SessionLog item = new SessionLog(\n Long.parseLong(data[0]),\n new LatLng(Double.parseDouble(data[1]), Double.parseDouble(data[2])),\n data[3].equals(\"true\")\n );\n sessionLogList.add(item);\n }\n else{\n Log.i(LOG_TAG, \"Reached end of file\");\n break; // No more lines to read\n }\n }\n }\n catch (Exception e){\n Log.i(LOG_TAG, \"Problem reading from current session log file...\");\n e.printStackTrace();\n }\n return sessionLogList;\n }", "public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static String[][][] schematic(File file) {\n try {\n blocks = new String[8][11][11];\n \n BufferedReader bufRdr = new BufferedReader(new FileReader(file));\n String line;\n //read each line of text file\n for (int level = 0; level < 8; level++) {\n for (int row = 0; row < 11; row++) {\n line = bufRdr.readLine();\n String[] strArr = line.split(\",\");\n System.arraycopy(strArr, 0, blocks[level][row], 0, 11);\n }\n }\n } catch (IOException io) {\n System.err.println(Constants.MY_PLUGIN_NAME + \" Could not read csv file\");\n }\n return blocks;\n }", "public void readFile(String filename) throws IOException {\n BufferedReader buffer = new BufferedReader(new FileReader(filename));\n\n String line;\n int row = 0;\n isFirstLine = true;\n\n while ((line = buffer.readLine()) != null) {\n String[] vals = line.trim().split(\"\\\\s+\");\n int length = vals.length;\n \n if(isFirstLine) {\n \tfor(int col = 0; col < 2; col++) {\n \t\tif(col == 0)\n \t\t\trowSize = Integer.parseInt(vals[col]);\n \t\telse\n \t\t\tcolSize = Integer.parseInt(vals[col]);\n \t}\n \tskiMap = new int[rowSize][colSize];\n \tisFirstLine = false;\n }\n else {\n \tfor (int col = 0; col < length; col++) {\n \tskiMap[row][col] = Integer.parseInt(vals[col]);\n }\n \t row++;\n }\n }\n \n if(buffer != null)\n \tbuffer.close();\n }", "public ArrayList<ArrayList<Double>> parseVertices() {\n\t\tArrayList<ArrayList<Double>> ret = new ArrayList<ArrayList<Double>>();\n\t\tString file = getFilepath();\n\t\ttry {\n\t\t\tFile myObj = new File(file);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tif (data.length() > 2 && data.substring(0,2).equals(\"v \")) {\n\t\t\t\t\tString[] s = data.split(\" \");\n\t\t\t\t\tArrayList<Double> v = new ArrayList<Double>();\n\t\t\t\t\tv.add(Double.parseDouble(s[1]));\n\t\t\t\t\tv.add(Double.parseDouble(s[2]));\n\t\t\t\t\tv.add(Double.parseDouble(s[3]));\n\t\t\t\t\tret.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ret;\n\n\t}", "private static ArrayList<CIty> duxushuji(File file) throws IOException {\n\t\tArrayList<CIty>city=new ArrayList<>();\r\n\t\tInputStreamReader isr = new InputStreamReader(new FileInputStream(file), \"GBK\");\r\n\t\tBufferedReader br=new BufferedReader(isr);\r\n\tString str;\r\n\t\twhile((str=br.readLine())!=null){\r\n\t\tString[] strings=str.split(\"[|]\");\r\n\t\tcity.add(new CIty(Integer.parseInt(strings[0]), strings[1],strings[2]));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tisr.close();\r\n\t\treturn city;\r\n\t}", "private void readingFiles() {\r\n\r\n File sdCard = Environment.getExternalStorageDirectory();\r\n File directory = new File(sdCard.getAbsoluteFile() + \"/MyApplication\");\r\n\r\n //List of names\r\n File name = new File(directory, \"nameList.csv\");\r\n FileInputStream fIn = null;\r\n try {\r\n fIn = new FileInputStream(name);\r\n InputStreamReader isr = new InputStreamReader(fIn);\r\n char[] inputBuffer = new char[READ_BLOCK_SIZE];\r\n String s = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer, 0, charRead);\r\n s += readString;\r\n inputBuffer = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s.split(\",\");\r\n nameList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n nameList = new ArrayList<String>();\r\n }\r\n\r\n //List of latitudes\r\n File lat = new File(directory, \"latList.csv\");\r\n FileInputStream fIn1 = null;\r\n try {\r\n fIn1 = new FileInputStream(lat);\r\n InputStreamReader isr = new InputStreamReader(fIn1);\r\n char[] inputBuffer1 = new char[READ_BLOCK_SIZE];\r\n String s1 = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer1)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer1, 0, charRead);\r\n s1 += readString;\r\n inputBuffer1 = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s1.split(\",\");\r\n latList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n latList = new ArrayList<String>();\r\n }\r\n\r\n //List of longitudes\r\n File lng = new File(directory, \"lngList.csv\");\r\n FileInputStream fIn2 = null;\r\n try {\r\n fIn2 = new FileInputStream(lng);\r\n InputStreamReader isr = new InputStreamReader(fIn2);\r\n char[] inputBuffer2 = new char[READ_BLOCK_SIZE];\r\n String s2 = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer2)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer2, 0, charRead);\r\n s2 += readString;\r\n inputBuffer2 = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s2.split(\",\");\r\n lngList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n lngList = new ArrayList<String>();\r\n }\r\n if (lngList.get(0) == \"\") {\r\n lngList.remove(0);\r\n }\r\n if (latList.get(0) == \"\") {\r\n latList.remove(0);\r\n }\r\n if (nameList.get(0) == \"\") {\r\n nameList.remove(0);\r\n }\r\n }", "@Override\r\n\tpublic ArrayList<String> importCsv(File file) {\r\n\t\t\tFileReader monFichier = null;\r\n\t\t\tBufferedReader tampon = null;\r\n\t\t\tArrayList<String> aLImport = new ArrayList<String>();\r\n\t\t\tString[] tabString ;\r\n\t\t\tint sizeLine;\r\n\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// file path\r\n\t\t\t\tmonFichier = new FileReader(file.getAbsolutePath());\r\n\t\t\t\ttampon = new BufferedReader(monFichier);\r\n\r\n\t\t\t\t// read the first line of the file .csv\r\n\t\t\t\tString ligneTemp = tampon.readLine();\r\n\t\t\t\ttabString = ligneTemp.split(\";\");\r\n\t\t\t\tthis.setNbColumnsRead(tabString.length);\r\n\t\t\t\t\r\n\t\t\t\t//Start of the actual content (first line only acting as a header)\r\n\t\t\t\tligneTemp = tampon.readLine();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t// faire la gestion des erreurs \r\n\t\t\t\t\t\t/*JOptionPane.showMessageDialog(this, \"Le fichier .csv n'est pas valide\", \"Erreur !\",\r\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);*/\r\n\t\t\t\t\r\n\t\t\t\t// read all the lines one by one and split them to keep the\r\n\t\t\t\t// structure's name\r\n\t\t\t\twhile (ligneTemp != null) {\t\t\t\t\t\r\n\t\t\t\t\ttabString = ligneTemp.split(\";\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tsizeLine = tabString.length;\r\n\t\t\t\t\t//This for start at 1 in order to skip the first cell, assuming it is always \"Start\" and is therefore not required in the ArrayList\r\n\t\t\t\t\tfor (int i = 1; i < sizeLine; i+=2) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!tabString[i].contains(\"End\")){\r\n\t\t\t\t\t\t\taLImport.add(tabString[i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tligneTemp = tampon.readLine();\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IOException exception) {\r\n\t\t\t\texception.printStackTrace();\r\n\t\t\t\treturn null;\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\tif (tampon != null)\r\n\t\t\t\t{\r\n\t\t\t\t\ttampon.close();\r\n\t\t\t\t}\r\n\t\t\t\tif (monFichier != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmonFichier.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException exception1) {\r\n\t\t\t\t\texception1.printStackTrace();\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn aLImport;\t\r\n\t}", "public void readFile() throws NumberFormatException,FileNotFoundException {\n Scanner scanStar, scanMessier, scanPlanet;\n String raw_data;\n String[] values;\n Set<String> identifyName = new HashSet<>();\n // Create scanner to scan file\n scanStar = new Scanner(new File(filename[0]));\n scanMessier = new Scanner(new File(filename[1]));\n scanPlanet = new Scanner(new File(filename[2]));\n\n // Read data about Star and store\n Star star;\n while (scanStar.hasNext()){\n raw_data = scanStar.nextLine();\n values = processData(raw_data, 1);\n // Check whether there is the same object or the data is wrong\n if (values.length != 7 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Star file\");\n System.exit(1);\n }\n star = new Star();\n star.setNumber(values[0]);\n star.setRa(Double.parseDouble(values[1]));\n star.setDecl(Double.parseDouble(values[2]));\n star.setMagn(Double.parseDouble(values[3]));\n star.setDistance(Double.parseDouble(values[4]));\n star.setType(values[5]);\n star.setConstellation(values[6]);\n // Add object to collection\n aos.add(star);\n identifyName.add(star.getNumber());\n }\n scanStar.close();\n\n // Read data about Messier and store\n Messier messier;\n while (scanMessier.hasNext()){\n raw_data = scanMessier.nextLine();\n values = processData(raw_data, 1);\n if (values.length < 6 || identifyName.contains('M' + values[0])){\n System.out.println(\"There are some mistakes in Messier file\");\n System.exit(1);\n }\n messier = new Messier();\n messier.setNumber(\"M\" + values[0]);\n messier.setRa(Double.parseDouble(values[1]));\n messier.setDecl(Double.parseDouble(values[2]));\n messier.setMagn(Double.parseDouble(values[3]));\n messier.setDistance(Double.parseDouble(values[4]));\n messier.setConstellation(values[5]);\n if (values.length == 7){\n messier.setDescription(values[6]);\n }else {\n messier.setDescription(\"-\");\n }\n // Add object to collection\n aos.add(messier);\n identifyName.add(messier.getNumber());\n }\n scanMessier.close();\n\n // Read data about Planet and store\n Planet planet;\n while (scanPlanet.hasNext()){\n raw_data = scanPlanet.nextLine();\n values = processData(raw_data, 0);\n if (values.length != 6 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Planet file\");\n System.exit(1);\n }\n planet = new Planet();\n planet.setName(values[0]);\n planet.setRa(Double.parseDouble(values[1]));\n planet.setDecl(Double.parseDouble(values[2]));\n planet.setMagn(Double.parseDouble(values[3]));\n planet.setDistance(Double.parseDouble(values[4]));\n planet.setAlbedo(Double.parseDouble(values[5]));\n // Add object to collection\n aos.add(planet);\n identifyName.add(planet.getName());\n }\n scanPlanet.close();\n }", "public void readPatientListFromFile()\r\n\t{\n\t\tnextPatientLocation = 0;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Makes file reader objects and passes filename\r\n\t\t\tFileReader fr = new FileReader(patientMasterfile);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\t//reads first line and makes a blank patient \r\n\t\t\tString aReadLine = br.readLine();\r\n\t\t\tPatient tempRead = new Patient();\r\n\t\t\t//loops through all lines in the file\r\n\t\t\twhile(aReadLine != null)\r\n\t\t\t{\r\n\t\t\t\t//resets patient to null\r\n\t\t\t\ttempRead = new Patient();\r\n\t\t\t\t//Splits the read in data and assigns that data to the appropriate attribute \r\n\t\t\t\tString[] splitPatientData = aReadLine.split(\"~~\");\r\n\r\n\t\t\t\ttempRead.patientID = splitPatientData[0];\r\n\t\t\t\ttempRead.forename = splitPatientData[1];\r\n\t\t\t\ttempRead.surname = splitPatientData[2];\r\n\t\t\t\ttempRead.username = splitPatientData[3];\r\n\t\t\t\ttempRead.password = splitPatientData[4];\r\n\t\t\t\ttempRead.houseNumber = splitPatientData[5];\r\n\t\t\t\ttempRead.postcode = splitPatientData[6];\r\n\t\t\t\ttempRead.telephoneNumber = splitPatientData[7];\r\n\t\t\t\ttempRead.dob = splitPatientData[8];\r\n\t\t\t\ttempRead.mode = splitPatientData[9];\r\n\t\t\t\t//adds patient to list and gets the next line\r\n\t\t\t\taddPatientToList(tempRead);\r\n\t\t\t\taReadLine = br.readLine();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//catches any exceptions trown by reading \r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error reading file, \");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private ArrayList<Alimento> initLista() {\n try {\n File file = new File(\"C:\\\\Users\\\\Gabri\\\\OneDrive\\\\Ambiente de Trabalho\\\\Calorie\\\\src\\\\Assets\\\\alimentos.txt\");\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n ArrayList<Alimento> lista = new ArrayList<>();\n\n int noLines = Integer.parseInt(br.readLine());\n for(int l=0; l<noLines; l++) {\n String[] alimTks = (br.readLine()).split(\",\");\n\n Alimento alimento = new Alimento(idAlimCounter++,alimTks[0],100,Integer.parseInt(alimTks[1]),Float.parseFloat(alimTks[2]),Float.parseFloat(alimTks[3]),Float.parseFloat(alimTks[4]));\n lista.add(alimento);\n }\n\n return lista;\n }catch (Exception e) {\n System.out.println(\"Sistema - getLista() : \"+e.toString());\n }\n return null;\n }", "@SuppressWarnings(\"resource\")\n\tpublic static ArrayList<ArrayList<String>> FileUtils(String fileName) {\n\n\t\t// String fileDirectory = System.getProperty(\"user.dir\");\n\t\t// StringBuilder stringBuilder = new StringBuilder(fileDirectory);\n\t\t// stringBuilder.append(System.getProperty(\"file.separator\"));\n\t\t// stringBuilder.append(fileName);\n\t\t// String file_Name = stringBuilder.toString();\n\t\tString file_Name = fileName;\n\t\tArrayList<ArrayList<String>> input_data = new ArrayList<ArrayList<String>>();\n\t\tFile file = new File(file_Name);\n\t\tScanner input;\n\t\ttry {\n\t\t\tinput = new Scanner(file);\n\t\t\twhile (input.hasNext()) {\n\t\t\t\tString[] inputForEachRow = input.next().split(\",\");\n\t\t\t\tinput_data.add(new ArrayList<String>(Arrays\n\t\t\t\t\t\t.asList(inputForEachRow)));\n\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception: \" + e);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn input_data;\n\n\t}", "public void displayStatistics() {\n FileInputStream fInStr;\n ObjectInputStream objInStr = null;\n File file = new File(\"clubData.txt\");\n if (file.exists()) {\n try {\n fInStr = new FileInputStream(\"clubData.txt\");\n while ( fInStr.available() > 0) {\n objInStr = new ObjectInputStream( fInStr);\n ArrayList<FootballClub> readedArray = (ArrayList<FootballClub>) objInStr.readObject();\n footballClubArrayList = readedArray;\n\n\n }\n if (objInStr != null) {\n objInStr.close();\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "private ArrayList<Tuple> loadTuple() {\n\t\tArrayList<Tuple> idArray = new ArrayList<Tuple>();\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<Tuple>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tArrayList<Tuple> list = gson.fromJson(inputStreamReader, listType);\n\t\t\tidArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn idArray;\n\t}", "public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}", "public static ArrayList<Loan> readData(String file) throws FileNotFoundException {\n // Scanner used to read in the data from the file.\n Scanner in = new Scanner(new File(file));\n // ArrayList to store the data.\n ArrayList<Loan> list = new ArrayList<Loan>();\n // Read in the header line so it is not added to the ArrayLists.\n String header = in.nextLine();\n // Check to see if the file still has data to be read in.\n while(in.hasNextLine()) {\n \n // Read in the line of data and \n // use a space as a delimiter to separate the different columns.\n String[] line = in.nextLine().split(\",\");\n \n // Local variable containing the ID.\n int ID = Integer.parseInt(line[0]);\n \n // Local variable containing the amount.\n int amount = Integer.parseInt(line[1]);\n \n // Local variable containing the country.\n String country = line[2];\n \n // Local variable containing the lenders.\n int lenders = Integer.parseInt(line[5]);\n \n // Local variable containing the difference in days.\n int differenceInDays = Integer.parseInt(line[4])/86400;\n \n // Add the loan to the arraylist.\n list.add(new Loan(ID, amount, country, differenceInDays, lenders)); \n \n }\n // Return the completed ArrayLists.\n return list;\n }", "public static void read(String fname){\r\n\t\t\t\r\n\t\t\tString line = \"\";\r\n\t\t\ttry {\r\n\t // FileReader reads text files in the default encoding.\r\n\t FileReader fileReader = new FileReader(fname);\r\n\t \r\n\t // Always wrap FileReader in BufferedReader.\r\n\t BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t header=bufferedReader.readLine();\r\n\t \r\n\t data = new ArrayList<alldata>();\r\n\r\n\t while((line = bufferedReader.readLine()) != null) {\r\n\t \t\r\n\t //parse line and divide data by comma\r\n\t \r\n\t \t\r\n\t \tString[] lineStr = line.split(\",\");\r\n\t \t\r\n\t //create object row into which data from each line is stored and then added to array list\t\r\n\t \t\r\n\t if(lineStr.length >0) {\r\n\t \talldata row = new alldata();\r\n\t \trow.Name = lineStr[0]+ \",\" + lineStr[1];\r\n\t \trow.Num = lineStr[2];\r\n\t \trow.State = lineStr[3];\r\n\t \trow.Zip = lineStr[4];\r\n\t \trow.Age = Integer.parseInt(lineStr[6]);\r\n\t \trow.Sex = lineStr[7];\r\n\t \t\r\n\t \tdata.add(row);\r\n\t }\r\n\t \r\n\t \r\n\t } \r\n\t bufferedReader.close(); // Always close files. \r\n\t }catch(FileNotFoundException ex) {\r\n\t System.out.println(\"Unable to open file '\" + fname + \"'\"); \r\n\t }catch(IOException ex) {\r\n\t System.out.println(\"Error reading file '\" + fname + \"'\"); \r\n\t }\r\n\t\t\tSystem.out.println(\"Finish reading data from file \"+ fname);\r\n\t\t}", "public static List<Matrix> parseFile(Path path) {\n\t\tList<String> lines = null;\n\t\t\n\t\ttry {\n\t\t\tlines = Files.readAllLines(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint lineCount = lines.size();\n\t\tMatrix A = null;\n\t\tMatrix y = null;\n\t\tint rowIndex = 0;\n\t\tfor (String line : lines) {\n\t\t\t\n\t\t\t// If line is a comment skip\n\t\t\tif (line.startsWith(\"#\")) {\n\t\t\t\tlineCount--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif (A == null) {\n\t\t\t\tA = new Matrix(lineCount, lineCount);\n\t\t\t}\n\t\t\t\n\t\t\tif (y == null) {\n\t\t\t\ty = new Matrix(lineCount, 1);\n\t\t\t}\n\t\t\t\n\t\t\tList<Double> dList = Util.parseLine(line);\n\t\t\t\n\t\t\t// Extract numbers\n\t\t\tfor (int i = 0, len = dList.size(); i < len; i++) {\n\t\t\t\n\t\t\t\t// Not last number - contained in A\n\t\t\t\tif (i+1 < len) {\n\t\t\t\t\tA.set(rowIndex, i, dList.get(i));\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// ... else go to y\n\t\t\t\t\ty.set(rowIndex, 0, dList.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\trowIndex++;\n\t\t}\n\t\t\n\t\tList<Matrix> sol = new ArrayList<>();\n\t\tsol.add(A);\n\t\tsol.add(y);\n\t\t\n\t\treturn sol;\n\t}", "private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }" ]
[ "0.65887785", "0.65783775", "0.6490519", "0.64565235", "0.6398513", "0.6322075", "0.6313765", "0.62376285", "0.62048596", "0.61836", "0.6160965", "0.6127152", "0.61084586", "0.6100774", "0.6090913", "0.608859", "0.6061214", "0.6053822", "0.60415965", "0.60182285", "0.6014641", "0.6003459", "0.5996519", "0.59843814", "0.5983972", "0.59831", "0.59818375", "0.5981287", "0.5958019", "0.5954937", "0.5950645", "0.5940311", "0.5938604", "0.59329754", "0.5927558", "0.5916184", "0.59106255", "0.59064114", "0.59010494", "0.5871541", "0.5868849", "0.58605397", "0.58601576", "0.5851966", "0.58502555", "0.5837303", "0.5800284", "0.5800008", "0.5786223", "0.57784146", "0.5771521", "0.57586026", "0.57508206", "0.574982", "0.5748934", "0.574424", "0.57327795", "0.57103074", "0.5709417", "0.57046264", "0.57036436", "0.5699482", "0.5697524", "0.56957793", "0.56932986", "0.56798524", "0.5677968", "0.56751424", "0.56712675", "0.56657076", "0.56598157", "0.5658282", "0.5657636", "0.5656605", "0.56555796", "0.56357807", "0.56351435", "0.56343555", "0.56318784", "0.5629268", "0.5627411", "0.5626192", "0.5625587", "0.5620419", "0.5620367", "0.5620295", "0.56176007", "0.56137323", "0.56095886", "0.56095815", "0.5603724", "0.56022006", "0.5601334", "0.55988765", "0.55981094", "0.55969375", "0.55953413", "0.55908144", "0.55887127", "0.5584526", "0.55808145" ]
0.0
-1
This method just loads all the contents of the file into arraylists
public static void loadArrayList() throws IOException { String usersXPFile = "UsersXP.txt"; File file = new File(usersXPFile); Scanner fileReader; if(file.exists()) { fileReader = new Scanner(file); while(fileReader.hasNext()) userDetail1.add(userData.addNewuser(fileReader.nextLine().trim())); fileReader.close(); } else overwriteFile(usersXPFile, ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }", "public void populateListFromFile() \n\t{\n\t\tBufferedReader bufferedReader = null;\n\t\tallQuestions = new ArrayList<ArrayList<String>>();\n\t\tquestionAndAnswers = new ArrayList<String>();\n\n\t\ttry {\n\t\t bufferedReader = new BufferedReader(new FileReader(\"questions.txt\"));\n\t\t String line = \"\";\n\t\t \n\t\t while ((line = bufferedReader.readLine()) != null) \n\t\t {\t\t\t \t\n\t\t \tif(line.length() > 0)\n\t\t \t\tquestionAndAnswers.add(line);\n\t\t \telse if (line.length() == 0)\n\t\t \t{\n\t\t \t\tallQuestions.add(questionAndAnswers);\n\t\t \t\tquestionAndAnswers = new ArrayList<String>();\n\t\t \t}\n\t\t } \n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t}", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }", "private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n public ArrBag( String infileName ) throws Exception\n {\n count = 0; // i.e. logical size, actual number of elems in the array\n BufferedReader infile = new BufferedReader( new FileReader( infileName ) );\n while ( infile.ready() )\n this.add( (T) infile.readLine() );\n infile.close();\n }", "public ArrayList<String> readFromFile(){\n ArrayList<String> results = new ArrayList<>();\n //Wrap code in a try/ catch to help with exception handling.\n try{\n //Create a object of Scanner class\n Scanner s = new Scanner(new FileReader(path));\n //While loop for iterating thru the file.\n // Reads the data and adds it to the ArrayList.\n while(s.hasNext()) {\n String c1 = s.next();\n String c2 = s.next();\n String w = s.next();\n results.add(c1);\n results.add(c2);\n results.add(w);\n }return results;\n\n }//File not found exception block.\n catch(FileNotFoundException e){\n System.out.println(e);\n }\n return results;//default return.\n }", "public void readFile() {\r\n\t\tBufferedReader br = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString currentLine;\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\r\n\r\n\t\t\twhile ((currentLine = br.readLine()) != null) {\r\n\r\n\t\t\t\tif (!currentLine.equals(\"\")) {\r\n\t\t\t\t\tString[] paragraphs = currentLine.split(\"\\\\n\\\\n\");\r\n\r\n\t\t\t\t\tfor (String paragraphEntry : paragraphs) {\r\n\t\t\t\t\t\t//process(paragraphEntry);\r\n\t\t\t\t\t\t//System.out.println(\"Para:\"+paragraphEntry);\r\n\t\t\t\t\t\tParagraph paragraph = new Paragraph();\r\n\t\t\t\t\t\tparagraph.process(paragraphEntry);\r\n\t\t\t\t\t\tthis.paragraphs.add(paragraph);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)br.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public void loadList () {\r\n ArrayList<String> list = fileManager.loadWordList();\r\n if (list != null) {\r\n for (String s : list) {\r\n addWord(s);\r\n }\r\n }\r\n }", "public List<String> readFileIntoList(String filepath) throws IOException;", "private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private ArrayList<Book> readBookCollection() {\n File file = new File(\"books.txt\");\n ArrayList<Book> collection = new ArrayList<Book>();\n try {\n FileReader fileReader = new FileReader(file);\n BufferedReader reader = new BufferedReader(fileReader);\n while (true) {\n String line = reader.readLine();\n if (line == null) break;\n line = line.trim();\n if (line.equals(\"\")) continue; // ignore possible blank lines\n String[] bookInfo = line.split(\" :: \");\n collection.add(new Book(bookInfo[0], bookInfo[1]));\n }\n }\n catch (IOException e) {\n System.out.println(e.getMessage());\n }\n return collection;\n }", "private ArrayList<Habit> loadFromFile(final String fileName) {\r\n ArrayList<Habit> habitArray = new ArrayList<Habit>();\r\n try {\r\n FileInputStream fis = openFileInput(fileName);\r\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\r\n Gson gson = new Gson();\r\n\r\n // Code from http://stackoverflow.com/questions/12384064/gson-convert-from-json-to-a-typed-arraylistt\r\n Type typeHabit = new TypeToken<ArrayList<Habit>>(){}.getType();\r\n\r\n habitArray = gson.fromJson(in, typeHabit);\r\n\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n saveInFile(fileName, new ArrayList<Habit>());\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n }\r\n return habitArray;\r\n }", "public ArrayList<String> loadLines(String filename) {\n ArrayList<String> lines = new ArrayList<String>();\n String[] rawLines = loadStrings(filename);\n for(String str : rawLines) {\n if(str != null && !str.isEmpty()){\n lines.add(str);\n }\n }\n return lines;\n }", "public static ArrayList load(String filePath) throws IOException\n\t{\n\t\tString line;\n\t\tArrayList gameConfigs = new ArrayList();\n\t\tBufferedReader textReader = new BufferedReader(new FileReader(filePath));\n\t\t\n\t\twhile((line = textReader.readLine()) != null)\n\t\t{\n\t\t\tgameConfigs.add(line);\n\t\t}\n\t\t\n\t\ttextReader.close();\n\t\treturn gameConfigs;\n\t}", "private ArrayList<ArrayList<String>> initArrArrList(ArrayList<String> packetNames) throws FileNotFoundException, IOException {\n ArrayList<ArrayList<String>> arrList=new ArrayList();\n LoadAndSave las=new LoadAndSave();\n for(int x=0;x<packetNames.size();x++) {\n las.load(packetNames.get(x));\n arrList.add(las.loader1);\n arrList.add(las.loader2);\n }\n return arrList;\n \n }", "public void readFile() {\n try\n {\n tasksList.clear();\n\n FileInputStream file = new FileInputStream(\"./tasksList.txt\");\n ObjectInputStream in = new ObjectInputStream(file);\n\n boolean cont = true;\n while(cont){\n Task readTask = null;\n try {\n readTask = (Task)in.readObject();\n } catch (Exception e) {\n }\n if(readTask != null)\n tasksList.add(readTask);\n else\n cont = false;\n }\n\n if(tasksList.isEmpty()) System.out.println(\"There are no todos.\");\n in.close();\n file.close();\n }\n\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }", "protected List<List<String>> readFile() throws FileNotFoundException {\n\n List<List<String>> list = new ArrayList<>();\n\n File dire = new File(dir);\n File file = new File(dire, filename);\n\n try (Scanner in = new Scanner(file)) {\n\n while (in.hasNextLine()) {\n \n String line = in.nextLine();\n \n String temp[] = line.split(delimiter);\n \n list.add(Arrays.asList(temp));\n }\n in.close();\n } catch (IOException e) {\n System.out.println(\"Error reading file!\");\n }\n return list;\n }", "public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "@Override\n\tpublic ArrayList<Question> loadQuestions() {\n\n\t\tArrayList<Question> questionArray = new ArrayList<Question>();\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context\n\t\t\t\t\t.openFileInput(QUESTION_BANK);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<Question>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\n\t\t\t// Gson does not serialize/deserialize dates with milisecond\n\t\t\t// precision unless specified\n\t\t\tGson gson = builder.setDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\")\n\t\t\t\t\t.create();\n\t\t\tbuilder.serializeNulls(); // Show fields with null values\n\n\t\t\tArrayList<Question> list = gson.fromJson(inputStreamReader,\n\t\t\t\t\tlistType);\n\t\t\tquestionArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn questionArray;\n\t}", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "public ArrayList<?> getItems(String filename){\n \n try {\n FileInputStream fis = new FileInputStream(filename);\n ObjectInputStream ois = new ObjectInputStream(fis);\n items = (ArrayList<?>) ois.readObject();\n ois.close();\n \n \n }catch(IOException e){\n System.out.println(e);\n }catch(ClassNotFoundException e){\n System.out.println(e);\n }\n \n return items;\n }", "private void getDataLists(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(path);\n\t\t\tfile.createNewFile();\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\t\t\t\n\t\t\tString str = null;\n\t\t\twhile((str = fileReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tthis.dataList.push(str);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed : data list read\");\n\t\t}\n\t}", "public ArrayList<Task> load() throws DukeException {\n ArrayList<Task> tasks = new ArrayList<>();\n try {\n File f = new File(filePath);\n if (f.exists()) {\n Scanner sc = new Scanner(f);\n while (sc.hasNext()) {\n String next = sc.nextLine();\n Task t = parseLine(next);\n tasks.add(t);\n }\n sc.close();\n } else {\n if (!f.getParentFile().exists()) {\n f.getParentFile().mkdir();\n }\n }\n f.createNewFile();\n } catch (IOException e) {\n throw new DukeException(\"Error retrieving/reading from data file, creating new file instead.\");\n }\n return tasks;\n }", "private void loadDataFromMemory(String filename){\n shoppingList.clear();\n new ReadFromMemoryAsync(filename, getCurrentContext(), new ReadFromMemoryAsync.AsyncResponse(){\n\n @Override\n public void processFinish(List<ShoppingItem> output) {\n shoppingList.addAll(output);\n sortItems();\n }\n }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n// for (ShoppingItem item: items) {\n// shoppingList.add(item);\n// }\n// sortItems();\n }", "public ArrayList<String> loadRead() {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public ArrayList loadItems (String file) {\n ArrayList<Item> itemList = new ArrayList<>();\n\n File itemFile = new File(file);\n\n Scanner scanner = null;\n\n try{\n scanner = new Scanner(itemFile);\n\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n\n while(scanner.hasNextLine()){\n String line = scanner.nextLine();\n String [] oneItem = line.split(\"=\");\n itemList.add(new Item(oneItem[0],Integer.parseInt(oneItem[1])));\n }\n\n\n return itemList;\n }", "public ArrayList<Item> loadItems(String filename) {\n ArrayList<Item> itemsList = new ArrayList<>();\n try {\n File file = new File(filename);\n BufferedReader reader= new BufferedReader(new InputStreamReader(new FileInputStream(file), \"UTF-8\"));\n String line= reader.readLine();\n while (line != null){\n String[] splitedLine = line.split(\"=\");\n String name = splitedLine[0];\n int weight = Integer.parseInt(splitedLine[1]) / 1000; // on convertit en tonnes\n itemsList.add(new Item(name,weight));\n line = reader.readLine();\n }\n reader.close(); //pour arreter la memoire tampon\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n return itemsList;\n }", "ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }", "private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }", "private ObservableList<Saucer> loadSaucers(){\r\n try {\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileInputStream fis = new FileInputStream(file);\r\n ObjectInputStream input = new ObjectInputStream(fis);\r\n List<Saucer> list = (List<Saucer>) input.readObject();\r\n ObservableList<Saucer> saucers = FXCollections.observableArrayList(list);\r\n\r\n return saucers;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return null;\r\n }\r\n }", "public void readFromFile() {\n\n\t}", "public void fileToArrayList(String filename, ArrayList<Task> tasks)\n {\n \tTaskReader reader = new TaskReader();\n tasks.addAll(reader.getArrayFromFile(filename));\n }", "private ArrayList<Alimento> initLista() {\n try {\n File file = new File(\"C:\\\\Users\\\\Gabri\\\\OneDrive\\\\Ambiente de Trabalho\\\\Calorie\\\\src\\\\Assets\\\\alimentos.txt\");\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n ArrayList<Alimento> lista = new ArrayList<>();\n\n int noLines = Integer.parseInt(br.readLine());\n for(int l=0; l<noLines; l++) {\n String[] alimTks = (br.readLine()).split(\",\");\n\n Alimento alimento = new Alimento(idAlimCounter++,alimTks[0],100,Integer.parseInt(alimTks[1]),Float.parseFloat(alimTks[2]),Float.parseFloat(alimTks[3]),Float.parseFloat(alimTks[4]));\n lista.add(alimento);\n }\n\n return lista;\n }catch (Exception e) {\n System.out.println(\"Sistema - getLista() : \"+e.toString());\n }\n return null;\n }", "private static ArrayList<ArrayList<Integer>> populateListOfInputs() {\n\t\t\n\t\tArrayList<ArrayList<Integer>> listOflist = new ArrayList<ArrayList<Integer>>();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(filePath);\n\t\t\tBufferedReader br = new BufferedReader(fr);\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t// Remove all spaces, '[' and ']'\n\t\t\t\tString numbers = line.replace(\" \", \"\");\n\t\t\t\tnumbers = numbers.replace(\"[\", \"\");\n\t\t\t\tnumbers = numbers.replace(\"]\", \"\");\n\t\t\t\t\n\t\t\t\tif(line.equals(\"\")) {\n\t\t\t\t\t//if empty line leave it and continue the loop\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tString[] individualnums = numbers.split(\",\");\n\t\t\t\tfor (int i = 0; i < individualnums.length; i++) {\t\t\t\t\t\n\t\t\t\t\tlist.add(Integer.parseInt(individualnums[i]));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlistOflist.add(list);\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listOflist;\n\t}", "public List<String> load();", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static ArrayList<Item> loadItems(String filename)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File(filename)));\r\n\t\t\tArrayList<Item> items = (ArrayList<Item>)ois.readObject();\r\n\t\t\tois.close();\r\n\t\t\tSystem.out.println(\"Loaded items from disk: \" + items.size());\r\n\t\t\treturn items;\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e2) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"No locally saved \" + filename + \" - creating a new one: \" + e2.getMessage());\r\n\t\t}\r\n\t\tcatch (IOException e2) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"IO Error: \" + e2.getMessage());\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"This copy of the program is missing some files: \" + e1.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private ArrayList<String> loadIds() {\n\n\t\tArrayList<String> idArray = new ArrayList<String>();\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<String>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tArrayList<String> list = gson.fromJson(inputStreamReader, listType);\n\t\t\tidArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn idArray;\n\t}", "public ArrayList<String> readFromFile(String fileName) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t ArrayList<String> retour = new ArrayList<String>();\n\t String line = null;\n\t while((line = reader.readLine()) != null) \n\t \tretour.add(line);\n\t \n\t reader.close();\n\t return retour; \n\t}", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "private ArrayList<Book> loadBooks(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<Book>>(){}.getType();\r\n\t\tArrayList<Book> books = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn books;\r\n\t}", "private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}", "public List<Task> load(){\n try {\n List<Task> tasks = getTasksFromFile();\n return tasks;\n }catch (FileNotFoundException e) {\n System.out.println(\"☹ OOPS!!! There is no file in the path: \"+e.getMessage());\n List<Task> tasks = new ArrayList();\n return tasks;\n }\n }", "List readFile(String pathToFile);", "public ArrayList<String> fileRead(String fileName) {\n String line = null;\n ArrayList<String> list = new ArrayList<>();\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n list.add(line);\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return list;\n }", "private List<String> readFile() throws FileNotFoundException {\t\n\t\tList<String> itemsLines = new ArrayList<>();\n\t\tFile inputFile = new File(filePath);\t\n\t\ttry (Scanner newScanner = new Scanner(inputFile)) {\n\t\t\twhile(newScanner.hasNextLine()) {\n\t\t\t\titemsLines.add(newScanner.nextLine());\n\t\t\t}\t\n\t\t}\n\t\treturn itemsLines;\n\t}", "private List<String> init(Path path) throws Exception {\n List<String> lines = Files.readAllLines(path);\n if (lines.size() != 0) {\n int numberOfFields = Integer.parseInt(lines.get(0));\n fillFieldsList(lines, numberOfFields);\n fillPlayersList(lines, numberOfFields);\n } else {\n throw new FileEmptyException();\n }\n return lines;\n }", "private List<Task> getTasksFromFile() throws FileNotFoundException{\n List<Task> loadedTasks = new ArrayList<>();\n Ui a=new Ui();\n try {\n List<String> lines = getLine() ;\n for (String line : lines) {\n if (line.trim().isEmpty()) { //ignore empty lines\n continue;\n }\n loadedTasks.add(createTask(line)); //convert the line to a task and add to the list\n }\n System.out.println(\"File successfully loaded\");\n } catch (DukeException e1) {\n System.out.println(\"☹ OOPS!!! Problem encountered while loading data: \" +e1.getMessage());\n }\n return loadedTasks;\n }", "public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "public void getOldFile() throws FileNotFoundException, IOException, ClassNotFoundException{\r\n\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(\"agenda.txt\"));\r\n\t\tArrayList<Artist> inputArtists = (ArrayList<Artist>) ois.readObject();\r\n\t\tArrayList<Stage> inputStages = (ArrayList<Stage>) ois.readObject();\r\n\t\tArrayList<Performance> inputPerformances = (ArrayList<Performance>) ois.readObject();\r\n\t\tartists.addAll(inputArtists);\r\n\t\tstages.addAll(inputStages);\r\n\t\tperformances.addAll(inputPerformances);\r\n\t}", "protected List<String> readFile()\n {\n // Base size 620 for Google KML icons. This might be slow for larger\n // sets.\n List<String> lines = New.list(620);\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(getClass().getResourceAsStream(myImageList), StringUtilities.DEFAULT_CHARSET)))\n {\n for (String line = reader.readLine(); line != null; line = reader.readLine())\n {\n lines.add(line);\n }\n }\n catch (IOException e)\n {\n LOGGER.warn(e.getMessage());\n }\n return lines;\n }", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i);\n StringTokenizer star = new StringTokenizer(st, SEPARATOR);\n int movieID = Integer.parseInt(star.nextToken().trim());\n String email = star.nextToken().trim();\n String comment = star.nextToken().trim();\n Review review = new Review(movieID, email, comment);\n alr.add(review);\n }\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n return alr;\n }", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "public List<String> readFile() {\n \n try {\n ensureFileExists();\n return Files.readAllLines(filePath);\n } catch (FileNotFoundException ex) {\n return new ArrayList<>();\n } catch (IOException ex) {\n ex.printStackTrace();\n return new ArrayList<>();\n }\n }", "private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n //Adds each line to the ArrayList\n int i = 0;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n //System.out.println(line);\n i++;\n }\n \n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n System.out.println(\"Done taking in file...\");\n }", "private void loadCheckingAccounts(String checkingAccountFileName)\n {\n try\n {\n /* Open the file to read */\n File inputFile = new File(checkingAccountFileName);\n\n /* Create a scanner to begin reading from file */\n Scanner input = new Scanner(inputFile);\n\n while (input.hasNextLine())\n {\n //reading...\n String currentLine = input.nextLine();\n\n //parse on commas\n String[] splitLine = currentLine.split(\",\");\n\n //DateFormat class to parse Date from file\n DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);\n\n //parsing out data...\n int accountId = Integer.parseInt(splitLine[0]);\n double balance = Double.parseDouble(splitLine[1]);\n String ssn = splitLine[2];\n double interestRate = Double.parseDouble(splitLine[3]);\n Date dateOpened = dateFormat.parse(splitLine[4]);\n int overdraftSavingsAccountId = Integer.parseInt(splitLine[5]);\n boolean isGoldDiamond = Boolean.parseBoolean(splitLine[6]);\n\n Checking checkingAccount = new Checking(accountId,\n balance,\n ssn,\n interestRate,\n dateOpened,\n overdraftSavingsAccountId,\n isGoldDiamond);\n\n ArrayList<Transaction> accountTransactions = transactionHashMap.get(accountId);\n checkingAccount.setTransactions(accountTransactions);\n\n //add checking account...\n accounts.add(checkingAccount);\n }\n\n input.close();\n\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "protected static ArrayList<String> load() throws Exception {\r\n\t\tArrayList<String> list;\r\n\t\tFileReader fileRead = new FileReader(csv);\r\n\t\tBufferedReader buff = Files.newBufferedReader(Paths.get(\"story.csv\"));\r\n\t\tlist = buff.lines().map(line -> line.split(\",\")).flatMap(Arrays::stream)\r\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\r\n\t\tbuff.close();\r\n\t\tfileRead.close();\r\n\r\n\t\treturn list;\r\n\t}", "private static List<Student> loadStudentList(File file) throws IOException {\n return loadStudentList(new FileInputStream(file));\n }", "public static ArrayList<String> lerArquivo(String nomeArquivo) {\n\t\tString payLoad = \"\";\n\t\tArrayList<String> lista = new ArrayList<String>();\n\t\t\n\t\t\ttry{\n\t\t\t\tFileReader fr = new FileReader(nomeArquivo);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\t\n\t\t\t\twhile(true){\n\t\t\t\t\tpayLoad = br.readLine();\n\t\t\t\t\t\n\t\t\t\t\tif (payLoad == null){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlista.add(payLoad); //Adiciona no mapa.\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(s);\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t\tcatch (IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"Impossivel ler no arquivo\");\n\t\t\t}\n\t\t\t\n\t\t\treturn lista;\n\t}", "public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }", "public static void readFromFile(ArrayList<String> sArrayList, Context context){\n\n int i=0;\n try{\n InputStream inputStream = context.openFileInput(TxtName);\n\n if(inputStream!=null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receivedString = \"\";\n\n while((receivedString = bufferedReader.readLine())!=null){\n sArrayList.set(i,receivedString);\n Log.d(\"fileContent\", \"readFromFile: \"+sArrayList.get(i)+\"\\n\");\n i++;\n }\n inputStream.close();\n }\n\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n }\n\n }", "private void loadInventory(String fileName){\t\t\r\n\t\tList<String> list = new ArrayList<String>();\r\n\r\n\t\ttry (Stream<String> stream = Files.lines(Paths.get(fileName))) {\r\n\t\t\t//Convert it into a List\r\n\t\t\tlist = stream.collect(Collectors.toList());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor(String itemList : list){\r\n\t\t\tString[] elements = itemList.split(\"--\");\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tswitch(elements[0].toUpperCase()){\r\n\t\t\t\t\tcase \"BURGER\":\r\n\t\t\t\t\t\t\tinventory.add(createBurger(elements));;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"SALAD\":\r\n\t\t\t\t\t\t\tinventory.add(createSalad(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"BEVERAGE\":\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createBeverage(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"SIDE\":\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createSide(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"DESSERT\":\r\n\t\t\t\t\t\t\tinventory.add(createDessert(elements));;\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "public ArrayList<Task> loadData() throws IOException {\n DateTimeFormatter validFormat = DateTimeFormatter.ofPattern(\"MMM dd yyyy HH:mm\");\n ArrayList<Task> orderList = new ArrayList<>();\n\n try {\n File dataStorage = new File(filePath);\n Scanner s = new Scanner(dataStorage);\n while (s.hasNext()) {\n String curr = s.nextLine();\n String[] currTask = curr.split(\" \\\\| \");\n assert currTask.length >= 3;\n Boolean isDone = currTask[1].equals(\"1\");\n switch (currTask[0]) {\n case \"T\":\n orderList.add(new Todo(currTask[2], isDone));\n break;\n case \"D\":\n orderList.add(new Deadline(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n case \"E\":\n orderList.add(new Event(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n }\n }\n } catch (FileNotFoundException e) {\n if (new File(\"data\").mkdir()) {\n System.out.println(\"folder data does not exist yet.\");\n } else if (new File(filePath).createNewFile()) {\n System.out.println(\"File duke.txt does not exist yet.\");\n }\n }\n return orderList;\n\n }", "public ArrayList<String> getPageAsList() throws FileNotFoundException{\r\n\t\t//List of lines of the file that's being translated\r\n\t\tArrayList<String> pageLines = new ArrayList<String>();\r\n\t\tScanner file = new Scanner(page);\r\n\t\t\r\n\t\t//Takes the file and cuts it into lines, with each one being added to a list\r\n\t\twhile(file.hasNextLine()){\r\n\t\t\tpageLines.add(file.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\treturn pageLines;\r\n\t}", "public void loadStaffList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxStaff = Integer.parseInt(in.readLine());\n staffList = new Staff[maxStaff];\n int numStaffInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numStaffInFile; i++){\n \n String staffType = in.readLine();\n if (staffType.equals(\"Labourer\")) {\n staffList[i] = new Labourer(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()));\n numStaff++;\n } else if (staffType.equals(\"Manager\")) /*;*/\n {\n staffList[i] = new Manager(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()));\n numStaff++;\n }\n }\n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n \n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "private void loadLists() {\n }", "public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }", "public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void readFromFile(String path) {\n try {\n ArrayList<String> list = new ArrayList<>(Files.readAllLines(Paths.get(path)));\n\n for (String info: list) {\n AddressEntry entry = new AddressEntry();\n ArrayList<String> entryList = new ArrayList<>(Arrays.asList(info.split(\",\")));\n entry.setFirstName(entryList.get(0).trim());\n entry.setLastName(entryList.get(1).trim());\n entry.setStreet(entryList.get(2).trim());\n entry.setCity(entryList.get(3).trim());\n entry.setState(entryList.get(4).trim());\n entry.setZip(Integer.parseInt(entryList.get(5).trim()));\n entry.setPhone(entryList.get(6).trim());\n entry.setEmail(entryList.get(7).trim());\n add(entry);\n }\n\n System.out.println(\"Read in \" + list.size() + \" new Addresses. Successfully loaded\");\n System.out.println(\"There are currently \" + addressEntryList.size() + \" Addresses in the Address Book.\");\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }", "private ArrayList<User> loadUsers(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<User>>(){}.getType();\r\n\t\tArrayList<User> users = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn users;\r\n\t}", "private Runnable loadItems() {\n File file = new File(getFilesDir(), \"data.txt\");\n\n try {\n // Clears and adds appropriate items\n this._items.clear();\n this._items.addAll(FileUtils.readLines(file, Charset.defaultCharset()));\n } catch (IOException e) {\n Log.e(\"MainActivity\", \"Error reading items\", e);\n }\n\n // Return a callback function for saving items\n return () -> {\n try {\n FileUtils.writeLines(file, this._items);\n } catch (IOException e) {\n Log.e(\"MainActivity\", \"Error writing items\", e);\n }\n };\n }", "public void readFile()\n {\n try {\n fileName = JOptionPane.showInputDialog(null,\n \"Please enter the file you'd like to access.\"\n + \"\\nHint: You want to access 'catalog.txt'!\");\n \n File aFile = new File(fileName);\n Scanner myFile = new Scanner(aFile);\n \n String artist, albumName; \n while(myFile.hasNext())\n { //first we scan the document\n String line = myFile.nextLine(); //for the next line. then we\n Scanner myLine = new Scanner(line); //scan that line for our info.\n \n artist = myLine.next();\n albumName = myLine.next();\n ArrayList<Track> tracks = new ArrayList<>();\n \n while(myLine.hasNext()) //to make sure we get all the tracks\n { //that are on the line.\n Track song = new Track(myLine.next());\n tracks.add(song);\n }\n myLine.close();\n Collections.sort(tracks); //sort the list of tracks as soon as we\n //get all of them included in the album.\n Album anAlbum = new Album(artist, albumName, tracks);\n catalog.add(anAlbum);\n }\n myFile.close();\n }\n catch (NullPointerException e) {\n System.err.println(\"You failed to enter a file name!\");\n System.exit(1);\n }\n catch (FileNotFoundException e) {\n System.err.println(\"Sorry, no file under the name '\" + fileName + \"' exists!\");\n System.exit(2);\n }\n }", "private void readSavedFile() {\n\n String[] files = new String[0];\n \n // On récupère la liste des fichiers\n File file = new File(folderName);\n\n // check if the specified pathname is directory first\n if(file.isDirectory()){\n //list all files on directory\n files = file.list();\n }\n\n if (files != null) {\n for(String currentFile : files) {\n Vehicule voiture;\n try {\n FileInputStream fileIn = new FileInputStream(folderName + \"/\" + currentFile);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n voiture = (Vehicule) in.readObject();\n addVoitureToList(voiture);\n in.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"#Erreur : Impossible de récupérer l'objet \" + currentFile);\n c.printStackTrace();\n return;\n }\n }\n }\n }", "private ArrayList<String> load(String fileName, String initialWord)\n\t{\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\ttry{\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\t\tString word = reader.readLine();\n\t\t\twhile(word != null){\n\t\t\tif(word.length()==initialWord.length())\n\t\t\t\twords.add(word);\n\t\t\tword = reader.readLine();\n\t\t\t}\n\t\t\treader.close();\n\t\t}catch(IOException e){\n\t\t\tSystem.err.println(\"Can't find a file '\"+fileName+\"'!\");\n\t\t\tJOptionPane.showMessageDialog(null,\"Can't find a file '\"+fileName+\"'!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\treturn words;\n\t}", "public void readFile(){\n try {\n highscores = new ArrayList<>();\n BufferedReader br = new BufferedReader(new FileReader(\"Highscores.txt\"));\n String line = br.readLine();\n while (line != null){\n try{\n highscores.add(Integer.parseInt(line));\n } catch (NumberFormatException e){}\n line = br.readLine();\n }\n br.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"No file found\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ArrayList<String> readFile(File file) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tif (file.exists()) {\n\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\tString line;\n\t\t\t\tbr.readLine();\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\tal.add(line);\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t} catch (IOException e) {\t\n\t\t\t}\n\t\treturn al;\n\t\t}", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public static < E > ArrayList<E> readArrayList () throws IOException, ClassNotFoundException{\n ArrayList<E> outputArrayList = new ArrayList<E>();\n // åbn inputstreams på al.ser\n FileInputStream fi = new FileInputStream(\"al.ser\");\n ObjectInputStream oi = new ObjectInputStream(fi);\n // cast til arraylist af generisk type\n outputArrayList = (ArrayList<E>) oi.readObject();\n // luk inputstreams og returner\n oi.close();\n fi.close();\n return outputArrayList;\n }", "public static ArrayList<Player> readPlayersFromFile() \r\n {\r\n //Inisialize Arraylist \r\n ArrayList<Player> players = new ArrayList<Player>();\r\n //Inisialize FileInputStream\r\n FileInputStream fileIn = null;\r\n\r\n try \r\n {\r\n //Establish connection to file \r\n fileIn = new FileInputStream(\"players.txt\");\r\n while (true) \r\n {\r\n //Create an ObjectOutputStream \r\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\r\n //Read a Player object from the file and add it to the ArrayList\r\n players.add((Player)objectIn.readObject());\r\n }//end while\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e);\r\n }\r\n finally \r\n {\r\n usernamesTaken.clear();\r\n\r\n for(int i = 0; i < players.size(); i++)\r\n {\r\n usernamesTaken.add(players.get(i).getUsername());\r\n }//end for\r\n\r\n //Try to close the file and return the ArrayList\r\n try\r\n {\r\n //Check if the end of the file is reached\r\n if (fileIn != null)\r\n { \r\n //Close the file \r\n fileIn.close();\r\n //Return the ArrayList of players\r\n return players;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e)\r\n }//end try \r\n\r\n //Return null if there is an excetion \r\n return null;\r\n }//end try \r\n }", "@PostConstruct\n private List<String> loadFortunesFile() {\n System.out.println(\">> FileFortuneService: inside method 'loadFortunesFile'.\");\n\n try {\n String fileName = \"src/com/luv2code/springdemo/fortune_data.txt\";\n BufferedReader reader = new BufferedReader(new FileReader(fileName));\n String line = null;\n while ( (line = reader.readLine()) != null) {\n fortunes.add(line);\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred during file-stream: \");\n e.printStackTrace();\n }\n return fortunes;\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static ArrayList<Tweet> load(String fname) {\n\t\tArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t\n\t\ttry {\n\t\t FileInputStream fin = new FileInputStream(fname);\n\t\t ObjectInputStream ois = new ObjectInputStream(fin);\n\t\t tweets = (ArrayList<Tweet>) (ois.readObject());\n\t\t ois.close();\n\t\t} catch (FileNotFoundException ex) {\n\t\t ex.printStackTrace();\n\t\t} catch (IOException ioex) {\n\t\t ioex.printStackTrace();\n\t\t}\n\t\tcatch (ClassNotFoundException classex) {\n\t\t classex.printStackTrace();\n\t\t}\n\t\treturn tweets;\n }", "public List<String> loadFromFile(String fileName) {\n String line;\n List<String> listValuesFieldsEmployees = new ArrayList<>();\n\n try (FileReader fileReader = new FileReader(fileName);\n BufferedReader reader = new BufferedReader(fileReader)) {\n while ((line = reader.readLine()) != null) {\n listValuesFieldsEmployees.add(line);\n }\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return listValuesFieldsEmployees;\n }", "private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public List<Event> fillArrayList()\r\n {\r\n List<Event> list1=new ArrayList<>();\r\n FileReader fr=null;\r\n \r\n try{\r\n \r\n fr=new FileReader(\"./event.txt\");\r\n BufferedReader bf=new BufferedReader(fr);\r\n String s;\r\n \r\n while((s=bf.readLine())!=null)\r\n {\r\n Event event=new Event();\r\n String s1[]=new String[7];\r\n for(int i=0;i<s1.length;i++)\r\n {\r\n s1=s.split(\",\");\r\n \r\n event.setId(Integer.parseInt(s1[0]));\r\n \r\n event.setName(s1[1]);\r\n \r\n event.setOrganizer(s1[2]);\r\n \r\n Date date=Date.valueOf(s1[3]);\r\n \r\n event.setDate(date);\r\n \r\n event.setFees(Double.parseDouble(s1[4]));\r\n \r\n } \r\n list1.add(event);\r\n }\r\n \r\n bf.close();\r\n \r\n }catch(Exception e){e.printStackTrace();}\r\n return list1;\r\n\r\n }" ]
[ "0.7128241", "0.71088195", "0.7095802", "0.7063298", "0.70460737", "0.6865823", "0.68558973", "0.68514544", "0.680752", "0.677871", "0.67537755", "0.6717646", "0.66407007", "0.659682", "0.6585017", "0.6583668", "0.6577903", "0.65673244", "0.6522603", "0.6504354", "0.6499912", "0.64779997", "0.64683527", "0.6459072", "0.64540833", "0.6437024", "0.6430094", "0.64233756", "0.64113253", "0.63971287", "0.6375923", "0.63694566", "0.63682026", "0.6360215", "0.6357885", "0.63578653", "0.6356067", "0.63438326", "0.6332558", "0.63254446", "0.63214666", "0.6320701", "0.63196754", "0.6311365", "0.63107616", "0.6305252", "0.62983495", "0.62833095", "0.6278749", "0.62768584", "0.6268876", "0.62563854", "0.62448555", "0.62194836", "0.62119174", "0.61986274", "0.61983865", "0.6195006", "0.6190891", "0.6189356", "0.618882", "0.6184252", "0.6168642", "0.61669976", "0.6138558", "0.6137429", "0.613674", "0.6131842", "0.6129699", "0.6121953", "0.61185586", "0.6117427", "0.6114632", "0.6113379", "0.6111726", "0.6103521", "0.6090236", "0.6088611", "0.6087291", "0.60849106", "0.6080531", "0.60786116", "0.6077466", "0.6076886", "0.60720134", "0.6066162", "0.6060421", "0.6060021", "0.6045226", "0.60411036", "0.6031267", "0.6026741", "0.60232276", "0.60205966", "0.60164684", "0.6016045", "0.601515", "0.6012107", "0.6008923", "0.6004881" ]
0.64063865
29
This method takes a file name and a line to write to a file it then overwrites all the items in the file with the text passed down
public static void overwriteFile(String fileName, String lineToWrite) throws IOException { FileWriter writer = new FileWriter(fileName); writer.write(lineToWrite); writer.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeFile(String line, BufferedWriter theOutFile) throws Exception {\n\t\ttheOutFile.append(line);\t\t\t// write the line out\n\t\ttheOutFile.newLine();\t\t\t\t// skip to the next line\t\t\n\t}", "public static void writeToFile(String filename, String line) {\n try {\n FileWriter fw = new FileWriter(PATH + filename, true); //the true will append the new data\n fw.write(line + \"\\n\");//appends the string to the file\n fw.close();\n } catch (IOException ioe) {\n System.err.println(\"IOException: \" + ioe.getMessage());\n }\n }", "private void writeFileLine(String s, File file)throws IOException{\n\t\tFileWriter filewriter = new FileWriter(file);\n\t\tPrintWriter printWriter = new PrintWriter(filewriter);\n\t\tprintWriter.print(s);\n\t\tprintWriter.close();\n\t}", "public void writeLine(String line){\n\t\ttry{\n\t\t\tout.write(line);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File cannot be written too.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public static void writeFile(String line, String filename) throws IOException {\n\t\tFile file = new File(filename);\r\n\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\r\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\tbw.write(line);\r\n\t\tbw.close();\r\n\t}", "private void writeFile(File file, String... lines) throws IOException {\n try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file))) {\n for (String line : lines) {\n bufferedWriter.write(line);\n bufferedWriter.newLine();\n }\n }\n }", "public static void fileWriter(String path, String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(path + File.separator + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t}", "public void writeLineToFile(File file, String content) throws IOException {\n\t\tBufferedWriter writer = writers.get(file);\n\t\twriter.append(content + \"\\n\");\n\t}", "public static void save(String line)\n {\n \ttry (BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8)) {\n \t\twriter.write(line,0,line.length());//takes the lines stars from the index 0 and saves till the end\n \t} catch (Exception x) {\n \t\tx.printStackTrace();//prints stack if something is worng\n \t}\n }", "public static void writeLine(String filePath, String line) {\n\t\ttry {\n\t\t\tDataOutputStream os = new DataOutputStream(new FileOutputStream(filePath));\n\t\t\tos.write(line.getBytes());\n\t\t\tos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public static void writeFile(ArrayList<String> lines, String fileName)\n {\n try\n {\n // Create file \n FileWriter fstream = new FileWriter(fileName);\n BufferedWriter out = new BufferedWriter(fstream);\n for (String line: lines)\n {\n out.write(line);\n }\n //Close the output stream\n out.close();\n }\n catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "public static void writeToFile(String fileName, String lineToWrite) throws IOException\n\t{\n\t\tFileWriter writer = new FileWriter(fileName, true);\n\t\twriter.write(lineToWrite);\n\t\twriter.close();\n\t}", "public static void writeLineToFile(String filePath, String text) throws IOException {\n\t\t\n\t\t// Create the writer\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(filePath, true)));\n\t\t\n\t\t// Write a line to the file\n\t\tout.println(text);\n\t\tout.close();\n\t}", "private static void appendWordLineToFile(Path wordFilePath, Path srcFilePath, Path destFilePath, int lineNum) throws IOException {\n try (FileReader inputStream = new FileReader(srcFilePath.toFile().getAbsolutePath());\n FileWriter outputStream = new FileWriter(destFilePath.toFile().getAbsoluteFile(), false)) {\n\n // If insert to the first line\n if (lineNum == 0) {\n // Insert the word\n writeWordLineToFile(wordFilePath, outputStream);\n\n // Append the rest of the words\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n } else {\n int lineCount = 0;\n\n // Copy the words until the given line is reached\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n\n if (isWhitespace(i)) {\n lineCount++; // new line\n\n if (lineCount == lineNum) { // if the given line is reached, insert the given word\n writeWordLineToFile(wordFilePath, outputStream);\n }\n }\n }\n\n // Insert the word to the end\n if (lineCount < lineNum) {\n writeWordLineToFile(wordFilePath, outputStream);\n }\n }\n }\n }", "public void writeFile(String data){\n\t\t\n\t\tcurrentLine = data;\n\t\t\n\t\t\ttry{ \n\t\t\t\tFile file = new File(\"/Users/bpfruin/Documents/CSPP51036/hw3-bpfruin/src/phfmm/output.txt\");\n \n\t\t\t\t//if file doesnt exists, then create it\n\t\t\t\tif(!file.exists()){\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t}\n \n\t\t\t\t//true = append file\n\t\t\t\tFileWriter fileWriter = new FileWriter(file,true);\n \t \tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\n \t \tbufferWriter.write(data);\n \t \tbufferWriter.close();\n \n \n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t}", "public void writeLineToSdcard(String filename, String line) {\n final String outputFile = Environment.getExternalStorageDirectory().toString() + \"/\"\n + filename;\n try {\n FileWriter fstream = null;\n fstream = new FileWriter(outputFile, true);\n BufferedWriter out = new BufferedWriter(fstream);\n out.write(line + \"\\n\");\n out.close();\n fstream.close();\n Log.print(\"write log: \" + outputFile);\n } catch (Exception e) {\n Log.print(\"exception for write log\");\n }\n }", "public static void fileWriter(String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t}", "public static void saveAs(String line,String path)\n {\n \ttry (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"utf-8\"))) {//goes to the directory\n \t\n \t\twriter.write(line,0,line.length());//saves the lines starting from 0 till the length of the lines\n \t} catch (Exception x) {\n \t\tx.printStackTrace();\n \t}\n }", "private void writeTo(String logEntry, File logFile) throws IOException {\n try (FileWriter logFileWriter = new FileWriter(logFile, true);) {\n logFileWriter.write(logEntry);\n logFileWriter.write(System.lineSeparator());\n logFileWriter.flush();\n logFileWriter.close();\n }\n}", "public static void ReplacesEntry(int index){\n int cont = 0;\n String[] thingstowrite = ManageCommissionerList.ReturnsCommissionerListInString(index);\n try{\n Path path = Paths.get(\"logscommission.txt\");\n List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);\n for(int i = index*19;i<(index*19)+19;i++){\n lines.set(i, thingstowrite[cont]);\n cont++;\n }\n Files.write(path, lines, StandardCharsets.UTF_8);\n }catch(Exception e){\n e.printStackTrace();\n System.out.printf(\"Not possible to replace entry!\\n\");\n }\n }", "public static void fileWriterPrinter(String path, String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(path + fileName);\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t fileWriterPrinter(printLine);\n\t\t\t}", "public static void writeLines(File todo, String text) {\n\t\t// Check if data is not null\n\t\tif (text != null) {\n\t\t\ttry {\n\t\t\t\t// check if the file exist, else create a new\n\t\t\t\tif (!todo.exists()) {\n\t\t\t\t\ttodo.createNewFile();\n\t\t\t\t\t// todo.setWritable(true);\n\t\t\t\t}\n\n\t\t\t\tOutputStreamWriter out = new OutputStreamWriter(\n\t\t\t\t\t\tnew FileOutputStream(todo, MODE_APPEND));\n\n\t\t\t\tout.write(text);\n\t\t\t\tout.write('\\n');\n\t\t\t\tout.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.out.println(\"Exception in File Utils :: \"\n\t\t\t\t\t\t+ ioe.getMessage());\n\t\t\t\t// Throw this exception to the caller\n\t\t\t}\n\t\t}\n\t}", "public static void writeLinesToTextFile(ArrayList<String> lines, String fileName) {\n String nl = System.getProperty(\"line.separator\");\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));\n\n for (int i = 0; i < lines.size(); i++) {\n bw.write(lines.get(i) + nl);\n }\n\n bw.close();\n } catch (IOException e) {\n MessageGenerator.briefErrorAndExit(\"Error writing file: \" +\n fileName + File.separator + e.getMessage());\n }\n }", "public static void writeFile(String file, String rowData) throws Exception {\n\n Boolean bFound = false;\n\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String getLine = \"\";\n\n // verify if row entry exists\n while ( (getLine = reader.readLine()) != null){\n if (getLine.contains(rowData)){\n bFound = true;\n break;\n }\n }\n reader.close();\n\n if (bFound != true){\n BufferedWriter writer = new BufferedWriter(new FileWriter(file, true));\n\n writer.append(rowData);\n writer.newLine();\n writer.close();\n }\n }", "public void writeToTextFile(String filename){\n try{\n FileWriter myWriter = new FileWriter(filename); \n myWriter.write(toString());\n myWriter.close();\n } \n catch(IOException e) { \n System.out.println(\"An error occurred.\"); \n e.printStackTrace();\n } \n }", "public static void append(String fileName, String text, boolean newline) throws\r\n IOException {\r\n File f = new File(fileName);\r\n if (f.exists())\r\n append(f, text, newline);\r\n else\r\n throw new FileNotFoundException();\r\n }", "private void writeItems() {\n\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n\n // try to add items to file\n try {\n FileUtils.writeLines(todoFile, items);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void writeLine(String line) throws IOException {\n writer.write(line);\n writer.write(EOL);\n }", "public static void modifytext (String name) throws IOException {\n // Copy the contents of the input file and put it into the new file\n File inputF = new File(\"src/main/java/ex45/\"+ name +\".txt\");\n Path dest = inputF.toPath();\n Path src = Paths.get(\"src/main/java/ex45/exercise45_input.txt\");\n Files.copy(src, dest);\n\n // This process will replace the word 'utilize' with the word 'use'\n String utilize = new String(Files.readAllBytes(dest));\n Charset charset = StandardCharsets.UTF_8;\n utilize = utilize.replaceAll(\"utilize\", \"use\");\n Files.write(dest, utilize.getBytes(charset));\n\n System.out.print(\"Your file has been created.\");\n }", "protected boolean appendLine(final String filename, final String line) {\n final StringBuilder finalLine = new StringBuilder();\n \n if (addtime) {\n String dateString;\n try {\n final DateFormat dateFormat = new SimpleDateFormat(timestamp);\n dateString = dateFormat.format(new Date()).trim();\n } catch (IllegalArgumentException iae) {\n // Default to known good format\n final DateFormat dateFormat = new SimpleDateFormat(\"[dd/MM/yyyy HH:mm:ss]\");\n dateString = dateFormat.format(new Date()).trim();\n \n eventBus.publishAsync(new UserErrorEvent(ErrorLevel.LOW, iae,\n \"Dateformat String '\" + timestamp + \"' is invalid. For more information: \"\n + \"http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html\",\n \"\"));\n }\n finalLine.append(dateString);\n finalLine.append(' ');\n }\n \n if (stripcodes) {\n finalLine.append(Styliser.stipControlCodes(line));\n } else {\n finalLine.append(line);\n }\n \n try {\n final BufferedWriter out;\n if (openFiles.containsKey(filename)) {\n final OpenFile of = openFiles.get(filename);\n of.lastUsedTime = System.currentTimeMillis();\n out = of.writer;\n } else {\n out = new BufferedWriter(new FileWriter(filename, true));\n openFiles.put(filename, new OpenFile(out));\n }\n out.write(finalLine.toString());\n out.newLine();\n out.flush();\n return true;\n } catch (IOException e) {\n /*\n * Do Nothing\n *\n * Makes no sense to keep adding errors to the logger when we can't write to the file,\n * as chances are it will happen on every incomming line.\n */\n }\n return false;\n }", "public static void addLine(File file, String lineToAdd) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n\n while ((line = in.readLine()) != null) {\n vLines.add(line + \"\\n\");\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.write(lineToAdd);\n out.close();\n }", "void putLine(String line);", "private static void write(BufferedWriter fileWriter,int startLine, int endLine) throws IOException {\n try(BufferedReader fileReader = new BufferedReader\n (new FileReader(\"C:\\\\Users\\\\radha\\\\Documents\\\\Research\\\\ml-25m\\\\ml-25m\\\\ratings.csv\"))){\n String line = null;\n int lineNo = 0;\n while ((line = fileReader.readLine()) != null) {\n lineNo++;\n if(lineNo < startLine){\n continue;\n }\n fileWriter.write(line);\n fileWriter.write(\"\\n\");\n if(lineNo > endLine){\n break;\n }\n\n }\n }\n\n\n }", "private void fileModify(String text) throws IOException {\n text += \"\\n\";\n try {\n File filePath;\n filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);\n if (!filePath.exists()) {\n if (filePath.mkdir()) ; //directory is created;\n }\n\n fileOutputStream = new FileOutputStream(file);\n fileOutputStream.write(text.getBytes());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n fileOutputStream.flush();\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void write_line(String string)\n {\n String[] current = read();\n\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n PrintWriter writer = new PrintWriter(dir);\n\n for (int i = 0; i < current.length; i++)\n {\n String line = current[i];\n if (line != null)\n {\n writer.println(line);\n }\n }\n writer.println(string);\n writer.close();\n }catch (Exception ex)\n {\n debug = \"test write failure\";\n }\n }", "public void writeToTextFile(String fileName, String content) throws IOException {\n \tFiles.write(Paths.get(fileName), content.getBytes(), StandardOpenOption.CREATE);\n \t}", "void updateFile() throws IOException;", "protected abstract void writeFile();", "private void writeLine(String s) throws IOException {\n\tfbuf.write(s, 0, s.length());\n\tfbuf.newLine();\n }", "public static void writeLine(String fileName, String content) {\r\n write(fileName, content + System.lineSeparator());\r\n\r\n }", "private void updateFile() {\n\t\tPrintWriter outfile;\n\t\ttry {\n\t\t\toutfile = new PrintWriter(new BufferedWriter(new FileWriter(\"stats.txt\")));\n\t\t\toutfile.println(\"15\"); // this is the number\n\t\t\tfor (Integer i : storeInfo) {\n\t\t\t\toutfile.println(i); // we overwrite the existing files\n\t\t\t}\n\t\t\tfor (String s : charBought) {\n\t\t\t\toutfile.println(s); // overwrite the character\n\t\t\t}\n\t\t\tfor (String s : miscBought) {\n\t\t\t\toutfile.println(s);\n\t\t\t}\n\t\t\toutfile.close();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "private void addLine (String line) {\n writer.write (line);\n writer.newLine();\n // blockOut.append (line);\n // blockOut.append (GlobalConstants.LINE_FEED);\n }", "public static void writeAllLines(String filePath, List<String> lines) {\n\t\ttry {\n\t\t\tFileUtils.write(new File(filePath), lines.get(0));\n\t\t} catch (IOException e) {\n\t\t\tthrow new FileDoesntExistException(filePath);\n\t\t}\n\t}", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "public static void writeTextFile(File file, String content) throws IOException {\n BufferedWriter bw = new BufferedWriter(new FileWriter(file));\n bw.write(content, 0, content.length());\n bw.flush();\n bw.close();\n }", "public static void enterNewTXTFile(String input, String id, String newName, String newHandle, String newTime, String newTweet)\n {\n try {\n String str = Integer.parseInt(id)+ \" \" +newName+ \" \" +newHandle+ \" \" +newTime+ \" \" +newTweet+ \" \";\n writer = new BufferedWriter(new FileWriter(input, true)); // continue to write to existing output file\n writer.write(str);\n writer.newLine();\n writer.close();\n \n } catch (Exception e) { System.out.println(e); }\n }", "public static void fileWriterPrinter(String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t fileWriterPrinter(printLine);\n\t\t\t}", "public static void main(String args[])\n {\n String FILENAME = \"myfile.txt\";\n\n // When used, the FileWriter object will immediately put it's output\n // to the file. So FileWriter output attempts to write to the file as\n // fast as possible. Maybe this is a good thing in some\n // circumstances, but I think it would be better to write data in\n // chunks. We employ a BufferedWriter object to capture the\n // FileWriter output into a collection of bytes that can be written\n // to the file.\n FileWriter fWriter = null;\n BufferedWriter bWriter = null;\n\n // Wrapping our attempt to write to the file inside a try / catch\n // statement allows us to trap some errors if they happen\n try\n {\n // Here is the content that we will write to the file.\n String fileContent = \"Dude, I'm totally writing to a file!!\";\n\n // These lines instantiate FileWriter and BufferedWriter objects.\n // When instantiating the FileWriter object we pass in the file\n // name that we are writing to. If no path is given in our\n // filename, the file will be created and written in the root\n // directory.\n fWriter = new FileWriter(FILENAME);\n\n // The BufferedWriter object is instantiated on this line and the\n // FileWriter object is passed in as an argument.\n bWriter = new BufferedWriter(fWriter);\n\n // Now that we have our buffer and writer objects created, we can\n // attempt to write content to the file. Here is what\n // (I think) this is doing. The BufferedWriter object will receive\n // the content to be written, and then pass that content as a\n // whole to the FileWriter so it can be written to the file as a\n // chunk. If we did not do it this way, the content would be read\n // passed into the FileWriter object, converted to bytes on the\n // fly, and immediately written, byte by byte as it is converted,\n // to the file. By buffering we are increasing the performance of\n // this action.\n bWriter.write(fileContent);\n }\n\n // The catch statement will trap and display any exception that is\n // created when we are attempting to create our writer objects, open\n // or create the file, or write content.\n catch(Exception e)\n {\n System.out.println(\"Unable to write to file : \" + e.getMessage());\n }\n\n // This 'finally' statement will always happen, regardless of what\n // happens in our try/catch statement. If we put this code into the\n // try statement and we received an error, it would never be\n // processed. Additionally, if we put this code at the bottom of our\n // program and ran into an error half way through, it would never be\n // processed. Placing the code into a finally statement allows us to\n // ensure that it is run every time.\n finally\n {\n // Another try and catch statement to trap any error that happens\n // when closing the files.\n try\n {\n // The last thing we want to do is close out our writer\n // objects. This is a best practice since if you leave the\n // writer open you are at best wasting system resources, and\n // at worst you could lock this file for editing while other\n // resources are trying to use it. We check to make sure it\n // is not already disposed of, and then we call the close()\n // method.\n if (bWriter != null) {\n bWriter.close();\n }\n\n if (fWriter != null) {\n fWriter.close();\n }\n }\n // Our final catch reveals any errors that popped up when we were\n // attempting to close the writer and buffer objects.\n catch (Exception e)\n {\n System.out.println(\"Unable to close writer objects :\"\n + e.getMessage());\n }\n }\n }", "public abstract AbstractLineWriter newWriter(String filename)\r\n\t\t\tthrows FileNotFoundException, IOException;", "@Override\n public void writeDataToTxtFile() {\n\n }", "public static void appendFile(PrintWriter pw, String file) throws IOException {\n\t\tfw = new FileWriter(file, true);\n\t\tmyFile = new File(file);\n\t\t//allows me to read file\n\t\tinFile = new Scanner(myFile);\n\t\t\n\t}", "public void store(final File f) throws IOException {\n BufferedOutputStream fos = null;\n try {\n fos = new BufferedOutputStream(new FileOutputStream(f));\n final StringBuilder line = new StringBuilder(64);\n for (final Map.Entry<String, String> entry : entrySet()) {\n line.delete(0, line.length());\n line.append(entry.getKey());\n line.append(\"=\");\n line.append(patternNewline.matcher(entry.getValue()).replaceAll(\"\\\\\\\\n\"));\n line.append(\"\\r\\n\");\n\n fos.write(UTF8.getBytes(line.toString()));\n }\n } finally {\n if (fos != null) {\n try {\n fos.flush();\n fos.close();\n } catch (final Exception e){}\n }\n }\n }", "public static void rewriteFile(String name, String path, List<String> txt)\n\t{\n\t\tString pathb = Constants.path + \"/\" + path;\n\n\t\tFile folder = new File(pathb);\n\t\tif (!folder.exists())\n\t\t{\n\t\t\tfolder.mkdirs();\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(pathb, name);\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\n\t\t\tFileWriter ffr = new FileWriter(file);\n\t\t\tBufferedWriter fbr = new BufferedWriter(ffr);\n\n\t\t\tfor (String s : txt)\n\t\t\t{\n\t\t\t\tfbr.write(s + \"\\n\");\n\t\t\t}\n\n\t\t\tfbr.flush();\n\t\t\tfbr.close();\n\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeFileContents(String filename, String contents) {\n }", "public void saveFile()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\t\n\t\tfor(CSVItem cItem : itemList)\n\t\t{\n\t\t\tsb.append(cItem.buildCSVString()).append(newLine);\n\t\t\t\n\t\t}\n\t\tString fileString = sb.toString();\n\t\t\n\t\t File newTextFile = new File(filePath);\n\n FileWriter fw;\n\t\ttry {\n\t\t\tfw = new FileWriter(newTextFile);\n\t\t\t fw.write(fileString);\n\t\t fw.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n\n\t}", "public static void writeTextFile(String path, String content) throws IOException{\r\n FileWriter fw = new FileWriter(path, true);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n bw.write(content);\r\n bw.close();\r\n fw.close();\r\n }", "public void setContents(File aFile, String aContents)\n throws FileNotFoundException, IOException {\n if (aFile == null) {\n throw new IllegalArgumentException(\"File should not be null.\");\n }\n if (!aFile.exists()) {\n aFile.createNewFile();\n }\n if (!aFile.isFile()) {\n throw new IllegalArgumentException(\"Should not be a directory: \"\n + aFile);\n }\n if (!aFile.canWrite()) {\n throw new IllegalArgumentException(\"File cannot be written: \"\n + aFile);\n }\n\n // declared here only to make visible to finally clause; generic\n // reference\n Writer output = null;\n try {\n // use buffering\n // FileWriter always assumes default encoding is OK!\n output = new BufferedWriter(new FileWriter(aFile));\n output.write(aContents);\n } finally {\n // flush and close both \"aspectOutput\" and its underlying FileWriter\n if (output != null) {\n output.close();\n }\n }\n }", "public void writeTextFile(String s) {\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,true)));\n\t\t\twriter.println(s);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to\\t\\\"\" + filename + \"\\\"\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t}", "public void writeToFile(File file) {\n\n\t}", "protected void append(String line) {\n\t\t\tout.append(line);\n\t\t}", "void appendUserInformation(String line);", "void writeText(FsPath path, String text);", "private void writeToFile(String fileName,String contents) throws IOException{\r\n\t\tFileWriter fw = new FileWriter(fileName,true);\r\n\t\tPrintWriter pw = new PrintWriter(fw);\r\n\t\tpw.write(contents+\"\\r\\n\");\r\n\t\tpw.close();\r\n\t}", "public void writeFile(String content){\n\t\tFile file = new File(filePath);\n\t\t\n\t\tBufferedWriter bw = null;\n\t\t\n\t\ttry{\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(content);\n\t\t}\n\t\tcatch (Exception oops){\n\t\t\tSystem.err.print(\"There was an error writing the file \"+oops.getStackTrace());\n\t\t}\n\t\tfinally{\n\t\t\ttry{\n\t\t\t\tbw.close();\n\t\t\t}\t\n\t\t\tcatch(IOException oops){\n\t\t\t\tSystem.err.print(\"There was an error closing the write buffer \"+oops.getStackTrace());\n\t\t\t}\n\t\t}\n\t}", "public void line(String line) {\n\t\t}", "public void saveFile(File file, String text) {\r\n\t\t\r\n\t\tif (file==null){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\r\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) {\r\n\r\n\t\t\tbw.write(text);\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void write(String filename, String text) {\n\n try (FileWriter writer = new FileWriter(filename)) {\n writer.write(text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void replaceFirstLine(String filename, String ar[]) {\n\t String oldFileName = filename;\n\t String tmpFileName = \"tmp_auto.txt\";\n\n\t BufferedReader br = null;\n\t BufferedWriter bw = null;\n\t try {\n\t br = new BufferedReader(new FileReader(oldFileName));\n\t bw = new BufferedWriter(new FileWriter(tmpFileName));\n\t String line;\n\t //read first line\n\t line = br.readLine(); //read and do nothing\n\t bw.write(ar[0]+\",\"+ar[1]+\",\"+ar[2]+\",\"+ar[3]+\",\"+ar[4]+\"\\n\");\n\t //read and write rest of file\n\t while ((line = br.readLine()) != null) {\n\t bw.write(line+\"\\n\");\n\t }\n\t } catch (Exception e) {\n\t return;\n\t } finally {\n\t try {\n\t if(br != null)\n\t br.close();\n\t } catch (IOException e) {\n\t //\n\t }\n\t try {\n\t if(bw != null)\n\t bw.close();\n\t } catch (IOException e) {\n\t //\n\t }\n\t }\n\t // Once everything is complete, delete old file..\n\t File oldFile = new File(oldFileName);\n\t oldFile.delete();\n\n\t // And rename tmp file's name to old file name\n\t File newFile = new File(tmpFileName);\n\t newFile.renameTo(oldFile);\n\t }", "public void appendToFile(File file, String additionalContent) {\r\n BufferedWriter bw = null;\r\n\r\n try {\r\n if(!file.exists()) {\r\n file.createNewFile();\r\n }\r\n // open file in append mode\r\n bw = new BufferedWriter(new FileWriter(file, true));\r\n bw.write(additionalContent);\r\n bw.newLine();\r\n bw.flush();\r\n\r\n } catch (IOException ioe) {\r\n // for now, throw exception up to caller\r\n throw new RuntimeException(ioe);\r\n\r\n } finally {\r\n if (bw != null) {\r\n try {\r\n bw.close();\r\n } catch (IOException ioe2) {\r\n }\r\n }\r\n }\r\n }", "public void writeFile(String text, String writePath)\r\n\t{\r\n\t\t//Use a filewriter but change it to a buffered writer. Open writing on the file provided by writePath\r\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(writePath)))\r\n\t\t{\r\n\t\t\t// Write given text to file\r\n\t\t\twriter.write(text);\t\r\n\t\t} \r\n\t\tcatch (IOException except)\r\n\t\t{\r\n\t\t\texcept.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void sequenceWriter(String sequence) {\n try {\n Files.write(file, ((sequence + \"\\r\\n\")).getBytes(), StandardOpenOption.APPEND);\n } catch (IOException e) {\n System.out.println(\"Error:\" + e);\n }\n }", "public void addLine(String file, int line) {\r\n\t\tif (!_fileLines.containsKey(file))\r\n\t\t\t_fileLines.put(file, new ArrayList<Integer>());\r\n\t\t_fileLines.get(file).add(line);\r\n\t}", "public void writeToFile(StringBuilder text)throws IOException{\n\n Path filePath = Paths.get(\"index.txt\");\n if (!Files.exists(filePath)) {\n \t Files.createFile(filePath);\n \t}\n \tFiles.write(filePath, text.toString().getBytes(), StandardOpenOption.APPEND);\n }", "public void writeLine(String line) {\n try {\n out.println(line);\n } catch (Exception e) {\n // done\n cleanup();\n }\n }", "public static void w(String text, File loc) throws Exception {\n\r\n\t\tFileWriter fw = new FileWriter(loc, true);\r\n\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(text);\r\n\r\n\t\twriter.close();\r\n\t\tfw.close();\r\n\t}", "public static void appendString(String path, String content) {\n //Open file\n Path jPath = Paths.get(path);\n\n //Create file if necessary\n if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {\n try {\n Files.createFile(jPath);\n } catch (IOException ex) {\n System.out.print(ex);\n System.exit(1);\n }\n }\n\n //Error if not writable\n if (!Files.isWritable(jPath)) {\n System.out.println(\"File \" + jPath + \" could not be written!\");\n System.exit(1);\n }\n //Write lines\n try {\n FileWriter fw = new FileWriter(path, true);\n fw.write(content);//appends the string to the file\n fw.close();\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public void WriteRecordsTo(final String filePath) throws IOException\r\n {\r\n BufferedWriter writer = FileUtilities.OpenWriter(filePath);\r\n Iterator<ServiceRecord> iterator = records.iterator();\r\n if (iterator.hasNext())\r\n {\r\n String record = iterator.next().toString();\r\n record += Format.SERVICE_RECORD_SEPARATOR; //I repeat code here to prevent having a new line\r\n writer.write(record); //inserted into the file after the first entry.\r\n while (iterator.hasNext()) //This makes it easier to read from the file in case we have only one service record on disk\r\n {\r\n record = \"\\n\"+iterator.next().toString();\r\n record += Format.SERVICE_RECORD_SEPARATOR;\r\n writer.write(record);\r\n } \r\n } \r\n writer.close(); \r\n }", "public static void writeToFile(String fileName, ArrayList<String> linesList) throws IOException\n {\n PrintWriter printWriter = new PrintWriter(new FileWriter(fileName));\n for(String currentLine : linesList)\n {\n printWriter.println(currentLine);\n }\n printWriter.close();\n }", "public void FilesBufferWrite2Append() throws IOException {\n \ttry { \t\n \t\t\n \t \t/* This logic will check whether the file\n \t \t \t * exists or not. If the file is not found\n \t \t \t * at the specified location it would create\n \t \t \t * a new file*/\n \t \t \tif (!file.exists()) {\n \t \t\t file.createNewFile();\n \t \t \t}\n \t\t\n \t \t \t//KP : java.nio.file.Files.write - NIO is buffer oriented & IO is stream oriented!]\n \t\tString str2Write = \"\\n\" + LocalDateTime.now().toString() + \"\\t\" + outPrintLn + \"\\n\";\n \t\tFiles.write(Paths.get(outFilePath), str2Write.getBytes(), StandardOpenOption.APPEND);\n \t\t\n \t}catch (IOException e) {\n\t \t// TODO Auto-generated catch block\n\t \te.printStackTrace();\t\t\n\t\t\tSystem.out.print(outPrintLn);\n\t\t\tSystem.out.println(outPrintLn);\t\n \t}\n }", "private void writeFile(String path, String contents) throws IOException {\n File file = new File(dir, path);\n\n try (FileWriter writer = new FileWriter(file)) {\n writer.write(contents);\n }\n }", "void createSingleFileComment(ChangedFile file, Integer line, String comment);", "public void bufferedReaderWriterExample() throws IOException {\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\tbw = new BufferedWriter(new FileWriter(\"files/myfile.writer.csv\"));\n\t\t\t\n\t\t\tString line = \"\";\n\t\t\t\n\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\tbw.write(line.replaceAll(\"a\", \"REDACTED\") + \"\\n\");\n\t\t\t}\n\t\t} finally {\n\t\t\tbr.close();\n\t\t\tbw.close();\n\t\t}\n\t}", "public void writeFile(Context inContext, String Name, String Category, String ObjectType, String Latitude, String Longitude){\n\r\n\t\tFileWriter fWriter;\r\n\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\t\tfWriter = new FileWriter(\"/sdcard/data/filename.txt\");\r\n\r\n\t\t\tString newLine = System.getProperty(\"line.separator\");\r\n\t\t\t\r\n\t\t\t//Read all lines in txt file until strikes empty line and writes on that line\r\n\r\n\t\t\tFileInputStream fstream = new FileInputStream(\"filename.txt\");\r\n\t\t\t// Get the object of DataInputStream\r\n\t\t\tDataInputStream in = new DataInputStream(fstream);\r\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\t\tString strLine;\r\n\t\t\t\r\n\t\t\t//Read File Line By Line\r\n\t\t\twhile ((strLine = br.readLine()) == null) {\r\n\t\t\t\t// Print the content on the console\r\n\t\t\t\tSystem.out.println (strLine);\r\n\t\t\t\tfWriter.write(\"penis\" + newLine);\r\n\t\t\t}\r\n\r\n\t\t\t//System.out.println(\"if\"+i);\r\n\t\t\tfWriter.write(Name + \":\" + Category + \":\" + ObjectType + \":\" + Latitude + \":\" + Longitude + \";\");\r\n\t\t\tfWriter.flush();\r\n\t\t\tfWriter.close();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "public void updateFile() {\n try {\n FileWriter fw = new FileWriter(path);\n for (Task t : taskList.getTasks()) {\n fw.write(t.toTxt());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"File cannot be found\");\n }\n }", "public void writeToLogFile(String entry) {\r\n\t\ttry{\r\n\t\t\tStringBuilder out = new StringBuilder(50);\r\n\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);\r\n\t\t out.append(sdf.format(cal.getTime()) + \";\" + entry);\r\n\t\t \r\n\t\t this.write(out);\r\n\t\t}catch (Exception e){\r\n\t\t System.err.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t}", "public void writeBuyingHistory(ArrayList<String> boughtBooks)throws IOException\n {\n String toWrite = new String();\n int i =0;\n if(hisMap.get(Customer.getInstance().getUsername())==null)\n {\n hisMap.put(Customer.getInstance().getUsername(),new ArrayList<String>());\n }\n else\n {\n i=0;\n while (i<boughtBooks.size())\n {\n hisMap.get(Customer.getInstance().getUsername()).add(boughtBooks.get(i));\n i++;\n }\n }\n\n\n i=0;\n\n toWrite+=Customer.getInstance().getUsername()+\",\";\n while (i<hisMap.get(Customer.getInstance().getUsername()).size()-boughtBooks.size())\n {\n toWrite+=hisMap.get(Customer.getInstance().getUsername()).get(i)+\"%\";\n i++;\n }\n ;\n i=0;\n while (i<boughtBooks.size())\n {\n toWrite+=boughtBooks.get(i);\n if(i!=boughtBooks.size()-1)\n toWrite+=\"%\";\n i++;\n }\n\n\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"history.txt\"));\n if(specificLine>lines.size()-1)\n {\n lines.add(toWrite);\n }\n else {\n lines.set(specificLine, toWrite);\n }\n /*write part*/\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n\n fw = new FileWriter(\"history.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n\n }", "public static void overwriteFile(String newFile, String oldFile)\r\n {\r\n try\r\n {\r\n BufferedReader reader = new BufferedReader(new FileReader(newFile + \".txt\"));\r\n String line = null;\r\n StringBuilder stringBuilder = new StringBuilder();\r\n String ls = System.getProperty(\"line.separator\");\r\n\r\n FileWriter writer = new FileWriter(oldFile + \".txt\");\r\n\r\n try\r\n {\r\n while((line = reader.readLine()) != null)\r\n {\r\n stringBuilder.append(line);\r\n stringBuilder.append(ls);\r\n }\r\n\r\n writer.write(stringBuilder.toString());\r\n }\r\n catch(IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n finally\r\n {\r\n reader.close();\r\n writer.close();\r\n }\r\n }\r\n catch(Exception error)\r\n {\r\n System.out.println(error.getMessage());\r\n }\r\n }", "public void writeIDfile(String ID,String password)throws IOException\n {\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"idpassword.txt\"));\n /*write part*/\n\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n content+=ID+\",\"+password;\n\n fw = new FileWriter(\"idpassword.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n bw.close();\n fw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n }", "void addFile(int numberLines);", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "public void writer(Vector<String> toWrite, String path) throws IOException {\n file = new File(path);\n fw = new FileWriter(file);\n\n for (int i = 0; i < toWrite.size(); i++) {\n fw.write(toWrite.get(i));\n fw.write('\\n');\n fw.flush();\n }\n }", "public static void writeText(File file, String text) {\r\n\t\ttry{\r\n\t\t\tSystem.out.println(text);\r\n\t\t\tFileWriter FW = new FileWriter(file);\r\n\t\t\tBufferedWriter BW = new BufferedWriter(FW);\r\n\t\t\tBW.write(text);\r\n\t\t\tBW.close();\r\n\t\t} catch (IOException e){\r\n\t\t\tSystem.out.println(\"error writing text\");\r\n\t\t}\r\n\t}", "public static void write(boolean isLine, String ID, String line, Function function, DawnParser parser) throws DawnRuntimeException\n {\n if (line == null)\n throw new DawnRuntimeException(function, parser, \"attempted to write a null string\");\n\n Object obj = parser.getProperty(\"DAWN.IO#FILE.\" + ID);\n if (!(obj instanceof BufferedWriter))\n throw new DawnRuntimeException(function, parser, \"attempted to write into an input file\");\n\n BufferedWriter out = (BufferedWriter) obj;\n if (out != null)\n {\n try\n {\n out.write(line, 0, line.length());\n if (isLine)\n out.write(NEW_LINE);\n } catch (IOException ioe) {\n throw new DawnRuntimeException(function, parser, \"file ID \" + ID + \" cannot be written properly\");\n }\n } else\n throw new DawnRuntimeException(function, parser, \"file ID \" + ID + \" points to a non-opened file\");\n }", "public static void randomAccessWrite() {\n try {\n RandomAccessFile f = new RandomAccessFile(FILES_TEST_PATH, \"rw\");\n f.writeInt(10);\n f.writeChars(\"test line\");\n f.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "private void writeToFile(File contactsFile) {\n\n try (BufferedWriter out = new BufferedWriter(new FileWriter(contactsFile))) {\n List<String> lines = new ArrayList<>();\n\n for (User user : contacts) {\n String line = user.getUserId() + \"|\" + user.getFirstName() + \"|\" + user.getLastName() + \"|\" + user.getEmail() + \"|\" +\n user.getAge() + \"|home_\" + user.getPhoneNumbers().get(\"home\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"home\").getNumber() + \",mobile_\" +\n user.getPhoneNumbers().get(\"mobile\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"mobile\").getNumber() + \",work_\" +\n user.getPhoneNumbers().get(\"work\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"work\").getNumber() + \"|\" + user.getAddress().getStreetName() + \",\" +\n user.getAddress().getStreetNumber() + \",\" + user.getAddress().getApartmentNumber() + \",\" +\n user.getAddress().getFloor() + \",\" + user.getAddress().getZipCode() + \",\" +\n user.getAddress().getCity() + \",\" + user.getAddress().getCountry() + \"|\" +\n user.getJobTitle() + \"|\" + user.getCompany().getName() + \"_\" +\n user.getCompany().getAddress().getStreetName() + \",\" +\n user.getCompany().getAddress().getStreetNumber() + \",\" +\n user.getCompany().getAddress().getApartmentNumber() + \",\" +\n user.getCompany().getAddress().getFloor() + \",\" +\n user.getCompany().getAddress().getZipCode() + \",\" +\n user.getCompany().getAddress().getCity() + \",\" +\n user.getCompany().getAddress().getCountry() + \"|\" +\n user.isFavorite();\n\n lines.add(line);\n\n }\n\n for (String line : lines) {\n out.write(line);\n out.newLine();\n }\n\n } catch (FileNotFoundException ex) {\n System.out.println(\"File not found \" + contactsFile + \"\\n\" + ex);\n } catch (IOException ex) {\n System.out.println(\"Failed to write content to file \" + contactsFile + \"\\n\" + ex);\n }\n\n\n }", "public static void appendFile(final String contents, final String name) {\n writeFile(contents, name, true);\n }", "private static void writeWordLineToFile(Path wordFilePath, FileWriter outputStream) throws IOException {\n try (FileReader wordStream = new FileReader(wordFilePath.toFile().getAbsoluteFile())) {\n int iw;\n while ((iw = wordStream.read()) != -1 && !isWhitespace(iw)) {\n outputStream.write(toChars(iw));\n }\n outputStream.write('\\n');\n }\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void copyFile(AbstractLineReader reader, String outfile, String font, String sep, String quote, IUpdateFieldName updateFldName)\n throws IOException {\n AbstractLine line;\n int idx, i;\n LayoutDetail layout = reader.getLayout();\n\n RecordDetail rec = layout.getRecord(0);\n OutputStreamWriter fileWriter;\n if (font == null || font.length() == 0) {\n \tfileWriter = new FileWriter(outfile);\n } else {\n \tfileWriter = new OutputStreamWriter(new FileOutputStream(outfile), font);\n }\n BufferedWriter writer = new BufferedWriter(fileWriter);\n \n if (updateFldName == null) {\n \tupdateFldName = new IUpdateFieldName() {\n\t\t\t\t@Override public String updateName(String name) {\treturn name;\t}\n\t\t\t};\n }\n\n writer.write(updateFldName.updateName(rec.getField(0).getName()));\n for (i = 1; i < rec.getFieldCount(); i++) {\n writer.write(sep + updateFldName.updateName(rec.getField(i).getName()));\n }\n writer.newLine();\n\n while ((line = reader.read()) != null) {\n idx = line.getPreferredLayoutIdx();\n\n if (idx >= 0) {\n writer.write(formatField(line.getField(idx, 0), sep, quote));\n for (i = 1; i < layout.getRecord(idx).getFieldCount(); i++) {\n writer.write(sep + formatField(line.getField(idx, i), sep, quote));\n } \n }\n writer.newLine();\n }\n\n writer.close();\n reader.close();\n }", "private static void writeToFileInventory() throws IOException {\n FileWriter write = new FileWriter(path, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = stock.get(i);\n String name = product.getProductName();\n String location = product.getLocation().getLocationInfo();\n int UPC = product.getUpc();\n int quantity = product.getQuantity();\n String cost = String.valueOf(product.price.getCost());\n String threshold = String.valueOf(product.getThreshold());\n String price = String.valueOf(product.price.getRegularPrice());\n String distributor = product.getDistributor();\n textLine =\n name + \",\" + location + \",\" + UPC + \",\" + quantity + \",\" + cost + \",\" + price + \",\" +\n threshold + \",\" + distributor;\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }" ]
[ "0.73378867", "0.7292275", "0.7103709", "0.69942814", "0.69286567", "0.6827579", "0.68006057", "0.6794833", "0.6706401", "0.6684611", "0.66340584", "0.66070545", "0.6593062", "0.654429", "0.6541433", "0.6405273", "0.6381024", "0.63384634", "0.6323063", "0.6304716", "0.6253658", "0.6226896", "0.6194406", "0.61618114", "0.61547136", "0.61495274", "0.6135452", "0.61270255", "0.61106133", "0.6093505", "0.60492104", "0.60323393", "0.60089976", "0.60009027", "0.59938604", "0.5988479", "0.5959922", "0.5935713", "0.592254", "0.5890875", "0.5885412", "0.58787173", "0.5873776", "0.58696973", "0.58235604", "0.58232373", "0.5816709", "0.5803064", "0.5787867", "0.57860225", "0.578083", "0.57757396", "0.5759723", "0.5751221", "0.5747995", "0.5743523", "0.5731606", "0.57258403", "0.57123315", "0.5697126", "0.56919014", "0.5690759", "0.5688457", "0.568435", "0.56803864", "0.56759185", "0.56712663", "0.56712353", "0.56684804", "0.56620204", "0.5660894", "0.56554776", "0.5644463", "0.56431115", "0.5633588", "0.5632894", "0.5621443", "0.56153274", "0.5610278", "0.5608044", "0.56068754", "0.5606757", "0.5602745", "0.5602646", "0.559999", "0.5587266", "0.55640316", "0.556343", "0.55621403", "0.55598414", "0.5556108", "0.5516775", "0.55020607", "0.54999703", "0.54856247", "0.5485336", "0.5485305", "0.5484894", "0.5483325", "0.54805976" ]
0.71324766
2
This method takes a file name and a line to write to a file it then writes all the items in the file with the text passed down
public static void writeToFile(String fileName, String lineToWrite) throws IOException { FileWriter writer = new FileWriter(fileName, true); writer.write(lineToWrite); writer.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeFile(String line, BufferedWriter theOutFile) throws Exception {\n\t\ttheOutFile.append(line);\t\t\t// write the line out\n\t\ttheOutFile.newLine();\t\t\t\t// skip to the next line\t\t\n\t}", "private void writeFileLine(String s, File file)throws IOException{\n\t\tFileWriter filewriter = new FileWriter(file);\n\t\tPrintWriter printWriter = new PrintWriter(filewriter);\n\t\tprintWriter.print(s);\n\t\tprintWriter.close();\n\t}", "public static void writeToFile(String filename, String line) {\n try {\n FileWriter fw = new FileWriter(PATH + filename, true); //the true will append the new data\n fw.write(line + \"\\n\");//appends the string to the file\n fw.close();\n } catch (IOException ioe) {\n System.err.println(\"IOException: \" + ioe.getMessage());\n }\n }", "private void writeFile(File file, String... lines) throws IOException {\n try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file))) {\n for (String line : lines) {\n bufferedWriter.write(line);\n bufferedWriter.newLine();\n }\n }\n }", "public void writeLine(String line){\n\t\ttry{\n\t\t\tout.write(line);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File cannot be written too.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public static void writeFile(ArrayList<String> lines, String fileName)\n {\n try\n {\n // Create file \n FileWriter fstream = new FileWriter(fileName);\n BufferedWriter out = new BufferedWriter(fstream);\n for (String line: lines)\n {\n out.write(line);\n }\n //Close the output stream\n out.close();\n }\n catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "public static void writeFile(String line, String filename) throws IOException {\n\t\tFile file = new File(filename);\r\n\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\r\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\tbw.write(line);\r\n\t\tbw.close();\r\n\t}", "public static void fileWriter(String path, String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(path + File.separator + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t}", "public void writeLineToFile(File file, String content) throws IOException {\n\t\tBufferedWriter writer = writers.get(file);\n\t\twriter.append(content + \"\\n\");\n\t}", "public static void save(String line)\n {\n \ttry (BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8)) {\n \t\twriter.write(line,0,line.length());//takes the lines stars from the index 0 and saves till the end\n \t} catch (Exception x) {\n \t\tx.printStackTrace();//prints stack if something is worng\n \t}\n }", "public static void fileWriter(String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t}", "public static void writeLine(String filePath, String line) {\n\t\ttry {\n\t\t\tDataOutputStream os = new DataOutputStream(new FileOutputStream(filePath));\n\t\t\tos.write(line.getBytes());\n\t\t\tos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void writeFile(String data){\n\t\t\n\t\tcurrentLine = data;\n\t\t\n\t\t\ttry{ \n\t\t\t\tFile file = new File(\"/Users/bpfruin/Documents/CSPP51036/hw3-bpfruin/src/phfmm/output.txt\");\n \n\t\t\t\t//if file doesnt exists, then create it\n\t\t\t\tif(!file.exists()){\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t}\n \n\t\t\t\t//true = append file\n\t\t\t\tFileWriter fileWriter = new FileWriter(file,true);\n \t \tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\n \t \tbufferWriter.write(data);\n \t \tbufferWriter.close();\n \n \n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t}", "public static void fileWriterPrinter(String path, String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(path + fileName);\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t fileWriterPrinter(printLine);\n\t\t\t}", "public static void writeLineToFile(String filePath, String text) throws IOException {\n\t\t\n\t\t// Create the writer\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(filePath, true)));\n\t\t\n\t\t// Write a line to the file\n\t\tout.println(text);\n\t\tout.close();\n\t}", "private void writeItems() {\n\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n\n // try to add items to file\n try {\n FileUtils.writeLines(todoFile, items);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void writeLinesToTextFile(ArrayList<String> lines, String fileName) {\n String nl = System.getProperty(\"line.separator\");\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));\n\n for (int i = 0; i < lines.size(); i++) {\n bw.write(lines.get(i) + nl);\n }\n\n bw.close();\n } catch (IOException e) {\n MessageGenerator.briefErrorAndExit(\"Error writing file: \" +\n fileName + File.separator + e.getMessage());\n }\n }", "public static void saveAs(String line,String path)\n {\n \ttry (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"utf-8\"))) {//goes to the directory\n \t\n \t\twriter.write(line,0,line.length());//saves the lines starting from 0 till the length of the lines\n \t} catch (Exception x) {\n \t\tx.printStackTrace();\n \t}\n }", "public void writeLineToSdcard(String filename, String line) {\n final String outputFile = Environment.getExternalStorageDirectory().toString() + \"/\"\n + filename;\n try {\n FileWriter fstream = null;\n fstream = new FileWriter(outputFile, true);\n BufferedWriter out = new BufferedWriter(fstream);\n out.write(line + \"\\n\");\n out.close();\n fstream.close();\n Log.print(\"write log: \" + outputFile);\n } catch (Exception e) {\n Log.print(\"exception for write log\");\n }\n }", "public void writeToTextFile(String filename){\n try{\n FileWriter myWriter = new FileWriter(filename); \n myWriter.write(toString());\n myWriter.close();\n } \n catch(IOException e) { \n System.out.println(\"An error occurred.\"); \n e.printStackTrace();\n } \n }", "public static void overwriteFile(String fileName, String lineToWrite) throws IOException\n\t{\n\t\tFileWriter writer = new FileWriter(fileName);\n\t\twriter.write(lineToWrite);\n\t\twriter.close();\n\t}", "private void writeTo(String logEntry, File logFile) throws IOException {\n try (FileWriter logFileWriter = new FileWriter(logFile, true);) {\n logFileWriter.write(logEntry);\n logFileWriter.write(System.lineSeparator());\n logFileWriter.flush();\n logFileWriter.close();\n }\n}", "public void write_line(String string)\n {\n String[] current = read();\n\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n PrintWriter writer = new PrintWriter(dir);\n\n for (int i = 0; i < current.length; i++)\n {\n String line = current[i];\n if (line != null)\n {\n writer.println(line);\n }\n }\n writer.println(string);\n writer.close();\n }catch (Exception ex)\n {\n debug = \"test write failure\";\n }\n }", "public static void writeLines(File todo, String text) {\n\t\t// Check if data is not null\n\t\tif (text != null) {\n\t\t\ttry {\n\t\t\t\t// check if the file exist, else create a new\n\t\t\t\tif (!todo.exists()) {\n\t\t\t\t\ttodo.createNewFile();\n\t\t\t\t\t// todo.setWritable(true);\n\t\t\t\t}\n\n\t\t\t\tOutputStreamWriter out = new OutputStreamWriter(\n\t\t\t\t\t\tnew FileOutputStream(todo, MODE_APPEND));\n\n\t\t\t\tout.write(text);\n\t\t\t\tout.write('\\n');\n\t\t\t\tout.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.out.println(\"Exception in File Utils :: \"\n\t\t\t\t\t\t+ ioe.getMessage());\n\t\t\t\t// Throw this exception to the caller\n\t\t\t}\n\t\t}\n\t}", "private static void appendWordLineToFile(Path wordFilePath, Path srcFilePath, Path destFilePath, int lineNum) throws IOException {\n try (FileReader inputStream = new FileReader(srcFilePath.toFile().getAbsolutePath());\n FileWriter outputStream = new FileWriter(destFilePath.toFile().getAbsoluteFile(), false)) {\n\n // If insert to the first line\n if (lineNum == 0) {\n // Insert the word\n writeWordLineToFile(wordFilePath, outputStream);\n\n // Append the rest of the words\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n } else {\n int lineCount = 0;\n\n // Copy the words until the given line is reached\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n\n if (isWhitespace(i)) {\n lineCount++; // new line\n\n if (lineCount == lineNum) { // if the given line is reached, insert the given word\n writeWordLineToFile(wordFilePath, outputStream);\n }\n }\n }\n\n // Insert the word to the end\n if (lineCount < lineNum) {\n writeWordLineToFile(wordFilePath, outputStream);\n }\n }\n }\n }", "public static void main(String args[])\n {\n String FILENAME = \"myfile.txt\";\n\n // When used, the FileWriter object will immediately put it's output\n // to the file. So FileWriter output attempts to write to the file as\n // fast as possible. Maybe this is a good thing in some\n // circumstances, but I think it would be better to write data in\n // chunks. We employ a BufferedWriter object to capture the\n // FileWriter output into a collection of bytes that can be written\n // to the file.\n FileWriter fWriter = null;\n BufferedWriter bWriter = null;\n\n // Wrapping our attempt to write to the file inside a try / catch\n // statement allows us to trap some errors if they happen\n try\n {\n // Here is the content that we will write to the file.\n String fileContent = \"Dude, I'm totally writing to a file!!\";\n\n // These lines instantiate FileWriter and BufferedWriter objects.\n // When instantiating the FileWriter object we pass in the file\n // name that we are writing to. If no path is given in our\n // filename, the file will be created and written in the root\n // directory.\n fWriter = new FileWriter(FILENAME);\n\n // The BufferedWriter object is instantiated on this line and the\n // FileWriter object is passed in as an argument.\n bWriter = new BufferedWriter(fWriter);\n\n // Now that we have our buffer and writer objects created, we can\n // attempt to write content to the file. Here is what\n // (I think) this is doing. The BufferedWriter object will receive\n // the content to be written, and then pass that content as a\n // whole to the FileWriter so it can be written to the file as a\n // chunk. If we did not do it this way, the content would be read\n // passed into the FileWriter object, converted to bytes on the\n // fly, and immediately written, byte by byte as it is converted,\n // to the file. By buffering we are increasing the performance of\n // this action.\n bWriter.write(fileContent);\n }\n\n // The catch statement will trap and display any exception that is\n // created when we are attempting to create our writer objects, open\n // or create the file, or write content.\n catch(Exception e)\n {\n System.out.println(\"Unable to write to file : \" + e.getMessage());\n }\n\n // This 'finally' statement will always happen, regardless of what\n // happens in our try/catch statement. If we put this code into the\n // try statement and we received an error, it would never be\n // processed. Additionally, if we put this code at the bottom of our\n // program and ran into an error half way through, it would never be\n // processed. Placing the code into a finally statement allows us to\n // ensure that it is run every time.\n finally\n {\n // Another try and catch statement to trap any error that happens\n // when closing the files.\n try\n {\n // The last thing we want to do is close out our writer\n // objects. This is a best practice since if you leave the\n // writer open you are at best wasting system resources, and\n // at worst you could lock this file for editing while other\n // resources are trying to use it. We check to make sure it\n // is not already disposed of, and then we call the close()\n // method.\n if (bWriter != null) {\n bWriter.close();\n }\n\n if (fWriter != null) {\n fWriter.close();\n }\n }\n // Our final catch reveals any errors that popped up when we were\n // attempting to close the writer and buffer objects.\n catch (Exception e)\n {\n System.out.println(\"Unable to close writer objects :\"\n + e.getMessage());\n }\n }\n }", "public static void fileWriterPrinter(String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t fileWriterPrinter(printLine);\n\t\t\t}", "protected abstract void writeFile();", "public static void writeFile(String file, String rowData) throws Exception {\n\n Boolean bFound = false;\n\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String getLine = \"\";\n\n // verify if row entry exists\n while ( (getLine = reader.readLine()) != null){\n if (getLine.contains(rowData)){\n bFound = true;\n break;\n }\n }\n reader.close();\n\n if (bFound != true){\n BufferedWriter writer = new BufferedWriter(new FileWriter(file, true));\n\n writer.append(rowData);\n writer.newLine();\n writer.close();\n }\n }", "public void writeFileContents(String filename, String contents) {\n }", "public void writeToTextFile(String fileName, String content) throws IOException {\n \tFiles.write(Paths.get(fileName), content.getBytes(), StandardOpenOption.CREATE);\n \t}", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "private static void write(BufferedWriter fileWriter,int startLine, int endLine) throws IOException {\n try(BufferedReader fileReader = new BufferedReader\n (new FileReader(\"C:\\\\Users\\\\radha\\\\Documents\\\\Research\\\\ml-25m\\\\ml-25m\\\\ratings.csv\"))){\n String line = null;\n int lineNo = 0;\n while ((line = fileReader.readLine()) != null) {\n lineNo++;\n if(lineNo < startLine){\n continue;\n }\n fileWriter.write(line);\n fileWriter.write(\"\\n\");\n if(lineNo > endLine){\n break;\n }\n\n }\n }\n\n\n }", "public static void writeToFile(String fileName, ArrayList<String> linesList) throws IOException\n {\n PrintWriter printWriter = new PrintWriter(new FileWriter(fileName));\n for(String currentLine : linesList)\n {\n printWriter.println(currentLine);\n }\n printWriter.close();\n }", "@Override\n public void writeDataToTxtFile() {\n\n }", "void putLine(String line);", "public void writeTextFile(String s) {\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,true)));\n\t\t\twriter.println(s);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to\\t\\\"\" + filename + \"\\\"\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t}", "protected void writeLine(String line) throws IOException {\n writer.write(line);\n writer.write(EOL);\n }", "private void writeLine(String s) throws IOException {\n\tfbuf.write(s, 0, s.length());\n\tfbuf.newLine();\n }", "public static void writeLine(String fileName, String content) {\r\n write(fileName, content + System.lineSeparator());\r\n\r\n }", "private static void writeToFileInventory() throws IOException {\n FileWriter write = new FileWriter(path, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = stock.get(i);\n String name = product.getProductName();\n String location = product.getLocation().getLocationInfo();\n int UPC = product.getUpc();\n int quantity = product.getQuantity();\n String cost = String.valueOf(product.price.getCost());\n String threshold = String.valueOf(product.getThreshold());\n String price = String.valueOf(product.price.getRegularPrice());\n String distributor = product.getDistributor();\n textLine =\n name + \",\" + location + \",\" + UPC + \",\" + quantity + \",\" + cost + \",\" + price + \",\" +\n threshold + \",\" + distributor;\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "public static void ReplacesEntry(int index){\n int cont = 0;\n String[] thingstowrite = ManageCommissionerList.ReturnsCommissionerListInString(index);\n try{\n Path path = Paths.get(\"logscommission.txt\");\n List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);\n for(int i = index*19;i<(index*19)+19;i++){\n lines.set(i, thingstowrite[cont]);\n cont++;\n }\n Files.write(path, lines, StandardCharsets.UTF_8);\n }catch(Exception e){\n e.printStackTrace();\n System.out.printf(\"Not possible to replace entry!\\n\");\n }\n }", "public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void writeTextFile(File file, String content) throws IOException {\n BufferedWriter bw = new BufferedWriter(new FileWriter(file));\n bw.write(content, 0, content.length());\n bw.flush();\n bw.close();\n }", "public void writeFile(Context inContext, String Name, String Category, String ObjectType, String Latitude, String Longitude){\n\r\n\t\tFileWriter fWriter;\r\n\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\t\tfWriter = new FileWriter(\"/sdcard/data/filename.txt\");\r\n\r\n\t\t\tString newLine = System.getProperty(\"line.separator\");\r\n\t\t\t\r\n\t\t\t//Read all lines in txt file until strikes empty line and writes on that line\r\n\r\n\t\t\tFileInputStream fstream = new FileInputStream(\"filename.txt\");\r\n\t\t\t// Get the object of DataInputStream\r\n\t\t\tDataInputStream in = new DataInputStream(fstream);\r\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\t\tString strLine;\r\n\t\t\t\r\n\t\t\t//Read File Line By Line\r\n\t\t\twhile ((strLine = br.readLine()) == null) {\r\n\t\t\t\t// Print the content on the console\r\n\t\t\t\tSystem.out.println (strLine);\r\n\t\t\t\tfWriter.write(\"penis\" + newLine);\r\n\t\t\t}\r\n\r\n\t\t\t//System.out.println(\"if\"+i);\r\n\t\t\tfWriter.write(Name + \":\" + Category + \":\" + ObjectType + \":\" + Latitude + \":\" + Longitude + \";\");\r\n\t\t\tfWriter.flush();\r\n\t\t\tfWriter.close();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "void writeText(FsPath path, String text);", "public void writer(Vector<String> toWrite, String path) throws IOException {\n file = new File(path);\n fw = new FileWriter(file);\n\n for (int i = 0; i < toWrite.size(); i++) {\n fw.write(toWrite.get(i));\n fw.write('\\n');\n fw.flush();\n }\n }", "public void writeFile(String text, String writePath)\r\n\t{\r\n\t\t//Use a filewriter but change it to a buffered writer. Open writing on the file provided by writePath\r\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(writePath)))\r\n\t\t{\r\n\t\t\t// Write given text to file\r\n\t\t\twriter.write(text);\t\r\n\t\t} \r\n\t\tcatch (IOException except)\r\n\t\t{\r\n\t\t\texcept.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void writeToFile(String fileName,String contents) throws IOException{\r\n\t\tFileWriter fw = new FileWriter(fileName,true);\r\n\t\tPrintWriter pw = new PrintWriter(fw);\r\n\t\tpw.write(contents+\"\\r\\n\");\r\n\t\tpw.close();\r\n\t}", "public static void writeAllLines(String filePath, List<String> lines) {\n\t\ttry {\n\t\t\tFileUtils.write(new File(filePath), lines.get(0));\n\t\t} catch (IOException e) {\n\t\t\tthrow new FileDoesntExistException(filePath);\n\t\t}\n\t}", "public void saveFile()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\t\n\t\tfor(CSVItem cItem : itemList)\n\t\t{\n\t\t\tsb.append(cItem.buildCSVString()).append(newLine);\n\t\t\t\n\t\t}\n\t\tString fileString = sb.toString();\n\t\t\n\t\t File newTextFile = new File(filePath);\n\n FileWriter fw;\n\t\ttry {\n\t\t\tfw = new FileWriter(newTextFile);\n\t\t\t fw.write(fileString);\n\t\t fw.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n\n\t}", "public static void addLine(File file, String lineToAdd) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n\n while ((line = in.readLine()) != null) {\n vLines.add(line + \"\\n\");\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.write(lineToAdd);\n out.close();\n }", "public void writeToFile(File file) {\n\n\t}", "protected boolean appendLine(final String filename, final String line) {\n final StringBuilder finalLine = new StringBuilder();\n \n if (addtime) {\n String dateString;\n try {\n final DateFormat dateFormat = new SimpleDateFormat(timestamp);\n dateString = dateFormat.format(new Date()).trim();\n } catch (IllegalArgumentException iae) {\n // Default to known good format\n final DateFormat dateFormat = new SimpleDateFormat(\"[dd/MM/yyyy HH:mm:ss]\");\n dateString = dateFormat.format(new Date()).trim();\n \n eventBus.publishAsync(new UserErrorEvent(ErrorLevel.LOW, iae,\n \"Dateformat String '\" + timestamp + \"' is invalid. For more information: \"\n + \"http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html\",\n \"\"));\n }\n finalLine.append(dateString);\n finalLine.append(' ');\n }\n \n if (stripcodes) {\n finalLine.append(Styliser.stipControlCodes(line));\n } else {\n finalLine.append(line);\n }\n \n try {\n final BufferedWriter out;\n if (openFiles.containsKey(filename)) {\n final OpenFile of = openFiles.get(filename);\n of.lastUsedTime = System.currentTimeMillis();\n out = of.writer;\n } else {\n out = new BufferedWriter(new FileWriter(filename, true));\n openFiles.put(filename, new OpenFile(out));\n }\n out.write(finalLine.toString());\n out.newLine();\n out.flush();\n return true;\n } catch (IOException e) {\n /*\n * Do Nothing\n *\n * Makes no sense to keep adding errors to the logger when we can't write to the file,\n * as chances are it will happen on every incomming line.\n */\n }\n return false;\n }", "public static void append(String fileName, String text, boolean newline) throws\r\n IOException {\r\n File f = new File(fileName);\r\n if (f.exists())\r\n append(f, text, newline);\r\n else\r\n throw new FileNotFoundException();\r\n }", "public void store(final File f) throws IOException {\n BufferedOutputStream fos = null;\n try {\n fos = new BufferedOutputStream(new FileOutputStream(f));\n final StringBuilder line = new StringBuilder(64);\n for (final Map.Entry<String, String> entry : entrySet()) {\n line.delete(0, line.length());\n line.append(entry.getKey());\n line.append(\"=\");\n line.append(patternNewline.matcher(entry.getValue()).replaceAll(\"\\\\\\\\n\"));\n line.append(\"\\r\\n\");\n\n fos.write(UTF8.getBytes(line.toString()));\n }\n } finally {\n if (fos != null) {\n try {\n fos.flush();\n fos.close();\n } catch (final Exception e){}\n }\n }\n }", "private void addLine (String line) {\n writer.write (line);\n writer.newLine();\n // blockOut.append (line);\n // blockOut.append (GlobalConstants.LINE_FEED);\n }", "public void writeLine(String line) {\n try {\n out.println(line);\n } catch (Exception e) {\n // done\n cleanup();\n }\n }", "public void write(String filename, String text) {\n\n try (FileWriter writer = new FileWriter(filename)) {\n writer.write(text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void recordOrder(){\n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){//throws exception\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Coffee);//prints in file contents of Coffee\n output.close();//closes file\n }", "public static void writeTextFile(String path, String content) throws IOException{\r\n FileWriter fw = new FileWriter(path, true);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n bw.write(content);\r\n bw.close();\r\n fw.close();\r\n }", "@Override\n public void output(final List<String> lines) {\n final String pathToFile = filePath + \"/foundDevices.txt\";\n final Path file = Paths.get(pathToFile);\n try {\n Files.write(file, lines, Charset.forName(\"UTF-8\"));\n } catch (final IOException e) {\n logger.warn(\n String.format(\"An error was thrown while trying \"\n + \"to write the foundDevices \"\n + \"file in position %s\",\n pathToFile)\n );\n }\n }", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "private void fileModify(String text) throws IOException {\n text += \"\\n\";\n try {\n File filePath;\n filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);\n if (!filePath.exists()) {\n if (filePath.mkdir()) ; //directory is created;\n }\n\n fileOutputStream = new FileOutputStream(file);\n fileOutputStream.write(text.getBytes());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n fileOutputStream.flush();\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void writeIDfile(String ID,String password)throws IOException\n {\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"idpassword.txt\"));\n /*write part*/\n\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n content+=ID+\",\"+password;\n\n fw = new FileWriter(\"idpassword.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n bw.close();\n fw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n }", "public void writeFile(String content){\n\t\tFile file = new File(filePath);\n\t\t\n\t\tBufferedWriter bw = null;\n\t\t\n\t\ttry{\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(content);\n\t\t}\n\t\tcatch (Exception oops){\n\t\t\tSystem.err.print(\"There was an error writing the file \"+oops.getStackTrace());\n\t\t}\n\t\tfinally{\n\t\t\ttry{\n\t\t\t\tbw.close();\n\t\t\t}\t\n\t\t\tcatch(IOException oops){\n\t\t\t\tSystem.err.print(\"There was an error closing the write buffer \"+oops.getStackTrace());\n\t\t\t}\n\t\t}\n\t}", "void addFile(int numberLines);", "public void writeToFile(StringBuilder text)throws IOException{\n\n Path filePath = Paths.get(\"index.txt\");\n if (!Files.exists(filePath)) {\n \t Files.createFile(filePath);\n \t}\n \tFiles.write(filePath, text.toString().getBytes(), StandardOpenOption.APPEND);\n }", "public static void modifytext (String name) throws IOException {\n // Copy the contents of the input file and put it into the new file\n File inputF = new File(\"src/main/java/ex45/\"+ name +\".txt\");\n Path dest = inputF.toPath();\n Path src = Paths.get(\"src/main/java/ex45/exercise45_input.txt\");\n Files.copy(src, dest);\n\n // This process will replace the word 'utilize' with the word 'use'\n String utilize = new String(Files.readAllBytes(dest));\n Charset charset = StandardCharsets.UTF_8;\n utilize = utilize.replaceAll(\"utilize\", \"use\");\n Files.write(dest, utilize.getBytes(charset));\n\n System.out.print(\"Your file has been created.\");\n }", "public abstract AbstractLineWriter newWriter(String filename)\r\n\t\t\tthrows FileNotFoundException, IOException;", "public static void writeTextToFile(String fileName,String text){\r\n File file=new File(fileName);\r\n log.fine(\"Writing to file: \"+fileName);\r\n try { if (!file.exists()){\r\n file.createNewFile();\r\n }\r\n PrintWriter out=new PrintWriter(file.getAbsoluteFile());\r\n try {\r\n out.print(text);\r\n }finally {\r\n out.close();\r\n }\r\n }catch (IOException e){\r\n throw new RuntimeException(e);\r\n }\r\n }", "public void writeBuyingHistory(ArrayList<String> boughtBooks)throws IOException\n {\n String toWrite = new String();\n int i =0;\n if(hisMap.get(Customer.getInstance().getUsername())==null)\n {\n hisMap.put(Customer.getInstance().getUsername(),new ArrayList<String>());\n }\n else\n {\n i=0;\n while (i<boughtBooks.size())\n {\n hisMap.get(Customer.getInstance().getUsername()).add(boughtBooks.get(i));\n i++;\n }\n }\n\n\n i=0;\n\n toWrite+=Customer.getInstance().getUsername()+\",\";\n while (i<hisMap.get(Customer.getInstance().getUsername()).size()-boughtBooks.size())\n {\n toWrite+=hisMap.get(Customer.getInstance().getUsername()).get(i)+\"%\";\n i++;\n }\n ;\n i=0;\n while (i<boughtBooks.size())\n {\n toWrite+=boughtBooks.get(i);\n if(i!=boughtBooks.size()-1)\n toWrite+=\"%\";\n i++;\n }\n\n\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"history.txt\"));\n if(specificLine>lines.size()-1)\n {\n lines.add(toWrite);\n }\n else {\n lines.set(specificLine, toWrite);\n }\n /*write part*/\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n\n fw = new FileWriter(\"history.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n\n }", "private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}", "public void WriteRecordsTo(final String filePath) throws IOException\r\n {\r\n BufferedWriter writer = FileUtilities.OpenWriter(filePath);\r\n Iterator<ServiceRecord> iterator = records.iterator();\r\n if (iterator.hasNext())\r\n {\r\n String record = iterator.next().toString();\r\n record += Format.SERVICE_RECORD_SEPARATOR; //I repeat code here to prevent having a new line\r\n writer.write(record); //inserted into the file after the first entry.\r\n while (iterator.hasNext()) //This makes it easier to read from the file in case we have only one service record on disk\r\n {\r\n record = \"\\n\"+iterator.next().toString();\r\n record += Format.SERVICE_RECORD_SEPARATOR;\r\n writer.write(record);\r\n } \r\n } \r\n writer.close(); \r\n }", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "private static void writeToSaleItems() throws IOException {\n FileWriter write = new FileWriter(path4, false);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = (Product) stock.get(i);\n if (product.price.isOnSale()) {\n int UPC = product.getUpc();\n float price = product.price.getSalePrice();\n String period = product.price.getSalePeriod();\n\n textLine = UPC + \" \" + price + \" \" + period;\n\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n }\n print_line.close();\n\n }", "public static void writeFile(String filepath, List<String> contents) {\n List<String> content = new ArrayList<String>();\n File file = new File(filepath);\n if (file.exists()) {\n content.addAll(FileIOUtilities.readFile(filepath));\n }\n content.addAll(contents);\n if (content != null && !content.isEmpty()) {\n BufferedWriter writer = null;\n String encoding = \"UTF8\";\n try {\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), encoding));\n for (String line : content) {\n writer.write(line);\n writer.newLine();\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n writer.close();\n } catch (IOException e) {\n // Ignore exception because writer was not initialized\n }\n }\n \n }\n }", "public static void writeText(File file, String text) {\r\n\t\ttry{\r\n\t\t\tSystem.out.println(text);\r\n\t\t\tFileWriter FW = new FileWriter(file);\r\n\t\t\tBufferedWriter BW = new BufferedWriter(FW);\r\n\t\t\tBW.write(text);\r\n\t\t\tBW.close();\r\n\t\t} catch (IOException e){\r\n\t\t\tSystem.out.println(\"error writing text\");\r\n\t\t}\r\n\t}", "public static void appendFile(PrintWriter pw, String file) throws IOException {\n\t\tfw = new FileWriter(file, true);\n\t\tmyFile = new File(file);\n\t\t//allows me to read file\n\t\tinFile = new Scanner(myFile);\n\t\t\n\t}", "private void writeToFile(File contactsFile) {\n\n try (BufferedWriter out = new BufferedWriter(new FileWriter(contactsFile))) {\n List<String> lines = new ArrayList<>();\n\n for (User user : contacts) {\n String line = user.getUserId() + \"|\" + user.getFirstName() + \"|\" + user.getLastName() + \"|\" + user.getEmail() + \"|\" +\n user.getAge() + \"|home_\" + user.getPhoneNumbers().get(\"home\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"home\").getNumber() + \",mobile_\" +\n user.getPhoneNumbers().get(\"mobile\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"mobile\").getNumber() + \",work_\" +\n user.getPhoneNumbers().get(\"work\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"work\").getNumber() + \"|\" + user.getAddress().getStreetName() + \",\" +\n user.getAddress().getStreetNumber() + \",\" + user.getAddress().getApartmentNumber() + \",\" +\n user.getAddress().getFloor() + \",\" + user.getAddress().getZipCode() + \",\" +\n user.getAddress().getCity() + \",\" + user.getAddress().getCountry() + \"|\" +\n user.getJobTitle() + \"|\" + user.getCompany().getName() + \"_\" +\n user.getCompany().getAddress().getStreetName() + \",\" +\n user.getCompany().getAddress().getStreetNumber() + \",\" +\n user.getCompany().getAddress().getApartmentNumber() + \",\" +\n user.getCompany().getAddress().getFloor() + \",\" +\n user.getCompany().getAddress().getZipCode() + \",\" +\n user.getCompany().getAddress().getCity() + \",\" +\n user.getCompany().getAddress().getCountry() + \"|\" +\n user.isFavorite();\n\n lines.add(line);\n\n }\n\n for (String line : lines) {\n out.write(line);\n out.newLine();\n }\n\n } catch (FileNotFoundException ex) {\n System.out.println(\"File not found \" + contactsFile + \"\\n\" + ex);\n } catch (IOException ex) {\n System.out.println(\"Failed to write content to file \" + contactsFile + \"\\n\" + ex);\n }\n\n\n }", "public static void enterNewTXTFile(String input, String id, String newName, String newHandle, String newTime, String newTweet)\n {\n try {\n String str = Integer.parseInt(id)+ \" \" +newName+ \" \" +newHandle+ \" \" +newTime+ \" \" +newTweet+ \" \";\n writer = new BufferedWriter(new FileWriter(input, true)); // continue to write to existing output file\n writer.write(str);\n writer.newLine();\n writer.close();\n \n } catch (Exception e) { System.out.println(e); }\n }", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private static void writeToOutput(String path, Apriori apriori){\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(path, false));\n for (String s : apriori.mItemSet){\n output.write(s);\n }\n output.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "private void writeFile(String path, String contents) throws IOException {\n File file = new File(dir, path);\n\n try (FileWriter writer = new FileWriter(file)) {\n writer.write(contents);\n }\n }", "private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }", "public void sequenceWriter(String sequence) {\n try {\n Files.write(file, ((sequence + \"\\r\\n\")).getBytes(), StandardOpenOption.APPEND);\n } catch (IOException e) {\n System.out.println(\"Error:\" + e);\n }\n }", "protected void append(String line) {\n\t\t\tout.append(line);\n\t\t}", "void appendUserInformation(String line);", "public void saveFile(File file, String text) {\r\n\t\t\r\n\t\tif (file==null){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\r\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) {\r\n\r\n\t\t\tbw.write(text);\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void w(String text, File loc) throws Exception {\n\r\n\t\tFileWriter fw = new FileWriter(loc, true);\r\n\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(text);\r\n\r\n\t\twriter.close();\r\n\t\tfw.close();\r\n\t}", "public void saveFile(String fileName)\n {\n try\n {\n Formatter file = new Formatter(fileName);\n for (Item item: myList)\n {\n file.format(item.getFirstName() +\"\\n\" + item.getLastName() +\"\\n\"+ item.getPhoneNumber()+\"\\n\"+ item.getEmail()+\"\\n\");\n }\n file.close();\n }\n\n catch (Exception ex)\n {\n System.out.println(\"Error saving...\");\n }\n\n System.out.println(\"\");\n }", "private static void writeToOrder() throws IOException {\n FileWriter write = new FileWriter(path5, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Order> orders = Inventory.getOrderHistory();\n for (int i = 0; i < orders.size(); i++) {\n Order o = (Order) orders.get(i);\n\n String orderNum = String.valueOf(o.getOrderNumber());\n String UPC = String.valueOf(o.getUpc());\n String productName = o.getProductName();\n String distName = o.getDistributorName();\n String cost = String.valueOf(o.getCost());\n String quantity = String.valueOf(o.getQuantity());\n String isProcesed = String.valueOf(o.isProcessed());\n\n textLine =\n orderNum + \", \" + UPC + \", \" + quantity + \",\" + productName + \", \" + distName + \", \" + cost\n + \", \" + isProcesed;\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n print_line.close();\n\n }", "@Test\n\tpublic void testWriteToFile() {\n ArrayList<String> actualLines = new ArrayList<String>();\n\n\t\tactualLines.add(\"Course: Java\");\n\t\tactualLines.add(\"CourseID: 590\");\n\t\tactualLines.add(\"StudentName: Nikhil Kumar\");\n\t\t\n\t\t// Write to file\n\t\tmyFileWriter1.writeToFile(actualLines);\n\t\t\n\t\t// Read the written file to test its contents\n\t\tArrayList<String> expectedLines = readWrittenFile(\"output_test.txt\");\n\t\tassertEquals(expectedLines, actualLines);\n\t}", "private void writeTextFile(\r\n\t\t\tGDMSMain theMainHomePage,\r\n\t\t\tArrayList<QtlDetailElement> listOfAllQTLDetails, HashMap<Integer, String> hmOfQtlPosition, HashMap<String, Integer> hmOfQtlNameId,\r\n\t\t\tHashMap<Integer, String> hmOfQtlIdandName, String strSelectedExportType, boolean bQTLExists) throws GDMSException {\n\t\t\r\n\t\t\r\n\t\tString strFlapjackTextFile = \"Flapjack\";\r\n\t\tFile baseDirectory = theMainHomePage.getMainWindow().getApplication().getContext().getBaseDirectory();\r\n\t\tFile absoluteFile = baseDirectory.getAbsoluteFile();\r\n\r\n\t\tFile[] listFiles = absoluteFile.listFiles();\r\n\t\tFile fileExport = baseDirectory;\r\n\t\tfor (File file : listFiles) {\r\n\t\t\tif(file.getAbsolutePath().endsWith(\"Flapjack\")) {\r\n\t\t\t\tfileExport = file;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString strFilePath = fileExport.getAbsolutePath();\r\n\t\t//System.out.println(\"strFilePath=:\"+strFilePath);\r\n\t\tgeneratedTextFile = new File(strFilePath + \"\\\\\" + strFlapjackTextFile + \".txt\");\r\n\r\n\t\t/**\twriting tab delimited qtl file for FlapJack \r\n\t\t * \tconsisting of marker chromosome & position\r\n\t\t * \r\n\t\t * **/\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t//factory = new ManagerFactory(GDMSModel.getGDMSModel().getLocalParams(), GDMSModel.getGDMSModel().getCentralParams());\r\n\t\t\tfactory=GDMSModel.getGDMSModel().getManagerFactory();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOntologyDataManager ontManager=factory.getOntologyDataManager();\r\n\t\t\t*/\r\n\t\t\tFileWriter flapjackTextWriter = new FileWriter(generatedTextFile);\r\n\t\t\tBufferedWriter flapjackBufferedWriter = new BufferedWriter(flapjackTextWriter);\r\n\t\t\t//getAllelicValuesByGidsAndMarkerNames\r\n\t\t\t//genoManager.getAlle\r\n\t\t\t//\t\t\t fjackQTL.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\");\r\n\t\t\tflapjackBufferedWriter.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\\teffect\");\r\n\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\tfor (int i = 0 ; i < listOfAllQTLDetails.size(); i++){\r\n\t\t\t\t//System.out.println(listOfAllQTLDetails.get(i));\r\n\t\t\t\tQtlDetailElement qtlDetails = listOfAllQTLDetails.get(i);\r\n\t\t\t\t\r\n\t\t\t\t/*QtlDetailsPK id = qtlDetails.getQtlName().get.getId();\r\n\t\t\t\tInteger qtlId = id.getQtlId();*/\r\n\t\t\t\t//String strQtlName = hmOfQtlIdandName.get(qtlId);\r\n\t\t\t\tString strQtlName =qtlDetails.getQtlName();\r\n\t\t\t\tint qtlId=hmOfQtlNameId.get(strQtlName);\r\n\t\t\t\t//qtlDetails.get\r\n\t\t\t\t//Float clen = qtlDetails.getClen();\r\n\t\t\t\t//Float fEffect = qtlDetails.getEffect();\r\n\t\t\t\tint fEffect = qtlDetails.getEffect();\r\n\t\t\t\tFloat fMaxPosition = qtlDetails.getMaxPosition();\r\n\t\t\t\tFloat fMinPosition = qtlDetails.getMinPosition();\r\n\t\t\t\t//Float fPosition = qtlDetails.getPosition();\r\n\t\t\t\tString fPosition = hmOfQtlPosition.get(qtlId);\r\n\t\t\t\tFloat frSquare = qtlDetails.getRSquare();\r\n\t\t\t\tFloat fScoreValue = qtlDetails.getScoreValue();\r\n\t\t\t\tString strExperiment = qtlDetails.getExperiment();\r\n\t\t\t\t//String strHvAllele = qtlDetails..getHvAllele();\r\n\t\t\t\t//String strHvParent = qtlDetails.getHvParent();\r\n\t\t\t\t//String strInteractions = qtlDetails.getInteractions();\r\n\t\t\t\tString strLeftFlankingMarker = qtlDetails.getLeftFlankingMarker();\r\n\t\t\t\tString strLinkageGroup = qtlDetails.getChromosome();\r\n\t\t\t\t//String strLvAllele = qtlDetails.getLvAllele();\r\n\t\t\t\t//String strLvParent = qtlDetails.getLvParent();\r\n\t\t\t\tString strRightFM = qtlDetails.getRightFlankingMarker();\r\n\t\t\t\t//String strSeAdditive = qtlDetails.getSeAdditive();\r\n\t\t\t\t\r\n\t\t\t\t//String strTrait = qtlDetails.getTrait();\r\n\t\t\t\tString strTrait = qtlDetails.getTRName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(strQtlName + \"\\t\" + strLinkageGroup + \"\\t\" + fPosition + \"\\t\" + fMinPosition + \"\\t\" + fMaxPosition + \"\\t\" +\r\n\t\t\t\t\t\tstrTrait + \"\\t\" + strExperiment + \"\\t \\t\" + fScoreValue + \"\\t\" + frSquare+\r\n\t \"\\t\" + strLeftFlankingMarker+\"/\"+strRightFM + \"\\t\" + fEffect);\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tflapjackBufferedWriter.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new GDMSException(e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t}", "public void writeFile(String path, String name, String content)\n\t\t\tthrows Exception {\n\n\t\ttry {\n\t\t\tString ruta = path + File.separator + name;\n\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(ruta);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.write(content);\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error escribiendo fichero\", e);\n\t\t}\n\n\t}", "private static void writeWordLineToFile(Path wordFilePath, FileWriter outputStream) throws IOException {\n try (FileReader wordStream = new FileReader(wordFilePath.toFile().getAbsoluteFile())) {\n int iw;\n while ((iw = wordStream.read()) != -1 && !isWhitespace(iw)) {\n outputStream.write(toChars(iw));\n }\n outputStream.write('\\n');\n }\n }", "public void writeToLogFile(String entry) {\r\n\t\ttry{\r\n\t\t\tStringBuilder out = new StringBuilder(50);\r\n\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);\r\n\t\t out.append(sdf.format(cal.getTime()) + \";\" + entry);\r\n\t\t \r\n\t\t this.write(out);\r\n\t\t}catch (Exception e){\r\n\t\t System.err.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t}", "public static void writeFile(String outFile, String text) {\n try{\n FileWriter fileWriter = new FileWriter(outFile,false);\n PrintWriter pw = new PrintWriter(fileWriter,true);\n \n if (text==null) {\n pw.println();\n }\n else\n {\n pw.println(text);\n }\n \n pw.close();\n fileWriter.close();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "void createSingleFileComment(ChangedFile file, Integer line, String comment);", "public void setContents(File aFile, String aContents)\n throws FileNotFoundException, IOException {\n if (aFile == null) {\n throw new IllegalArgumentException(\"File should not be null.\");\n }\n if (!aFile.exists()) {\n aFile.createNewFile();\n }\n if (!aFile.isFile()) {\n throw new IllegalArgumentException(\"Should not be a directory: \"\n + aFile);\n }\n if (!aFile.canWrite()) {\n throw new IllegalArgumentException(\"File cannot be written: \"\n + aFile);\n }\n\n // declared here only to make visible to finally clause; generic\n // reference\n Writer output = null;\n try {\n // use buffering\n // FileWriter always assumes default encoding is OK!\n output = new BufferedWriter(new FileWriter(aFile));\n output.write(aContents);\n } finally {\n // flush and close both \"aspectOutput\" and its underlying FileWriter\n if (output != null) {\n output.close();\n }\n }\n }" ]
[ "0.7515622", "0.7222269", "0.719304", "0.7016439", "0.7011717", "0.69856703", "0.68863624", "0.6867251", "0.68192506", "0.66143495", "0.659222", "0.6584854", "0.6552899", "0.65288943", "0.6508994", "0.6495683", "0.64736", "0.64590704", "0.642373", "0.6388439", "0.6327806", "0.6324069", "0.6306431", "0.6295571", "0.6281715", "0.6225722", "0.62226564", "0.6165797", "0.6117531", "0.61148334", "0.6088016", "0.60843253", "0.60809904", "0.6064779", "0.6044099", "0.60424256", "0.60418373", "0.60082996", "0.6000742", "0.59773433", "0.5976978", "0.59720993", "0.5969724", "0.5960213", "0.5943875", "0.59373057", "0.59295243", "0.5915466", "0.5898492", "0.5898473", "0.58974123", "0.58840775", "0.58775216", "0.587668", "0.5867712", "0.58615005", "0.5844479", "0.58340985", "0.5831618", "0.58218354", "0.5817981", "0.58100116", "0.5809005", "0.5808487", "0.5786713", "0.57813936", "0.5772768", "0.57699823", "0.575547", "0.57419336", "0.5737168", "0.57225156", "0.57184553", "0.5718252", "0.5716998", "0.57167584", "0.5712161", "0.5703886", "0.5700147", "0.5699769", "0.56905794", "0.56877124", "0.5686399", "0.5685429", "0.5670821", "0.56669897", "0.56562537", "0.5654177", "0.56458336", "0.56445104", "0.56322384", "0.56321377", "0.56182015", "0.5611499", "0.56112677", "0.5608779", "0.5608404", "0.56025785", "0.56015235", "0.5600684" ]
0.65528697
13
///////////////////////////// RPSLS Game //////////////////////
public static void RPSLS()throws IOException { String AiChoice=""; int points=0; int life=4; int XP=0; xPerience=""; String filename=loginDetails.get(0)+".txt"; String userinput=""; int randomselector; boolean playAgian=true; String message="Rock Paper Scissors Lizard Spock(RPSLS), is a game that was first introduced by Big bang theory's Sheldon Cooper, \n As an ellabouration of the classic RPS \n \n Rules: Scissors cuts paper, \n paper covers rock, \n rock smashes lizard, \n lizard poisons spock, \n spock smashes scissors, \n scissors decapacitae Lizard, \n lizard eats paper, \n paper disproves spock, \n spock vaporizes rock, \n ...and as it always have Rock crushes scissors. \n \t\tEnjoy"; Scanner sc=new Scanner(System.in); JOptionPane.showMessageDialog(null,message,"About The Game.",1); System.out.println("User Entered: "+ userinput); String pattern ="rock|paper|scissors|lizard|spock"; boolean validinput=true; try{ while(validinput==true&&playAgian==true) {AiChoice=AI(AiChoice); userinput=JOptionPane.showInputDialog(null,"Enter either Rock,Paper,Scissors,Lizard or spock.","RPSLS",3); userinput =userinput.toLowerCase(); String result="You picked "+userinput+" AI choose "+AiChoice; if(userinput !=null&&userinput=="") { JOptionPane.showMessageDialog(null,"Empty input","Invalid input",0); validinput=true; playAgian=true; } else if (!(userinput.matches(pattern))) { JOptionPane.showMessageDialog(null,"The only acceptable inputs are either Rock,paper,scissors,spock,lizard","Invalid input",0); validinput=true; playAgian=true; } else if (userinput==null) {displaygame(); validinput=true; playAgian=false; } else { if (userinput.equals("rock")) { if (AiChoice.equals(userinput)){JOptionPane.showMessageDialog(null,result+"\n Draw","Result",1);XP=XP+10;points=points+50;} else if (AiChoice.equals("paper")) {JOptionPane.showMessageDialog(null,result+"\n Paper covers Rock \n >> You Lose!!! <<","Result",1);XP=XP+5;points=points+0;} else if (AiChoice.equals("scissors")){ JOptionPane.showMessageDialog(null,result+"\n Roc5crushes Scissors \n >> You Win!!! <<","Result",1);XP=XP+50;points=points+100;} else if (AiChoice.equals("spock")) {JOptionPane.showMessageDialog(null,result+"\n Spock vaporizes Rock \n >> You Lose!!! <<","Result",1);XP=XP+5;points=points+0;} else {JOptionPane.showMessageDialog(null,result+"\n Rock crushes lizard \n >> You Win!!! <<","Result",1);XP=XP+50;points=points+100;} } else if (userinput.equals("paper")) { if (AiChoice.equals(userinput)){JOptionPane.showMessageDialog(null,result+"\n Draw","Result",1);XP=XP+10;points=points+50;} else if (AiChoice.equals("rock")) {JOptionPane.showMessageDialog(null,result+"\n Paper covers Rock \n >> You Win!!! <<","Result",1);XP=XP+50;points=points+100;} else if (AiChoice.equals("scissors")){ JOptionPane.showMessageDialog(null,result+"\n Scissors cuts paper \n >> You Lose !!! <<","Result",1);XP=XP+5;points=points+0;} else if (AiChoice.equals("spock")) {JOptionPane.showMessageDialog(null,result+"\n Paper disproves spock \n >> You Win !!! <<","Result",1);XP=XP+50;points=points+100;} else {JOptionPane.showMessageDialog(null,result+"\n lizard eats paper \n >> You Lose !!! <<","Result",1);XP=XP+5;points=points+0;} } else if (userinput.equals("scissors")) { if (AiChoice.equals(userinput)){JOptionPane.showMessageDialog(null,result+"\n Draw","Result",1);XP=XP+10;points=points+50;} else if (AiChoice.equals("paper")) {JOptionPane.showMessageDialog(null,result+"\n Scissors cuts paper \n >> You Win !!! <<","Result",1);XP=XP+50;points=points+100;} else if (AiChoice.equals("rock")) {JOptionPane.showMessageDialog(null,result+"\n Rock crushes Scissors \n >> You Lose!!! <<","Result",1);XP=XP+5;points=points+0;} else if (AiChoice.equals("spock")) {JOptionPane.showMessageDialog(null,result+"\n Spock smashes Scissors \n >> You Lose !!! <<","Result",1);XP=XP+5;points=points+0;} else {JOptionPane.showMessageDialog(null,result+"\n Scissors decapacitae lizard \n >> You Win !!! <<","Result",1);XP=XP+50;;points=points+100;} } else if (userinput.equals("spock")) { if (AiChoice.equals(userinput)){JOptionPane.showMessageDialog(null,result+"\n Draw","Result",1);XP=XP+10;;points=points+50;} else if (AiChoice.equals("paper")){ JOptionPane.showMessageDialog(null,result+"\n paper disproves spock \n >> You Lose !!! <<","Result",1);XP=XP+5;points=points+0;} else if (AiChoice.equals("scissors")) {JOptionPane.showMessageDialog(null,result+"\n spock Smashes scissors \n >> You Win !!! <<","Result",1);XP=XP+50;points=points+100;} else if (AiChoice.equals("rock")) {JOptionPane.showMessageDialog(null,result+"\n Spock vaporizes Rock \n >> You Win!!! <<","Result",1);XP=XP+50;points=points+100;} else {JOptionPane.showMessageDialog(null,result+"\n lizard poisons spock \n >> You Lose !!! <<","Result",1);XP=XP+5;points=points+0;} } else if (userinput.equals("lizard")) { if (AiChoice.equals(userinput)){JOptionPane.showMessageDialog(null,result+"\n Draw","Result",1);XP=XP+10;points=points+50;} else if (AiChoice.equals("paper")){ JOptionPane.showMessageDialog(null,result+"\n Lizard eats paper \n >> You Win !!! <<","Result",1);XP=XP+50;points=points+100;} else if (AiChoice.equals("scissors")){ JOptionPane.showMessageDialog(null,result+"\n Scissors decapacitae lizard \n >> You Lose !!! <<","Result",1);XP=XP+5;points=points+0;} else if (AiChoice.equals("spock")) {JOptionPane.showMessageDialog(null,result+"\n lizard poisons spock \n >> You Win !!! <<","Result",1);XP=XP+50;points=points+100;} else {JOptionPane.showMessageDialog(null,result+"\n Rock crushes lizard \n >> You Lose!!! <<","Result",1);XP=XP+5;points=points+100;} } JOptionPane.showMessageDialog(null,"Your XP: "+ XP+"\n Your Points Accumelated: "+ points," RPSLS",1); //xp=Integer.toString(XP); validinput=true; playAgian=true; xPerience=Integer.toString(XP); //saveXP(username.getText(),xp);userXpLog(username.getText(),xp); } } } catch(NullPointerException e){displaygame();} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void newGameRPS() {\n newGame();\n myctr.setLabels();\n }", "public void playRockPaperScissor() {\n\t\tSystem.out.println(\"The pirates ask you to play 'Rock Paper Scissors' in order to against the pirates. Now you have to choose what you want to throw. \" + \"\\n\" + \"You can choose between: \");\n\t\tArrayList<String> gameElements = new ArrayList<String>(3);\n\t\tgameElements.add(\"Rock\");\n\t\tgameElements.add(\"Paper\");\n\t\tgameElements.add(\"Scissors\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"(1) Rock\");\n\t\t\tSystem.out.println(\"(2) Paper\");\n\t\t\tSystem.out.println(\"(3) Scissors\");\n\t\t\tint selectedAction = scanner.nextInt();\n\t\t\ttry { if (selectedAction <= 3 && selectedAction > 0) {\n\t\t\t\tint decision = game.determineWinnningRPSGame();\n\t\t\t\tString piratesThrows = game.getWhatPiratesThrowRPS(decision, gameElements.get(selectedAction-1));\n\t\t\t\tSystem.out.println(\"The pirate throws \" + piratesThrows);\n\t\t\t\tif (decision == 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tint piratesDemand = game.getPiratesDemand();\n\t\t\t\t\tSystem.out.println(\"You lose! Pirates demands: \" + piratesDemand + \" coins\");\n\t\t\t\t\tif (game.checkPirateSatisfaction()) {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tint money = game.getMoney();\n\t\t\t\t\t\tgame.updateMoney(money * -1);\n\t\t\t\t\t\tgame.gameOver(\"You lose play rock paper scissor game! \\n the pirate took all of your money and your items in your ship!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (decision == 1) {\n\t\t\t\t\tSystem.out.println(\"You need to play again!\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tSystem.out.println(\"You Win!! You can Continue your journey to your destination!\");\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "public void startGame(){\n\t\tSystem.out.println(\"UNI: nas2180\\n\" +\n\t\t\t\t\"Hello, lets play Rock Paper Scissors Lizard Spock!\\n\");\n\t\tSystem.out.println(\"Rules:\\n Scissors cuts Paper\\n \" +\n\t\t\t\t\"Paper covers Rock\\n \" +\n\t\t\t\t\"Rock crushes Lizard\\n \" +\n\t\t\t\t\"Lizard poisons Spock\\n \" +\n\t\t\t\t\"Spock smashes Scissors\\n \" +\n\t\t\t\t\"Scissors decapitates Lizard\\n \" +\n\t\t\t\t\"Lizard eats Paper\\n \" +\n\t\t\t\t\"Paper disproves Spock\\n \" +\n\t\t\t\t\"Spock vaporizes Rock\\n \" +\n\t\t\t\t\"(and as it always has) Rock crushes Scissors\\n\");\n\t\tthisGame = new GameResult();\n\t\tplayRound();\n\t}", "public static void rPS(Scanner input, Questions thisSession){\n String userInput=\"\"; \n boolean playerLost=false;\n Random rand=new Random(); \n byte action,enemy,lives=0;\n int randomNumber=rand.nextInt(thisSession.getLength()); \n System.out.println(\"You will fight against the machine choosing rock, paper or scissors five times.The amount of times you win against the IA are going to be\"+\n \" the amount of opportunities you will have to answer the question. \"+\n \"Your enemy in this rock paper scissor round is the question: \" + thisSession.getQuestion(randomNumber)+ \" \\nMake your first move\");\n for (int i=0;i<5;i++){\n action=(byte) rPSChoose(input, userInput);\n enemy=(byte) ((byte) rand.nextInt(3-1)+1);\n switch (action){\n case 1://rock\n switch(enemy){ \n case 1:\n rock();\n System.out.println(\"Tie, try again.\");\n i--;\n break;\n case 2:\n paper();\n System.out.println(\"You lost! Enemy chosed paper.\");\n break;\n case 3:\n scissor();\n System.out.println(\"You win! Enemy chosed scissor\");\n lives++;\n break;\n }\n break;\n case 2://paper\n switch(enemy){ \n case 2:\n paper();\n System.out.println(\"Tie, try again.\");\n i--;\n break;\n case 3:\n scissor();\n System.out.println(\"You lost! Enemy chosed Scissor.\");\n break;\n case 1:\n rock();\n System.out.println(\"You win! Enemy chosed rock.\");\n lives++;\n break;\n }\n break;\n case 3://scissor\n switch(enemy){ \n case 3:\n scissor();\n System.out.println(\"Tie, try again.\");\n i--;\n break;\n case 1:\n rock();\n System.out.println(\"You lost!Enemy chosed rock.\");\n break;\n case 2:\n paper();\n System.out.println(\"You win! Enemy chosed paper\");\n lives++;\n break;\n }\n }\n }\n\n System.out.println(\"It's now your turn to write the answer for the question, remember that you have \" + lives + \" lives!\");\n while (lives>0){\n userInput=input.nextLine();\n if (userInput.equals(thisSession.getAnswer(randomNumber))){\n youWon();\n lives=0;\n }else {\n System.out.println(\"Wrong answer\");\n lives--;\n if (lives==0){\n youLost();\n }\n }\n }\n\n System.out.println(\"Thanks for playing. Returning to main menu\");\n\n }", "private void playGame() {\n\t\t\n\t\t/* take 1$ from the wallet to play game */\n\t\tsetWallet(-1);\n\t\t\n\t\t/* generate 3 random slots */\n\t\tslot1 = getSlot();\n\t\tslot2 = getSlot();\n\t\tslot3 = getSlot();\n\t\tslotBox1 = getSlotBox(slot1);\n\t\tslotBox2 = getSlotBox(slot2);\n\t\tslotBox3 = getSlotBox(slot3);\n\t\t\n\t\t/* draw slots on the screen and compute result*/\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\tString result = gameOutcome(slot1, slot2, slot3);\n\t\ttopText = new GLabel(result);\n\t\tmidText = new GLabel(\"You now have \" + getWallet() + \"$.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\n\n\t}", "public void preGame() {\n\n\t}", "private void gameOver() {\n\t\t\n\t}", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "@Override\n public void loadGame() {\n\n }", "public static void main(String[] args) throws Exception\n {\n StdDraw.setCanvasSize(1920, 1080);\n StdDraw.setXscale(0, 1920);\n StdDraw.setYscale(0, 1080);\n //enable the calcul off the next screen before displaying\n //increase fluidity\n StdDraw.enableDoubleBuffering();\n\n int level;\n int number_of_wins = 0;\n RefreshTimer refresh_timer; //needed to get the same refresh rate\n //between every computer\n\n// StdAudio.loop(\"audio/background_low.wav\");\n //this music had to be remove for the zip to be less than 20MB...\n\n while (true) //the whole ame loop\n {\n IngameTimer timer1 = null; //timers for respawn\n IngameTimer timer2 = null;\n StdDraw.clear();\n int lives = 3; //chosen number of lives\n int lives2 = 3;\n Wrapper.first_player_points = 0;\n Wrapper.second_player_points = 0;\n //draw the menu screen, waiting for a key pressed\n while(true)\n {\n if (StdDraw.isKeyPressed(77)) //M key\n {\n DrawAll.drawMore();\n StdDraw.show();\n while (!StdDraw.isKeyPressed(82)) //R key\n {\n if (StdDraw.isKeyPressed(27))\n System.exit(0);\n }\n }\n else\n {\n DrawAll.drawStart();\n StdDraw.show();\n if (StdDraw.isKeyPressed(49)) //1 key\n {\n level = 1;\n break;\n }\n\n if (StdDraw.isKeyPressed(50)) //2 key\n {\n level = 2;\n break;\n }\n if (StdDraw.isKeyPressed(51)) //3 key\n {\n level = 3;\n break;\n }\n if (StdDraw.isKeyPressed(27)) //escape key\n System.exit(0);\n }\n }\n StdAudio.close();\n StdAudio.play(\"audio/start_click_v2.wav\");\n //create a new SpaceInvaders object and initliaze Wrapper variables\n Wrapper.initializeVariables();\n SpaceInvaders SI = new SpaceInvaders(level, number_of_wins);\n refresh_timer = new RefreshTimer(1); //just to avoid a null\n //comparision every iteration of the loop below\n //THE PLAYING PART\n while (SI.aliensWon() == 0)\n {\n if (refresh_timer.getTime() == 0)\n {\n refresh_timer = new RefreshTimer(20);\n\n //restart if no aliens left\n if (SI.aliensLeft() == 0)\n {\n DrawAll.drawWon();\n StdDraw.show();\n StdAudio.play(\"audio/win.wav\");\n WaitTimer timer = new WaitTimer(3000);\n synchronized (Wrapper.lock){Wrapper.lock.wait();}\n SI = new SpaceInvaders(level, ++number_of_wins);\n Wrapper.initializeVariables();\n }\n\n //pause screen\n if (StdDraw.isKeyPressed(80))\n {\n SI.pause();\n DrawAll.drawPause();\n StdDraw.show();\n while(true)\n {\n if (StdDraw.isKeyPressed(27)) //escape key\n System.exit(0);\n\n if (StdDraw.isKeyPressed(82)) //R key\n break;\n }\n SI.resume();\n }\n\n //calcul part\n SI.movePlayer();\n SI.updateBullets();\n SI.updateAliens();\n\n if (level != 2)\n SI.updateProtections();\n\n if (level == 1)\n {\n if (SI.player.isAlive() == 1)\n SI.updateBonus();\n if (Wrapper.extraLife() == 1)\n lives++;\n }\n\n //drawing part\n StdDraw.clear();\n //draw background\n DrawAll.drawBackground();\n //go SpaceInvaders.java to see what it draws\n SI.drawEverything();\n //draw rocket lives\n DrawAll.drawLivesFirst(lives);\n\n if (level != 3)\n DrawAll.drawPoints(SI);\n else\n {\n DrawAll.drawPointsMulti(SI);\n DrawAll.drawLivesSecond(lives2);\n }\n\n //check if player is still alive\n if (SI.player.isAlive() == 0)\n {\n DrawAll.drawDead(SI.player);\n if (timer1 == null)\n {\n timer1 = new IngameTimer(1000);\n lives--;\n if (lives == 0)\n break;\n }\n else if (timer1.time == 0)\n {\n timer1 = null;\n if (level != 3)\n SI.restart();\n else\n SI.player.restart();\n Wrapper.repositioning();\n }\n if (level != 3)\n DrawAll.drawDeadScreen();\n }\n\n //check game state (finished, lost, win\n if (SI.player2.isAlive() == 0)\n {\n DrawAll.drawDead(SI.player2);\n if (timer2 == null)\n {\n timer2 = new IngameTimer(1000);\n lives2--;\n if (lives2 == 0)\n break;\n }\n else if (timer2.time == 0)\n {\n timer2 = null;\n SI.player2.restart();\n }\n }\n }\n //need to pause the display of the images, otherwise\n //we literally see nothing\n StdDraw.show(10);\n }\n\n number_of_wins = 0;\n\n StdAudio.play(\"audio/game_over_v3.wav\");\n\n if (SI.aliensWon() == 1)\n {\n DrawAll.drawAliensWon();\n DrawAll.drawDead(SI.player);\n }\n\n if (lives == 0 && level != 3)\n DrawAll.drawAliensWon();\n else if (lives == 0)\n DrawAll.drawDeadPlayer1();\n else if (lives2 == 0)\n DrawAll.drawDeadPlayer2();\n\n StdDraw.show();\n\n WaitTimer timer = new WaitTimer(1000);\n synchronized (Wrapper.lock){Wrapper.lock.wait();}\n\n IngameTimer timer3 = null;\n int n = 5;\n int changed;\n if (level != 3)\n changed = Scoreboard.checkSolo();\n else\n changed = Scoreboard.checkMulti();\n\n //wait for key pressed\n while(true)\n {\n if (n == -1)\n break;\n else if (timer3 == null)\n timer3 = new IngameTimer(1200);\n else if (timer3.time == 0)\n {\n DrawAll.drawGameOver(level, SI.aliensWon(),\n lives, lives2, n, changed);\n n--;\n timer3 = null;\n StdDraw.show();\n }\n if (StdDraw.isKeyPressed(27)) //escape key\n {\n System.exit(0);\n break;\n }\n if (StdDraw.isKeyPressed(82)) //r key\n {\n break;\n }\n }\n }\n }", "public void playGame()\n\t{\n\t\t// Playing a new round; increase round id\n\t\troundId += 1;\n\n\t\tint diceRoll = 1 + dice.nextInt(6);\n\t\t\n\t\tif(diceRoll <= 3)\n\t\t{\n\t\t\tbranchId = 0;\n\t\t\tresult = 0;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 0\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbranchId = 1;\n\t\t\tresult = 6;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 6\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\t\n\t}", "public void getWinnerRPS(int w) {\n switch(w) {\n case -1: // Error testing\n System.out.println(\"Error: Game not evaluated properly\");\n break;\n case 0: // Implement code for a draw\n //System.out.println(\"It's a draw!\");\n gameString = \"Both drew with \";\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 1: // Implement code for player won\n //System.out.println(\"Player Won!\");\n gameString = \"Player Won with \";\n pScore++;\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 2: // Implement code for computer won\n //System.out.println(\"Computer Won!\");\n gameString = \"Computer Won with \";\n cScore++;\n gameString += addRPSPlayed(game.getComputerPlays());\n break;\n }\n game.resetGame();\n }", "public void play ()\r\n\t{\r\n\t\t// generates random numbers\r\n\t\tRandom generator = new Random();\r\n\t\tdouble randNum1 = generator.nextDouble();\r\n\t\tdouble randNum2 = generator.nextDouble();\r\n\t\t\r\n\t\tint type1 = randCompare(randNum1);\r\n\t\tint type2 = randCompare(randNum2);\r\n\t\t\r\n\t\tif (type1 == type2)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// type1 wins\r\n\t\telse if ((type1 == ROCK && type2 == SCISSORS) || (type1 == PAPER && type2 == ROCK) || (type1 == SCISSORS && type2 == PAPER))\r\n\t\t{\r\n\t\t\trpsSize[type2] = rpsSize[type2] - 1;\r\n\t\t\tsize = size -1;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tsize = size -1;\r\n\t\t\trpsSize[type1] = rpsSize[type1] - 1;\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public void checkGame() {\n\n\t}", "public void play() \n { \n \n createRooms();\n createCharacters();\n createItem();\n printWelcome();\n player = new Player(\"player\");\n Boolean exam;\n exam = false;\n /* player.addItem(necklace_red);\n player.addItem(halberd);\n player.addItem(set_of_forks_and_knives);\n player.addItem(candelar);\n player.addItem(potion6HP);\n player.addItem(bedroomkey);*/\n \n // Step 1 : start in the poolroom //\n Boolean step1Finish;\n Boolean step2Finish;\n Boolean step3Finish;\n Boolean step4Finish;\n Boolean step5Finish;\n Boolean step6Finish;\n Boolean step7Finish;\n Boolean step8Finish;\n Boolean step9Finish;\n Boolean step10Finish;\n Boolean step11Finish;\n step1Finish = false;\n step2Finish = false;\n step3Finish = false;\n step4Finish = false;\n step5Finish = false;\n step6Finish = false;\n step7Finish = false;\n step8Finish = false;\n step9Finish = false;\n step10Finish = false;\n step11Finish = false;\n \n // All the characters are in the poolroom and the exit opens only after speak with all the characters //\n Boolean canSpeak; // player can speak with PNG\n Boolean speak_with_mr_Taylor, speak_with_ms_Taylor, speak_with_ms_Cunningham, speak_with_chambermaid, speak_with_bob_Taylor, speak_with_mr_Cunningham;\n Boolean speak_with_ms_Wellington, speak_with_valet, speak_with_caretaker, speak_with_mr_Wellington, speak_with_nina_Taylor;\n Boolean find_bob_Taylor;\n Boolean toys_not_front_of_door = null;\n Boolean firstEnter;\n firstEnter = true;\n \n canSpeak = false;\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n\n Boolean can_exam_canvas;\n can_exam_canvas = false;\n Boolean find_bedroom_key;\n find_bedroom_key = false;\n \n int safe_code, essai_code;\n safe_code = 9515;\n \n if (exam)\n {\n System.out.println(\"You are in the poolroom. \\n\"\n + \"Mr Taylor was founded by the Chambermaid this morning when she came to clean the poolroom. Her scream attracted everyone. \\n\"\n + \"You notice that it is missing a pool cue and you find a strange red necklace nearby the pool. \\n\"\n + \"You examine the dead body and you notice a circular wound with the same diameter of a pool cue and some splinters of wood at the bottom of the neck. \\n\"\n + \"Take advantage that everyone is here to question them.\");\n canSpeak = true;\n exam = false;\n System.out.println(\"There are a lot of people in this room. \\n\" \n +\" Nina Taylor the master daughter has long brown hair. Sha has a beautiful blue dress. \\n\"\n +\" Bob Taylor is the little son of Mr Taylor. He seems to be really nice and kind. But he is really sad. \\n\"\n +\" Emma the Chambermaid is an old woman. She has been working for the family for a very long time. She has a black dress and a white pinny.\\n\" \n +\" Mr Cunningham is a grey-haired man with a beige square suit and a lie. \\n\"\n +\" Mr Taylor had dark blond hair and a mustache. He had nice black tuxedo. \\n\"\n +\" Mr Wellinghton is a brown-haired man with a brown square suit and a lie. \\n\"\n +\" Ms Cunnigham is a grey-blond-haired woman with a pink dress. \\n\"\n +\" Ms Taylor seems to be really sad. Sha has dark-brown hair and a long claret dress. \\n\"\n +\" Ms Wellinghton is a redhead-haired woman with a long light green dress. \\n \"\n +\" Alfred the Valet has curly blond hair. He seems to be bother. \\n\"\n +\" Sam the caretaker is a black-haired black man. \");\n }\n if (speak_with_mr_Taylor && speak_with_ms_Taylor && speak_with_ms_Cunningham && speak_with_chambermaid && speak_with_bob_Taylor && speak_with_mr_Cunningham\n && speak_with_ms_Wellington && speak_with_valet && speak_with_caretaker && speak_with_mr_Wellington && speak_with_nina_Taylor && exam)\n {\n canSpeak = false;\n step1Finish = true;\n poolroom.modifyExit(\"east\");\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n }\n\n // Step 2 : banqueting hall //\n if (step1Finish)\n {\n bob_Taylor.setRoom(cellar);\n nina_Taylor.setRoom(banquetinghall);\n ms_Cunningham.setRoom(dancingroom);\n if (currentRoom == banquetinghall)\n {\n if (firstEnter)\n { \n toys_not_front_of_door = false; //false = toys front of the door // true = toys not front of the door\n find_bob_Taylor = false;\n System.out.println(\" When you opened the poolroom door, you shut on a toy so you lose one HealthPoint\");\n player.setHP(player.getHP() - 1);\n firstEnter = false;\n }\n if (exam)\n {\n System.out.println(\"You cannot open the dancing room door now because there are a lot of toys. \\n\"\n + \"Nina Taylor is next to the toys and you can speak with her. \");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_nina_Taylor)\n {\n nina_Taylor.setText(\"These are my brother toys. Find him to tidy his toys\");\n speak_with_nina_Taylor = false;\n canSpeak = false;\n }\n }\n else if (currentRoom == hall)\n {\n // Step 2 bis : Hall //\n if (exam)\n {\n System.out.println(\" You are in the hall but there is nobody here. \");\n exam = false;\n }\n }\n else if (currentRoom == poolroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the poolroom. Mr Taylor's body was removed. All the peopple are gone. \\n\"\n + \"You do not want to stay in this room. The atmosphere has become bad. You want to leave.\");\n exam = false;\n }\n }\n else if (currentRoom == kitchen)\n {\n if (exam)\n {\n System.out.println(\"This is the kitchen, Bob Taylor is not here. \\n\"\n + \"A set of forks and knives is in one of the cupboards of the kitchen.\");\n exam = false;\n // Recupère arme\n }\n }\n else if (currentRoom == cellar)\n {\n if (exam)\n {\n System.out.println(\"You found Bob Taylor in the back of the cellar\");\n find_bob_Taylor = true;\n exam = false;\n canSpeak = true;\n }\n if (speak_with_bob_Taylor)\n {\n System.out.println(\"You convince Bob to tidy up his toys.\");\n toys_not_front_of_door = true;\n canSpeak = false;\n speak_with_bob_Taylor = false;\n }\n if (toys_not_front_of_door) \n {\n banquetinghall.modifyExit(\"south\");\n step2Finish = true;\n }\n }\n if (step2Finish)\n {\n if (currentRoom == dancingroom)\n {\n if (firstEnter)\n {\n if (exam)\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it. She seems to want to talk with you.\");\n exam = false;\n canSpeak = true;\n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.\");\n System.out.println(\"You spoke and danced a lot of time with Ms Cunningham. Then you are very tired so you lose one healthpoint\");\n player.setHP(player.getHP() - 1);\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n firstEnter = false;\n } \n if (exam)\n {\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it.\");\n exam = false;\n canSpeak = true; \n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Thank you. I feel better thanks to you.\");\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n }\n }\n else if (currentRoom == livingroom)\n {\n exam = false;\n System.out.println(\"You ride the last step and arrive in the living room. A little green ghost appears in the room. He seems not to be kind. \");\n if (ghost.getHP() <=0) \n {\n livingroom.modifyExit(\"north\");\n livingroom.modifyExit(\"west\");\n exam = true;\n if (exam)\n {\n System.out.println(\"There is no useful object and there is nobody here. \"); \n step3Finish = true;\n }\n }\n }\n \n if (step3Finish)\n {\n if (currentRoom == library)\n {\n if (exam)\n {\n System.out.println(\" A library with a lot of books is behind the door you just pushed. \\n\"\n + \"You see a big painting which depicts the same library where you are. There is just a difference between them. \\n\"\n + \"On the painting, a gramophone is pictured on a sideboard. The gramophone on the painting curiously looks like the gramophone in the dancing room. \\n\"\n + \"When you inspect the sideboard on the real library you see some wear marks as if an object was previously placed on it. \\n\"\n + \"You meet the chambermaid wanting to leave the library. She seems to want to tell you something but do not dare to approach you.\");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_chambermaid)\n {\n chambermaid.setText(\"I saw Nina Taylor go to the gardener hut some nights. I do not know what she is doing there. \");\n canSpeak = false;\n speak_with_chambermaid = false;\n \n }\n }\n \n else if (currentRoom == corridor)\n {\n System.out.println(\"There is a statut with a weapon in this corridor. You can take it weapon if you want. \");\n // recupere arme\n Boolean fight; // this variable will be initialize with the fight\n if (fight)\n {\n if (exam)\n {\n System.out.println(\" You are in a corridor. You see four doors. Only two are opened.\");\n exam = false;\n step4Finish = true;\n }\n }\n }\n if (step4Finish)\n {\n if (currentRoom == bathroom)\n {\n if (exam)\n {\n System.out.println(\" You enter in the bathroom and you see the chambermaid treating the valet's arm. \\n\"\n + \" The wound looks like a rodent bite but it is much bigger than a rat. It is strange because Mr Taylor was allergic to animals. \\n\"\n + \"You notice that there is a potion on the furniture next to the chambermaid. She notices that you are injured. \\n\"\n + \"She signals to you that you can take it. \"); \n //permet de prendre la potion\n exam = false;\n }\n //ajout potion possible pour le joueur\n\n }\n if (currentRoom == guestbedroom)\n {\n if (exam)\n {\n System.out.println(\" You are in the guest bedroom. Today this bedroom is Mr&Ms Cunnigham's bedroom. Mr Cunnigham is in his bedrrom.\");\n mr_Cunningham.setRoom(guestbedroom);\n ms_Cunningham.setText(\"It is strange, last time this canvas was not here.\");\n can_exam_canvas = true;\n if (exam && can_exam_canvas)\n {\n System.out.println(\" You find a key behind the canvas and you take it.\");\n find_bedroom_key = true;\n player.addItem(bedroomkey);\n } \n exam = false;\n }\n }\n \n if (step5Finish)\n {\n if (find_bedroom_key)\n {\n corridor.modifyExit(\"south\");\n }\n if (currentRoom == bedroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the host bedroom. You see a big safe with a four number code. Ms Taylor is in her room.\");\n ms_Taylor.setText(\"Oh no ! I am forgetting the number code ! Please, ask to my daughter, my guests and my employees. I gave to several of them a piece of this code. \");\n \n if (speak_with_ms_Taylor)\n {\n nina_Taylor.setRoom(dancingroom);\n nina_Taylor.setText(\"Bob Taylor has fallen into a 10-meter deep well and is trying to pull it up. \\n \" +\n \"Each day it rises 3 meters and slides 2 meters during the night.\\n\" +\n \"How many days will it take to get to the surface?\");\n ms_Wellington.setRoom(library);\n ms_Wellington.setText(\"In a girl group\\n\" +\n \" 70% wear a blue sweater\\n\" +\n \" 75% wear blue pants\\n\" +\n \" 85% wear a blue hat\\n\" +\n \" 85% wear a blue coat\\n\" +\n \"What is the minimum percentage of girls wearing only blue clothes?\");\n \n bob_Taylor.setRoom(library);\n bob_Taylor.setText(\"I saw my sister and my father arguing before his death.\");\n \n mr_Cunningham.setRoom(poolroom);\n mr_Cunningham.setText(\"David is 10 years old and his younger brother is half his age. \\n\" +\n \"When David will be 10 times older, how old will Franck be?\");\n \n \n }\n }\n }\n if (step6Finish)\n {\n if (currentRoom == bedroom)\n {\n System.out.println(\"Did you find the safe code? \");\n // enter the safe code -- creation int essai_code\n if (essai_code == safe_code)\n {\n System.out.println(\"You find the good number code, the safe door is opened. \\n \" +\n \"The safe contains a disk, a lot of money and a biscuits box.\");\n }\n }\n if (currentRoom == dancingroom\n // && il doit avoir le dique dans son inventaire\n )\n {\n ms_Taylor.setRoom(dancingroom);\n ms_Taylor.setText(\"What does this object do here, it should be in the library\");\n // player has to take the gramophone in his inventory\n }\n if (currentRoom == library \n // && il doit avoir le disque et le gramophone dans son inventaire\n )\n {\n System.out.println(\"You put the gramophone at its place and you insert the disk on it. \\n\"+\n \" You are hearing a loud noise and a door is appearing.\"); \n library.modifyExit(\"north\"); \n }\n if (step7Finish)\n {\n if (currentRoom == laboratory)\n {\n System.out.println(\"When you opened the door, a little green ghost appears and attacked you.\");\n if(fight_win)\n {\n System.out.println(\"The skeleton is dead. You see that one of its bone is strange. This bone seems to be carved as a key\");\n // joueur doit ramasser la clef\n \n if (exam)\n {\n System.out.println(\" You look and the desk and you find some construction plans. It seems that Mr Taylor wanted to dig very deeply at east from the garden. It is the same place than the gardener hut. \");\n }\n corridor.modifyExit(\"up\");\n System.out.println(\"You unblock a new room. A trapdoor appears in the corridor\");\n }\n }\n if (currentRoom == attic)\n {\n if (exam)\n {\n System.out.println(\" You finally discover the attic. It is dark because there is only one window lighting the room. \\n\"\n + \" You decide to look out the window and discover a huge garden hidden by the trees when guests arrive by the entrance. \");\n hall.modifyExit(\"north\");\n }\n }\n if (step8Finish)\n {\n if (currentRoom == garden)\n {\n if (exam)\n {\n System.out.println(\" You see a well at the north but there is a steel grid locked by a padlock.\\n\"\n + \"There is an apple tree next to it with only one apple on the tree. You can maybe pick up the apple and eat it now or later.\\n\"\n + \"\");\n }\n }\n }\n \n \n }\n \n \n \n \n /*player.addItem(necklace_red);\n player.addItem(necklace_red);\n player.addItem(necklace_red);*/\n /* \n \n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n */\n }\n }\n }\n }\n }\n }\n \n }", "public void startGame()\n\t{\n\t\tdead = false;\n\t\tpaused = false;\n\t\ttime = 0;\n\t\tclock = 0;\n\t\tdirection = RIGHT;\n\t\tdirection2 = RIGHT2;\n\t\thead = new Point(0, -1);\n\t\thead2 = new Point(58, -1);\n\t\ttronBody.clear();\n\t\ttronBody2.clear();\n\t\ttimer.start();\n\t\tlast_direction = 'R';\n\t\tlast_key = 'R';\n\t\tlast_direction2 = 'R';\n\t\tlast_key2 = 'R';\n\t\t\n\t}", "private void initialGame() {\n Display display = this.getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n GameUtils.mWidth = size.x;\n GameUtils.mHeight = size.y;\n GameUtils.frameWidth = (int)(GameUtils.mWidth / 2.5);\n GameUtils.frameHeight = GameUtils.frameWidth;\n GameUtils.dx = GameUtils.mWidth / 120;\n GameUtils.maxVelX = GameUtils.mHeight / 15;\n GameUtils.maxVelY = GameUtils.mHeight / 8;\n\n // Bitmap\n GameUtils.bitmapPika = BitmapFactory.decodeResource(getResources(),\n R.drawable.pika_sprite_8_384);\n GameUtils.bitmapPika = Bitmap.createScaledBitmap(GameUtils.bitmapPika,\n GameUtils.frameWidth * GameUtils.frameCount, GameUtils.frameHeight, false);\n GameUtils.apple = BitmapFactory.decodeResource(getResources(), R.drawable.apple);\n GameUtils.banana = BitmapFactory.decodeResource(getResources(), R.drawable.banana);\n GameUtils.coke = BitmapFactory.decodeResource(getResources(), R.drawable.coke);\n\n GameUtils.bitmapRestart = BitmapFactory.decodeResource(getResources(), R.drawable.restart);\n GameUtils.bitmapRestart = Bitmap.createScaledBitmap(GameUtils.bitmapRestart,\n GameUtils.mWidth / 12, GameUtils.mWidth / 12, false);\n GameUtils.bitmapPause = BitmapFactory.decodeResource(getResources(), R.drawable.pause);\n GameUtils.bitmapPause = Bitmap.createScaledBitmap(GameUtils.bitmapPause,\n GameUtils.mWidth / 15, GameUtils.mWidth / 15, false);\n\n // Game Data\n GameUtils.WIN = true;\n GameUtils.score = 0;\n GameUtils.apples = 0;\n GameUtils.bananas = 0;\n GameUtils.cokes = 0;\n GameUtils.jumps = 0;\n GameUtils.totalSec = GameUtils.totalTime;\n GameUtils.visibleFruit = 0;\n }", "public String wantPlayGame(int[][] payoffs, int roundTotal){\n\tcurRound=0;\n\tthis.roundTotal = roundTotal;\n\tprintString=getWelcomeScreen()+\"\\n\\n\";\n\tp1.setPayoffsAndTurns(payoffs[0][0],payoffs[1][0],payoffs[2][0],payoffs[3][0],roundTotal);\n\tp2.setPayoffsAndTurns(payoffs[0][1],payoffs[2][1],payoffs[1][1],payoffs[3][1],roundTotal);\n\tprintString+=\"------Player Rulesets------\\n\";\n\tprintString+=rulesNiceAndTidy(true);\n\tprintString+=rulesNiceAndTidy(false);\n\tprintString+=\"---------------------------\\n\\n\";\n\twhile (curRound<roundTotal){\n\t p1move = p1.nextMove(); //gets move for both players\n\t p2move = p2.nextMove();\n\t p1choice = (p1move==true?0:1); //gets index to assign points\n\t p2choice = (p2move==true?0:1);\n\t p1.yourReward(p1choice,p2choice); //gives them their rewaaaarrhhdd (this is a crucial Aladdin reference)\n\t p2.yourReward(p2choice,p1choice);\n\t curRound++;\t\t\t\t\t\t\t\t//increments the round\n\t p1.andSoItGoes(p1move,p2move,curRound); //updates histories and rounds of players\n\t p2.andSoItGoes(p2move,p1move,curRound);\n\t printString+=getMoveData(0)+\"\\n\\n\";\n\t}\n\tprintString+=\"\\n\\n\"+getWinner();\n\tprintDataToFile();\n\treturn getWinner();\n }", "public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 0;\n\t\tpaintMenu();\n\t}", "public void loadGame(){\n if(gamePaused == false){ return; }\n // animationThread.stop();\n // JOptionPane.showMessageDialog(null, \"Game Loaded\", \"Message\", 1);\n replay.load();\n board = replay.autoReplay();\n level = replay.getLevel();\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LevelMusic\");\n }\n musicName = \"LevelMusic\";\n setTitle(\"Chip's Challenge: Level \" + level);\n timeRuunableThread.setDrawNumber(true);\n timeRuunableThread.setSecond(replay.getTime());\n gameStarted = true;\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n timeRuunableThread.setGameStart(gameStarted);\n infoCanvas.drawLevelNumber(level);\n keysize = 0;\n infoCanvas.drawChipsLeftNumber(board.getTreasureRemainingAmount());\n infoCanvas.drawSquares((Graphics2D) infoCanvas.getGraphics(), 14 * infoCanvas.getHeight() / 20, infoCanvas.getWidth(), infoCanvas.getHeight());\n try {\n infoCanvas.drawKeysChipsPics();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n renderer = new MazeRenderer(boardCanvas.getGraphics());\n renderer.redraw(board, boardCanvas.getWidth(), boardCanvas.getHeight());\n checkMovedRedraw();\n }", "public static void runGame() {\n Scanner read = new Scanner(System.in);\n Random generator = new Random();\n \n //get username\n String userName = getUserName(read);\n\n //get number of rounds\n int rounds = getRounds(read, userName);\n \n //play the game!\n playGame(read, generator, userName, rounds);\n }", "public void gameOver() {\n // if (ENABLE_SOUND) {\n // sfx.endGame();\n // }\n doLeaderboard = true;\n frameRate(10);\n //this.state = GameState.MENU;\n //If line 151 runs, it bypasses the gameover leaderboard screen for some reason\n //redraw();\n}", "public static void main(String[] args) {\n printStatistics();\n System.out.println(\" ____Witcher Game Started____\");\n\n while (!gameOver()){\n round();\n }\n\n\n }", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public void newGame() {\n gameString = playerPlays = computerPlays = \"\";\n pScore = cScore = 0;\n setLabels();\n }", "public void playGame() {\n\t\t\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tplayRoundOne();\r\n\t\t}\r\n\t\t\r\n\t}", "public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }", "public GameSession()\r\n {\r\n red = new Player(\"Red\");\r\n blue = new Player(\"Blue\");\r\n \r\n gameBoard = new Board();\r\n \r\n redRounds = 0;\r\n blueRounds = 0;\r\n \r\n currentRedScore = 0;\r\n currentBlueScore = 0;\r\n \r\n matchEnd = false;\r\n roundEnd = false;\r\n \r\n redWin = false;\r\n blueWin = false;\r\n \r\n move[0] = -1;\r\n move[1] = -1;\r\n \r\n line[0] = -1;\r\n line[1] = -1;\r\n }", "private RockGameController() {\n points = 0; opponentPoints = 0;\n update1 = false; update2 = false; update3 = false; update4 = false; update5 = false;\n rockBodyOne = new RockGameBody(RockGameModel.getInstance().getRockOne());\n rockBodyTwo = new RockGameBody(RockGameModel.getInstance().getRockTwo());\n rockBodyThree = new RockGameBody(RockGameModel.getInstance().getRockThree());\n rockBodyFour = new RockGameBody(RockGameModel.getInstance().getRockFour());\n rockBodyFive = new RockGameBody(RockGameModel.getInstance().getRockFive());\n rocks = new ArrayList<RockGameBody>() {{add(rockBodyOne); add(rockBodyTwo); add(rockBodyThree); add(rockBodyFour); add(rockBodyFive);}};\n }", "private void playGame() {\n do {\n new Round(this);\n } while (!winner.isPresent());\n }", "@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}", "private void playGame() {\n drawBricks();\n for (int i = 1; i <= NTURNS; i++) {\n setBallSpeed();\n GOval ball = drawBall();\n paddle = drawPaddle();\n showLabel(\"ROUND \" + i, Color.ORANGE);\n waitForClick();\n playRound(ball);\n }\n showLabel(\"GAME OVER\", Color.BLACK);\n }", "private void initializeGame() {\n score = 0;\n scoreTimer = 0;\n rockTimer = 0;\n touchActive = false;\n gameOver = false;\n gameWon = false;\n currentSpeed = 1;\n gameLevel = 1;\n speedTimer = 0;\n }", "private static void initializeGame()\n {\n minSecret = 1;\n maxSecret = 100;\n secretNumber = newSecretNumber(minSecret,maxSecret);\n guessesLeft = 10;\n guessRange = 10;\n bestGuess = maxSecret + 1;\n extraGuesses = 5;\n isPlaying = true;\n safeLineUsed = false;\n showDebugInfo = false;\n\n }", "void gameResumed();", "public static void printGame(){\n System.out.println(\"Spielrunde \" + GameController.AKTUELLE_RUNDE);\n System.out.println(GameController.AKTUELLER_SPIELER +\" ist an der Reihe.\");\n System.out.println(\"Er attackiert \" +\n GameController.AKTUELLER_VERTEIDIGER + \" und verursacht \"\n + GameController.SCHADEN +\" Schaden. \");\n System.out.println();\n }", "public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "public static void main(String[] args) throws IOException {\r\n\r\n // CREATE A NEW INSTANCE OF A SCANNER, WHICH\r\n // ALLOWS US TO ACCEPT INPUT FROM USERS\r\n input = new Scanner(System.in);\r\n\r\n // PRINT A WELCOME MESSAGE\r\n WelcomeMessage();\r\n\r\n // GET THE NUMBER OF PLAYERS\r\n player_count = GetNumberOfPlayers();\r\n\r\n // SET THE SIZE OF THE PLAYER ARRAY\r\n player = new Player[player_count];\r\n\r\n // SET PLAYER NAMES\r\n SetPlayerNames();\r\n\r\n // DEFAULT MAX # OF ROUNDS (CUSTOMIZABLE)\r\n max_rounds = 5;\r\n\r\n // CHOOSE GAME MODE\r\n ChooseMode();\r\n\r\n // CHOOSE A RANDOM PLAYER TO START\r\n System.out.println(\"Choosing who goes first...\\n\");\r\n next_player = (int)(Math.random() * (double)player_count);\r\n\r\n\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~MAIN LOOP~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n\r\n // THIS LOOP RUNS THE WHOLE GAME\r\n while (rounds < max_rounds) {\r\n\r\n // \"PRESS ANY KEY TO CONTINUE\"\r\n System.out.println(\"Input to proceed...\");\r\n input.next();\r\n\r\n // SETUP A NEW ROUND\r\n StartNewRound();\r\n\r\n // THIS LOOP RUNS A SINGLE ROUND\r\n while (GetPlayersLeft() > 1) {\r\n\r\n\r\n // ~~~~~~~~~~~~~~~OBTAINING INPUT~~~~~~~~~~~~~~~\r\n\r\n\r\n // DID THEY SURVIVE?\r\n boolean survived = true;\r\n\r\n // DETECTS INPUT (LIGHTNING ROUND)\r\n boolean input_present = true;\r\n\r\n // PROMPT THE NEXT PLAYER\r\n System.out.println(player[next_player].GetName().toUpperCase() + \", IT IS YOUR TURN.\");\r\n System.out.print(\"Choose a number (0-9): \");\r\n\r\n // 3, 2, 1 SECS TO INPUT, VARIES INVERSELY WITH ROUND NUMBER (LIGHTNING ROUND)\r\n if (lightning_round) input_present = TimeInput(GetTimeFrame() );\r\n\r\n // STORE THE PLAYER'S CHOICE\r\n int choice = 0;\r\n\r\n // NO INPUT? NO MERCY (LIGHTNING ROUND)\r\n if (lightning_round && !input_present) {\r\n survived = false;\r\n System.out.println(\"NOT FAST ENOUGH!\");\r\n }\r\n // GET THEIR CHOICE\r\n else {\r\n choice = input.nextInt();\r\n input.nextLine();\r\n }\r\n\r\n // THIS HOLDS A MESSAGE IN CASE THEY CHOSE POORLY\r\n String message = \"\";\r\n\r\n\r\n // ~~~~~~~~~~~~~~~INTERPRETING CHOICE~~~~~~~~~~~~~~~\r\n\r\n\r\n if (choice == number) {\r\n // THEY PICKED THE MAGIC NUMBER\r\n survived = false;\r\n message = \"Tough luck!\";\r\n }\r\n else if (choice < 0) {\r\n // THEY PICKED A NUMBER TOO LOW (BELOW RANGE)\r\n survived = false;\r\n message = choice + \" was never an option...\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n else if (choice > 9) {\r\n // THEY PICKED A NUMBER TOO HIGH (ABOVE RANGE)\r\n survived = false;\r\n message = choice + \" was never an option...\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n else if (picked[choice]) {\r\n // THEY PICKED A NUMBER THAT HAD ALREADY BEEN PICKED\r\n survived = false;\r\n message = choice + \" has already been picked!\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n // GIVE SOME SPACE...\r\n System.out.println();\r\n\r\n\r\n // ~~~~~~~~~~~~~~~DETERMINING SURVIVAL~~~~~~~~~~~~~~~\r\n\r\n\r\n // THEY DIDN'T SURVIVE!\r\n if (!survived) {\r\n\r\n // LET THE USER KNOW THAT THEY FAILED\r\n System.out.println(\"( { K A B O O M } )\");\r\n System.out.println(player[next_player].GetName().toUpperCase() + \" HAS BEEN ELIMINATED.\");\r\n System.out.println(message);\r\n System.out.println();\r\n java.awt.Toolkit.getDefaultToolkit().beep(); // <-- BEEP!\r\n\r\n // REMEMBER THAT THEY LOST\r\n player[next_player].lost = true;\r\n\r\n // CHECK TO SEE IF THIS ENDED THE ROUND\r\n // AND PREP THE NEXT ROUND IF SO\r\n if (GetPlayersLeft() > 1) {\r\n SetNewNumber();\r\n ResetPickedNumbers();\r\n }\r\n }\r\n\r\n // THEY DID SURVIVE!\r\n else {\r\n // RECORD THAT THIS NUMBER IS NO LONGER AVAILABLE\r\n picked[choice] = true;\r\n\r\n // RANDOM CHANCE TO CLOWN ON THE PLAYER (2% CHANCE)\r\n if ((int) (Math.random() * 50) == 0) CheekyMessage();\r\n\r\n }\r\n\r\n // WHO'S NEXT?\r\n ChooseNextPlayer();\r\n }\r\n\r\n // INCREASE THE ROUND COUNT\r\n rounds++;\r\n System.out.println();\r\n\r\n // INCREASE SCORE AND RESET PLAYER STATES\r\n for (int i = 0; i < player_count; i++) {\r\n\r\n if (!player[i].lost) {\r\n // ADD A POINT TO THE WINNER\r\n player[i].score++;\r\n\r\n // LET EVERYONE KNOW WHO WON\r\n System.out.println(\"-----------------------------------------------\");\r\n System.out.println(player[i].GetName().toUpperCase() + \" WINS ROUND \" + rounds + \".\");\r\n System.out.println(\"-----------------------------------------------\");\r\n }\r\n\r\n // RESET THIS FOR THE NEXT ROUND\r\n player[i].lost = false;\r\n }\r\n\r\n // SHOW THE SCORES\r\n PrintScores();\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n\r\n // TAKE TOP TWO PLAYERS IN THE LAST ROUND AND START SUDDEN DEATH\r\n if ((player[player.length - 1].score == player[player.length - 2].score)\r\n && (rounds == max_rounds - 1) ) { SuddenDeath(); }\r\n }\r\n\r\n\r\n System.out.println(\"-----------------------------------------------\");\r\n System.out.println(player[player.length - 1].GetName().toUpperCase() + \" WINS THE GAME!!!\");\r\n System.out.println(\"-----------------------------------------------\");\r\n\r\n // THE GAME HAS ENDED\r\n System.out.println(\"!!! GAME OVER !!!\");\r\n }", "private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public void loadGame() {\n game.loadGame();\n }", "public void run(){\n\n while(Server.running){\n curTime = System.currentTimeMillis();\n\n if(turnGoing){\n \n if(curTime - lastTime >= ONE_MINUTE){\n lastTime = curTime;\n game.doTurn();\n\n sendTo(allUsers, \"<te>\");\n System.out.println(\"turn ended\");\n\n //scps\n sendTo(allUsers, \"\" + SCP0492.level);\n sendTo(allUsers, \"\" + game.getScps().size());\n Iterator<SCP0492> scpIterator = game.getScps().iterator(); \n while(scpIterator.hasNext()){\n SCP0492 curScp = scpIterator.next();\n sendTo(allUsers, curScp.getHealth() + \" \" + curScp.getMaxHealth() + \" \" + curScp.getX() + \" \" + curScp.getY() + \" \" + curScp.getAttackDamage());\n \n }\n\n //events\n sendTo(allUsers, \"\" + game.getEventsWithoutStonks().size());\n Iterator<Event> eIterator = game.getEventsWithoutStonks().iterator();\n while(eIterator.hasNext()){\n Event curEvent = eIterator.next();\n if(curEvent instanceof WholeGameEvent){\n sendTo(allUsers, curEvent.getClass().getSimpleName() + \" \" + curEvent.getLevel() + \" \" + curEvent.getTimeLeft());\n }else{\n sendTo(allUsers, curEvent.getClass().getSimpleName() + \" \" + curEvent.getLevel() + \" \" + curEvent.getTimeLeft() + \" \" + (int)(((AoeEvent)curEvent).getAoe().getX()) + \" \" + (int)(((AoeEvent)curEvent).getAoe().getY()));\n }\n }\n\n //buildings\n sendTo(allUsers, \"\" + game.getBuildings().size());\n Iterator<Building> bIterator = game.getBuildings().iterator();\n while(bIterator.hasNext()){\n Building curBuilding = bIterator.next();\n String send = curBuilding.getClass().getSimpleName() + \" \" + curBuilding.getInitialPrice() + \" \" + curBuilding.getMaxHealth() + \" \" + curBuilding.getHealth() + \" \" + curBuilding.getX() + \" \" + curBuilding.getY();\n if(curBuilding instanceof Residency){\n send = send + \" \" + ((Residency)curBuilding).getMaxCap();\n }else if(curBuilding instanceof Hospital){\n send = send + \" \" + ((Hospital)curBuilding).getMaxCapacity();\n }\n sendTo(allUsers, send); \n }\n\n //humans\n sendTo(allUsers, \"\" + game.getHumanMap().size());\n Iterator<Integer> humanKeyIterator = game.getHumanMap().keySet().iterator();\n while(humanKeyIterator.hasNext()){\n int key = humanKeyIterator.next();\n Human curHuman = game.getHumanMap().get(key);\n town.sendMessage(\"\" + key);\n String humanInfo = curHuman.getClass().getSimpleName() + \" \" + curHuman.getAge() + \" \" + curHuman.getHealth() + \" \" + curHuman.getX() + \" \" + curHuman.getY();\n if(curHuman instanceof Doctor){\n humanInfo += \" \" + ((Doctor)curHuman).getHealingAmount();\n }else if(curHuman instanceof Soldier){\n humanInfo = curHuman.getClass().getSimpleName() + \" \" + curHuman.getAge() + \" \" + curHuman.getHealth() + \" \" + curHuman.getMaxHealth() + \" \" + curHuman.getX() + \" \" + curHuman.getY() + \" \" + ((Soldier)curHuman).getAttackDamage();\n }else if(curHuman instanceof Spy){\n humanInfo += \" \" + ((Spy)curHuman).getSuccessRate() + \" \" + ((Spy)curHuman).getSus();\n }\n sendTo(allUsers, humanInfo);\n }\n\n //town supplies\n town.sendMessage(\"\" + game.getMoney());\n town.sendMessage(\"\" + game.getFood());\n //scp supplies\n scp.sendMessage(\"\" + game.getHume());\n \n //intel gathering\n if(game.gotIntel()){\n town.sendMessage(\"<i>\");\n town.sendMessage(\"\" + game.getHume());\n }\n\n //check for if either side has won\n if(game.checkScpWin()){\n sendTo(allUsers, \"<ge>\");\n scp.sendMessage(\"win\");\n town.sendMessage(\"lose\");\n Server.running = false;\n \n }else if(game.checkTownWin()){\n sendTo(allUsers, \"<ge>\");\n town.sendMessage(\"win\");\n scp.sendMessage(\"lose\");\n Server.running = false;\n }\n\n //In case of game ending because max turns reached\n if(game.getTurn() > Game.MAX_TURNS){\n sendTo(allUsers, \"<ge>\");\n sendTo(allUsers, \"tie\");\n Server.running = false;\n }\n\n turnGoing = !turnGoing;\n }\n }else{\n if(curTime - lastTime >= ONE_MINUTE/2){\n lastTime = curTime;\n game.resetTurnChanges();\n lastTime = curTime;\n sendTo(allUsers, \"<ts>\");\n System.out.println(\"turn started\");\n turnGoing = !turnGoing;\n }\n }\n }\n }", "public void displayGameMode (Graphics g1)\n {\n if (state == 1)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/1/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 2)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/2/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 3)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/3/plain.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 4)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/4/plain.png\").getImage(), 0, 0, null);\n }\n \n bird1.displayDisplayCharacter (g1);\n bird2.displayDisplayCharacter (g1);\n bird3.displayDisplayCharacter (g1);\n }", "private void prepareGame()\n {\n Rocket rocket = new Rocket();\n \n scoreCounter = new Counter(\"Score: \");\n \n addObject(rocket, getWidth()/2 + 100, getHeight()/2);\n \n addObject(scoreCounter, 60, 480);\n \n //TODO (69): Make a method call to addAsteroids that uses your constant for the number of asteroids\n addAsteroids(START_ASTEROIDS);\n }", "public void resetGame() {\n frameRate(framerate);\n w = width;\n h = height;\n if (width % pixelSize != 0 || height % pixelSize != 0) {\n throw new IllegalArgumentException();\n }\n\n this.resetGrid();\n this.doRespawn = false;\n this.runGame = true;\n\n spawns = new HashMap();\n spawns.put(\"RIGHT\", new Location(50, (h - topHeight) / 2)); // LEFT SIDE\n spawns.put(\"LEFT\", new Location(w-50, (h - topHeight) / 2)); // RIGHT SIDE\n spawns.put(\"DOWN\", new Location(w/2, topHeight + 50)); // TOP SIDE\n spawns.put(\"UP\", new Location(w/2, h - 50)); // BOTTOM SIDE\n}", "public void initGame() {\n\r\n\t\tscore = 0;\r\n\t\tshipsLeft = MAX_SHIPS;\r\n\t\tasteroidsSpeed = MIN_ROCK_SPEED;\r\n\t\tnewShipScore = NEW_SHIP_POINTS;\r\n\t\tnewUfoScore = NEW_UFO_POINTS;\r\n\t\tShip.initShip();\r\n\t\tinitPhotons();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t\tinitAsteroids();\r\n\t\tinitExplosions();\r\n\t\tplaying = true;\r\n\t\tpaused = false;\r\n\t\tphotonTime = System.currentTimeMillis();\r\n\t}", "void gameOver();", "void gameOver();", "boolean isGameSpedUp();", "private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }", "public TTT_GamePlay() {\r\n\t\tArrays.fill(p1, 0);\r\n\t\tArrays.fill(p2, 0);\r\n\t\tArrays.fill(selectedCells, false);\r\n\t\tthis.board = new int[9];\r\n\t\tthis.player = player1;\r\n\t\twin = false;\r\n\t}", "private void startGame() {\n hideView(R.id.title);\n hideView(R.id.score);\n gameView.setVisibility(View.VISIBLE);\n level=0;\n totalPoints =0;\n gameView.setTotalPoints(totalPoints);\n startLevel();\n }", "public void init() {\n\t\tinstallNewPiece();\n W(\"\\n\\n\\n\\nMAX LEVEL \"+P.MaxLevels+\"\\n\\n\\n\\n\");\n TimeInLevelList = CreateTimeInLevelList(P.MaxLevels);\n \n\t\tpause_resume_butt.setEnabled(false);\n\t\tstart_newgame_butt.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tif(start_newgame_butt.getLabel().equals(\"Start\"))\n\t\t\t\t\tstartGame();\n\t\t\t\telse\n\t\t\t\t\tnewGame();\n\t\t\t}\n\t\t});\t\t\n\t\tpause_resume_butt.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tif(pause_resume_butt.getLabel().equals(\"Pause\"))\n\t\t\t\t\tpauseGame();\n\t\t\t\telse\n\t\t\t\t\tresumeGame();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//create key listener for rotating, moving left, moving right\n\t\tKeyListener key_listener = new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n long tmp = LastButtonPressTime;\n LastButtonPressTime=(System.nanoTime()- StartTime)/1000000;\n if(LastButtonPressTime!=0 && LastButtonUnpressTime!=0)\n KeyUpQueue.add(new Tuple<Long,Long>(LastButtonUnpressTime,LastButtonPressTime));\n \n LastButtonUnpressTime=0; // this is just asking for trouble\n LastButtonPressTime=0; // but its for bugfixing purposes so its ok\n //W(\"\"+tmp+\",\"+LastButtonUnpressTime);\n \n \n if(StartTime != tmp_start_time)\n W(\"START TIME CHANGED\\n\\n\\n\"+StartTime+\",\"+tmp_start_time+\"\\n\\n\\n\\n\\n\");\n tmp_start_time = StartTime;\n \n if(KeyUpQueue.size()>0){\n KeyUpQueue = ContainWithinTimeWindow(KeyUpQueue, (System.nanoTime()-StartTime)/1000000,KeyUpTimeWindow);\n //DisplayDropPercentList(KeyUpQueue, KeyUpTimeWindow,\"outside\");\n UnpressPercent=UnpressPercentSanitized(KeyUpQueue, KeyUpTimeWindow, (System.nanoTime()-StartTime)/1000000);\n //W(\"unpress_percent \"+UnpressPercent);\n }\n \n\t\t\t\tif(timer.isPaused()) //don't do anything if game is paused\n\t\t\t\t\treturn;\n \n /* \n // this code has problems\n // we may still add sound in the future if we have time\n // for now its dummied out\n if (e.getKeyCode() >= 37 & e.getKeyCode() <= 40){\n if(!SoundKeyPressed[e.getKeyCode()-37] ){\n snd.PlayWave(\"bip\");\n // this works correctly but when buttons are pressed a bunch in quick succession it slows down the main loop\n }\n SoundKeyPressed[e.getKeyCode()-37]=true;\n }\n */\n\t\t\t\tif (e.getKeyCode() == 37 || e.getKeyCode() == 39) { //left or right arrow pressed\n if (e.getKeyCode() == 37) KeyCounter[0]++;\n\t\t\t\t\tif (e.getKeyCode() == 39) KeyCounter[1]++;\n\t\t\t\t\tint dir = e.getKeyCode() == 37 ? -1 : 1;\n\t\t\t\t\tsynchronized(timer) {\n\t\t\t\t\t\tcur_piece.cut();\n\t\t\t\t\t\tcur_piece.setX(cur_piece.getX() + dir); // try to move\n\t\t\t\t\t\tif( ! cur_piece.canPaste())\n\t\t\t\t\t\t\tcur_piece.setX(cur_piece.getX() - dir); // undo move\n\t\t\t\t\t\tcur_piece.paste();\n\t\t\t\t\t}\n\t\t\t\t\tgame_grid.repaint();\n \n\t\t\t\t}\n\t\t\t\telse if (e.getKeyCode() == 38) { //rotate\n KeyCounter[2]++;\n\t\t\t\t\tsynchronized(timer) {\n\t\t\t\t\t\tcur_piece.cut();\n\t\t\t\t\t\tcur_piece.rotate();\n\t\t\t\t\t\tif( ! cur_piece.canPaste())\n\t\t\t\t\t\t\tcur_piece.rotateBack();\n\t\t\t\t\t\tcur_piece.paste();\n\t\t\t\t\t}\n\t\t\t\t\tgame_grid.repaint();\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == 40) { //down arrow pressed; drop piece\n\t\t\t\t\tKeyCounter[3]++;\n DropStartTime=System.nanoTime();\n DownStartTime=(System.nanoTime()- StartTime)/1000000;\n timer.setFast(true);\n OutputTheDataWhenFirstFast = true;\n\t\t\t\t} \n if (e.getKeyCode() == KeyEvent.VK_CONTROL) ControlKeyPressed = true;\n if (e.getKeyCode() == KeyEvent.VK_F && ControlKeyPressed){\n ControlKeyPressed = false;\n SwitchToFocusTask();\n W(\"Mode=\"+LDS.Parameters.Mode);\n //return; // REMOVE LATER MAYBE\n //System.exit(998);\n }\n if (e.getKeyCode()==KeyEvent.VK_SUBTRACT) MinusKeyPressed = true;\n \n \n LogEvent(\"key_press_\"+ e.getKeyText(e.getKeyCode()));\n \n\t\t\t}\n \n public void keyReleased(KeyEvent e) {\n \n if (e.getKeyCode() >= 37 & e.getKeyCode() <= 40){\n SoundKeyPressed[e.getKeyCode()-37]=false;\n } \n \n LastButtonUnpressTime=(System.nanoTime()- StartTime)/1000000;\n \n if(LastButtonUnpressTime == tmp_unpress_time)\n W(\"UNPRESS IDENTICAL\\n\\n\\n\"+LastButtonUnpressTime+\",\"+tmp_unpress_time+\"\\n\\n\\n\\n\\n\");\n tmp_unpress_time = LastButtonUnpressTime;\n //W(\"Set unpress at \"+LastButtonUnpressTime);\n if (e.getKeyCode() == 40) { //down arrow pressed; drop piece\n timer.setFast(false);\n // down queue stuff\n DropDurationQueue=addToQueue(DropDurationQueue, (int) (System.nanoTime()-DropStartTime)/1000000, queue_history); \n DownEndTime=(System.nanoTime()- StartTime)/1000000;\n \n // drop percent stuff\n DownQueue.add(new Tuple<Long,Long>(DownStartTime,DownEndTime));\n DownStartTime = LongMin; // reset them back to \"not dropping\"\n DownEndTime = LongMin;\n DownQueue = removeOldFromQueue(DownQueue,(System.nanoTime()-StartTime)/1000000,DropPercentageTimeWindow);\n }\n if (e.getKeyCode() == KeyEvent.VK_CONTROL) ControlKeyPressed = false;\n if (e.getKeyCode()==KeyEvent.VK_SUBTRACT) MinusKeyPressed = false;\n LogEvent(\"key_release_\"+ e.getKeyText(e.getKeyCode()));\n \n }\n \n\t\t};\n\t\t\n\t\t// add the key listener to all components that might get focus\n\t\t// so that it'll work regardless of which has focus\n\t\tstart_newgame_butt.addKeyListener(key_listener);\n\t\tpause_resume_butt.addKeyListener(key_listener);\n\t\t\n\t\tPanel right_panel = new Panel(new GridLayout(3, 1));\t\n\t\tright_panel.setBackground(BACKGROUND_COLOR);\n\t\t\n\t\tPanel control_panel = new Panel();\n\t\tcontrol_panel.add(start_newgame_butt);\n\t\tcontrol_panel.add(pause_resume_butt);\n\t\tcontrol_panel.setBackground(BACKGROUND_COLOR);\n\t\tright_panel.add(control_panel);\n\t\t\n\t\tPanel stats_panel1 = new Panel(new GridLayout(5, 2));\n\t\tstats_panel1.add(new TetrisLabel(\"Use Arrow Keys\"));\n //stats_panel1.add(new TetrisLabel(\"Keys\"));\n\t\tstats_panel1.add(blank_label);\n stats_panel1.add(new TetrisLabel(\" Rows Deleted: \"));\n\t\t//stats_panel1.add(blank_label);\n //stats_panel1.add(level_label);\n stats_panel1.add(rows_deleted_label);\n stats_panel1.add(new TetrisLabel(\" Speed: \"));\n\t\tstats_panel1.add(speed_label);\n stats_panel1.add(new TetrisLabel(\" Duration: \"));\n\t\tstats_panel1.add(level_duration_label);\n stats_panel1.add(new TetrisLabel(\" Score: \"));\n\t\tstats_panel1.add(score_label);\n //right_panel.add(stats_panel1);\n\t\tPanel tmp1 = new Panel(new BorderLayout());\n\t\ttmp1.setBackground(BACKGROUND_COLOR);\n\t\ttmp1.add(\"Center\", stats_panel1);\n\t\tright_panel.add(tmp1);\n\t\t\n Panel tmp = new Panel(new BorderLayout());\n\t\ttmp.add(\"North\", new TetrisLabel(\" Next Piece:\"));\n\t\ttmp.add(\"Center\", next_piece_canvas);\n\t\ttmp.setBackground(BACKGROUND_COLOR);\n\t\tright_panel.add(tmp);\n\t\t\n//\t\tPanel stats_panel = new Panel(new GridLayout(4, 2));\n//\t\tstats_panel.add(new TetrisLabel(\"Use Left Right Up \"));\n//\t\tstats_panel.add(new TetrisLabel(\"Down Arrow Keys\"));\n\t\t//stats_panel.add(rows_deleted_label);\n//\t\tstats_panel.add(new TetrisLabel(\" Rows Deleted: \"));\n//\t\tstats_panel.add(rows_deleted_label);\n\t\t//stats_panel.add(new TetrisLabel(\" Level: \"));\n\t\t//stats_panel.add(level_label);\n//\t\tstats_panel.add(new TetrisLabel(\" Score: \"));\n//\t\tstats_panel.add(score_label);\n//\t\tstats_panel.add(new TetrisLabel(\" High Score: \"));\n//\t\tstats_panel.add(high_score_label);\n//\t\ttmp = new Panel(new BorderLayout());\n//\t\ttmp.setBackground(BACKGROUND_COLOR);\n//\t\ttmp.add(\"Center\", stats_panel);\n\t\t//right_panel.add(tmp);\n\t\t\n\t\t// finaly, add all the main panels to the applet panel\n\t\tthis.setLayout(new GridLayout(1, 2));\n\t\tthis.add(game_grid);\n\t\tthis.add(right_panel);\n\t\tthis.setBackground(BACKGROUND_COLOR);\n\t\tthis.validate();\n// Parameters P = new Parameters(\"PARAMETERS\");\n\t}", "public void gameLoop() {\r\n // make the whites of the eyes move from side to side\r\n if (whiteRight == 210){\r\n whiteRight += 20;\r\n }\r\n else if (whiteRight == 230){\r\n whiteRight -= 30;\r\n }\r\n else if (whiteRight == 200){\r\n whiteRight += 10;\r\n }\r\n if (whiteLeft == 350){\r\n whiteLeft += 20;\r\n }\r\n else if (whiteLeft == 370){\r\n whiteLeft -= 30;\r\n }\r\n else if (whiteLeft == 340){\r\n whiteLeft += 10;\r\n }\r\n // make the eyebrows move up and down\r\n if (eyebrowMove == 150){\r\n eyebrowMove -= 100;\r\n }\r\n else if (eyebrowMove == 50){\r\n eyebrowMove += 100;\r\n }\r\n // make the mustache move up and down\r\n if (mustache == 590){\r\n mustache +=20;\r\n }\r\n else if (mustache == 610){\r\n mustache -=40;\r\n }\r\n else if (mustache == 570){\r\n mustache +=20;\r\n }\r\n // make the tongue move up and down\r\n if (tongue == 700){\r\n tongue += 15;\r\n }\r\n else if (tongue == 715){\r\n tongue -= 15;\r\n }\r\n }", "@Override\n public void resetGame() {\n\n }", "static public void proccessGame(){\n int nextBallLeft = settingOfTheGame.getBallX() + settingOfTheGame.getBallDeltaX();\n int nextBallRight = settingOfTheGame.getBallX() + settingOfTheGame.getDiameter() + settingOfTheGame.getBallDeltaX();\n int nextBallTop = settingOfTheGame.getBallY() + settingOfTheGame.getBallDeltaY();\n int nextBallBottom = settingOfTheGame.getBallY() + settingOfTheGame.getDiameter() + settingOfTheGame.getBallDeltaY();\n\n int playerOneRight = settingOfTheGame.getFirst().getPlayerX() + settingOfTheGame.getFirst().getPlayerX();\n int playerOneTop = settingOfTheGame.getFirst().getPlayerY();\n int playerOneBottom = settingOfTheGame.getFirst().getPlayerY() + settingOfTheGame.getFirst().getPlayerHeight();\n\n float playerTwoLeft = settingOfTheGame.getSecond().getPlayerX();\n float playerTwoTop = settingOfTheGame.getSecond().getPlayerY();\n float playerTwoBottom = settingOfTheGame.getSecond().getPlayerY() + settingOfTheGame.getSecond().getPlayerHeight();\n\n //ball bounces off top and bottom of screen\n if (nextBallTop < 0 || nextBallBottom > 600) {\n settingOfTheGame.setBallDeltaY(settingOfTheGame.getBallDeltaY()*(-1));\n }\n\n //will the ball go off the left side?\n if (nextBallLeft < playerOneRight) {\n //is it going to miss the paddle?\n if (nextBallTop > playerOneBottom || nextBallBottom < playerOneTop) {\n\n Score.second++;\n\n if (Score.second == 3) {\n settingOfTheGame.setPlaying(false);\n settingOfTheGame.setGameOver(true);\n }\n\n settingOfTheGame.setBallX(250);\n settingOfTheGame.setBallY(250);\n } else {\n settingOfTheGame.setBallDeltaX(settingOfTheGame.getBallDeltaX()*(-1));\n }\n }\n\n //will the ball go off the right side?\n if (nextBallRight > playerTwoLeft) {\n //is it going to miss the paddle?\n if (nextBallTop > playerTwoBottom || nextBallBottom < playerTwoTop) {\n\n Score.first++;\n\n if (Score.first == 3) {\n settingOfTheGame.setPlaying(false);\n settingOfTheGame.setGameOver(true);\n }\n\n settingOfTheGame.setBallX(250);\n settingOfTheGame.setBallY(250);\n } else {\n settingOfTheGame.setBallDeltaX(settingOfTheGame.getBallDeltaX()*(-1));\n }\n }\n\n //move the ball\n settingOfTheGame.setBallX(settingOfTheGame.getBallX()+settingOfTheGame.getBallDeltaX()); //ballX += ballDeltaX;\n settingOfTheGame.setBallY(settingOfTheGame.getBallY()+settingOfTheGame.getBallDeltaY());//ballY += ballDeltaY;\n }", "public GameMode(int s)\n {\n bird3.y+=15;\n bird3.goUp = true;\n \n state = s;\n sprite = 0; \n }", "public void newGame (){\r\n\t\tcounter = 1;\r\n\t\tcode = \"\";\r\n\t\tscore = 0;\r\n\t\tcodeguess = \"\";\r\n\t\tSystem.out.println(\"counter = \" + counter);\r\n\t\tdelay (1000);\r\n\t\tlevelup.play();\r\n\t\tdelay (1000);\r\n\t\tdisplay = true;\r\n\t\tgenerateCode(10);\r\n\t}", "public static void main(String[]args)throws IOException{\n\t\tScanner scan = new Scanner(System.in);\n\t\tRandom generator = new Random();\n\t\tSystem.out.println(\"Welcome to a game of Reversi/Othello.\\nChoose option 3 in the main menu if you do not know how to play the game.\");\n\t\tSystem.out.println(\"Press any key to proceed to menu...\");\n\t\tSystem.in.read();\n\t\tSystem.out.println(\"\\t\\t Main Menu\");\n\t\tSystem.out.println(\"\\t\\t *********\");\n System.out.println(\"\\t\\t 1. Play Reversi\");\n System.out.println(\"\\t\\t 2. Options\");\n System.out.println(\"\\t\\t 3. How to play\");\n System.out.println(\"\\t\\t 4. Exit\");\n int choice=scan.nextInt();\n while(choice<1||choice>4){\n \tSystem.out.println(\"Invalid option. Try again.\");\n \tchoice=scan.nextInt();\n }\n while(choice==1||choice==2||choice==3){\n \tif(choice==1){\n \t\t//creating game board\n \t\tfor(int x=0;x<boardwidth+2;x++){\n \t\t\tfor(int i=0;i<boardlength+2;i++){\n \t\t\t\tboard[x][i]=\"-\";\n \t\t\t\tdynamicboard[x][i]=0;\n \t\t\t}\n \t\t}\n \t\t//assigning starting pieces\n \t\tboard[boardwidth/2][boardlength/2]=\"x\";\n \t\tboard[boardwidth/2+1][boardlength/2+1]=\"x\";\n \t\tboard[boardwidth/2+1][boardlength/2]=\"o\";\n \t\tboard[boardwidth/2][boardlength/2+1]=\"o\";\n \t\tplayerpoints(board);\n \t\tint movechoice;\n \t\t//this variable will alternate every loop to give turns to both player \n \t\tint playerturn=1;\n \t\t//piecevalue sets the value of a piece depending on the player turn, if player 1, then piecevalue will be x, if player 2, it will be o. Will be used in following loop\n \t\tString piecevalue=\"x\";\n \t\t//fullboard and playerlost are boolean variables that monitor the state of the board, game will end if the board is full or if a player has lost (has no more pieces left standing on the board)\n \t\tboolean fullboard=false;\n \t\tboolean playerlost=false;\n \t\t//preliminary fullboard check (if the dimensions are set at 2 by 2, game will automatically end at the start of the game since the board is ALREADY full)\n \t\tfullboard=true;\n \t\t\tfor(int x=1;x<=boardwidth;x++){\n\t\t\t\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\t\t\t\tif(board[x][i].equals(\"-\")){\n\t\t\t\t\t\t\tfullboard=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t\t//while loop begins, this loop will end once an end condition has been met\n \t\t\t//end conditions are explained in the tutorial or user manual but essentially, the game ends when the board is full, a player has no more pieces on the board left or both players cannot make a move.\n \t\twhile(fullboard==false&&playerlost==false&&nomovecount!=2){\n \t\t\t//boolean is first set to false and a check will be performed to see if the ai has been enabled for this player.\n \t\t\tboolean ai=false;\n \t\t\t//checks this for player 1\n \t\t\tif(playerturn==1){\n \t\t\t\tif(player1ai==true){\n \t\t\t\t\tai=true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t//checks player 2\n \t\t\tif(playerturn==2){\n \t\t\t\tif(player2ai==true){\n \t\t\t\t\tai=true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t//assigning the piece value according to the player's turn. Player 1=x Player 2=o\n \t\t\tif(playerturn==1){\n \t\t\tpiecevalue=\"x\";\n \t\t\t}\n \t\t\telse if(playerturn==2){\n \t\t\tpiecevalue=\"o\";\n \t\t\t}\n \t\t\t//checks board to see if ANY move can be made during this turn, if no move can, this move will be automatically skipped.\n \t\t\tboardcheck(piecevalue);\n \t\t\t//in the case that ai is not enabled for this player, the program will let the user enter values (choose their move)\n \t\t\tif(ai==false){\n \t\t\t\t//display player turn and current score for both players\n\t \t\t\tSystem.out.println(\"\\nPlayer \"+playerturn+\"'s turn (\"+piecevalue+\") Score - Player 1: \"+player1score+\" points (x), Player 2: \"+player2score+\" points (o)\");\n\t \t\t\t//displaying game board so the player can decide on their next move\n\t \t\t\tdisplayboard(board);\n\t \t\t\t//the following block of code will be initialized if boardcheck method has determined that a move can be made during this turn.\n\t \t\t\tif(boardavailability==true){\n\t \t\t\t\t//player gets to choose if they want to pass or make a move. Once a player wants to make a move it is too late to pass. \n\t \t\t\t\t//However, this issue is minor since no player would want to pass their move and if they do want to, they should plan ahead and press pass.\n\t \t\t\t\t//Remember, if no moves can be made, this block of code would not even be initialized, the program would auto-skip the player's turn, therefore there will always be a move to make.\n\t \t\t\t\tSystem.out.println(\"\\n(1)Make a move (2)Pass\");\n\t \t\t\t\tmovechoice=scan.nextInt();\n\t \t\t\t\twhile(movechoice!=1&&movechoice!=2){\n\t \t\t\t\t\tSystem.out.println(\"Invalid option, try again.\");\n\t \t\t\t\t\tmovechoice=scan.nextInt();\n\t \t\t\t\t}\n\t \t\t\t\t//if the player chooses to make a move, this block of code is initialized\n\t \t\t\t\tif(movechoice==1){\n\t \t\t\t\t\t//will keep looping and asking user to enter a row and column until valid coordinates are entered\n\t \t\t\t\t\twhile(validation==false){\n\t \t\t\t\t\t\tint row, column;\n\t \t\t\t\t\t\tSystem.out.print(\"Enter the row:\");\n\t \t\t\t\t\t\trow=scan.nextInt();\n\t \t\t\t\t\t\t//a player cannot put a piece thats out of the range of the board, this prevents them from doing so\n\t \t\t\t\t\t\twhile(row>boardlength||row<1){\n\t \t\t\t\t\t\t\tSystem.out.println(\"Invalid row on the board. Try again.\");\n\t \t\t\t\t\t\t\trow=scan.nextInt();\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\t//a player cannot put a piece thats out of the range of the board, this prevents them from doing so\n\t \t\t\t\t\t\tSystem.out.print(\"Enter the column:\");\n\t \t\t\t\t\t\tcolumn=scan.nextInt();\n\t \t\t\t\t\t\twhile(column>boardlength||column<1){\n\t \t\t\t\t\t\t\tSystem.out.println(\"Invalid column on the board. Try again.\");\n\t \t\t\t\t\t\t\tcolumn=scan.nextInt();\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\t//validationcheck method checks to see if the coordinate that the players wants to place a piece on is -, if it is, then validation will become true.\n\t \t\t\t\t\t\t//players cannot place a piece on an area of the board that has already been taken\n\t \t\t\t\t\t\tvalidation=validationcheck(row,column,piecevalue);\n\t \t\t\t\t\t\t//if the first validation method is true, it will then check to see if placing a piece on these coordinates will perform an action, if not, validation is still false and the loop will continue...\n\t \t\t\t\t\t\tif(validation==true){\n\t\t \t\t\t\t\t\tvalidationcheck2(row,column,piecevalue);\n\t\t \t\t\t\t\t}\n\t \t\t\t\t\t\t//in the case that validation is true after both checks, then the program will proceed to place a piece on the specified coordinate and perform the resulting actions (see tutorial or user manual if you do not know how this game works)\n\t \t\t\t\t\t\tif(validation==true){\n\t \t\t\t\t\t\t\tboard[row][column]=piecevalue;\n\t \t\t\t\t\t\t\tchangepieces(row,column,piecevalue);\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\t//naturally if validation is false, the program will simply display a message telling the user that it is an invalid move. It will then loop again and ask for a row and column again.\n\t \t\t\t\t\t\telse if(validation==false){\n\t \t\t\t\t\t\t\tSystem.out.println(\"Invalid move, try again.\");\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t\t//necessary or validation will be true on next loop skipping the inside loop.\n\t \t\t\t\t\tvalidation=false;\n\t \t\t\t\t}\n\t \t\t\t\t//if player skips, no action is performed as shown in this else if statement\n\t \t\t\t\telse if(movechoice==2){\n\t \t\t\t\t\tSystem.out.println(\"Player \"+playerturn+\" has chosen to pass their turn.\");\n\t \t\t\t\t}\n\t \t\t\t\t//checks if the board is full, if it is then the game will end.\n\t \t\t\t\tfullboard=true;\n\t \t\t\t\tfor(int x=1;x<=boardwidth;x++){\n\t \t\t\t\t\tfor(int i=1;i<=boardlength;i++){\n\t \t\t\t\t\t\tif(board[x][i].equals(\"-\")){\n\t \t\t\t\t\t\t\tfullboard=false;\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\t//switches playerturn so that the next loop, the other player gets a turn.\n\t \t\t\t\tif(playerturn==1){\n\t \t\t\t\t\tplayerturn=2;\n\t \t\t\t\t}\n\t \t\t\t\telse{\n\t \t\t\t\t\tplayerturn=1;\n\t \t\t\t\t}\n\t \t\t\t\t//calculates the amount of points each player has (which will be displayed in the next loop or if the game ends\n\t \t\t\t\tplayerpoints(board);\n\t \t\t\t\tif(player1score==0||player2score==0){\n\t \t\t\t\t\tplayerlost=true;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t//the following block of code will be initialized if the boardcheck method has determined that no moves can be made so it will skip the player's turn.\n\t \t\t\telse{\n\t \t\t\t\tSystem.out.println(\"Auto-Pass. This turn has been skipped due to the fact that this player cannot make any moves in this turn.\");\n\t \t\t\t\tSystem.out.println(\"Press any key to continue to the next turn...\");\n\t \t\t\t\t//instead of skipping too immediately and making the user lose track of what happened, the user gets to see that their move has been skipped.\n\t \t\t\t\tSystem.in.read();\n\t \t\t\t\t//notice how the fullboard method check and playerpoints method have not been initialized here. This is because the player's turn has been skipped so the points and the board will not change.\n\t \t\t\t\tif(playerturn==1){\n\t \t\t\t\tplayerturn=2;\n\t \t\t\t}\n\t \t\t\telse{\n\t \t\t\t\tplayerturn=1;\n\t \t\t\t}\n\t \t\t\t}\n \t\t\t}\n \t\t\t//the following block of code is the similar to the if statement in which there is no ai.\n \t\t\t//since there is AI, the user will not be asked to enter row/column and the program will randomly generator numbers until a valid move is generated and that will be used as the row and column.\n \t\t\telse{\n \t\t\t\tSystem.out.println(\"\\nPlayer \"+playerturn+\"'s turn (\"+piecevalue+\") Score - Player 1: \"+player1score+\" points (x), Player 2: \"+player2score+\" points (o)\");\n\t \t\t\tdisplayboard(board);\n\t \t\t\tSystem.out.println(\"\\n(AI player turn) Press any NUMBER to continue to the next turn...\");\n\t \t\t\t//System.in.read(); does not work properly in this situation (it may be skipped due to some reason)\n\t \t\t\t//scan.nextInt(); will always work\n\t \t\t\tint read=scan.nextInt();\n\t \t\t\tif(boardavailability==true){\n\t \t\t\t\t//chosenrow and chosencolumn variables\n\t \t\t\t\tint chosenrow=0,chosencolumn=0;\n\t \t\t\t\t\twhile(validation==false){\n\t \t\t\t\t\t\tint row, column;\n\t \t\t\t\t\t\t//generator random row and columns, these can be invalid and if so, the program will just loop this part again until valid numbers are generated.\n\t \t\t\t\t\t\trow=generator.nextInt(boardwidth)+1;\n\t \t\t\t\t\t\tcolumn=generator.nextInt(boardlength)+1;\n\t \t\t\t\t\t\tvalidation=validationcheck(row,column,piecevalue);\n\t \t\t\t\t\t\tif(validation==true){\n\t \t\t\t\t\t\t\tvalidationcheck2(row,column,piecevalue);\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\tif(validation==true){\n\t \t\t\t\t\t\t\tboard[row][column]=piecevalue;\n\t \t\t\t\t\t\t\tchangepieces(row,column,piecevalue);\n\t \t\t\t\t\t\t\tchosenrow=row;\n\t \t\t\t\t\t\t\tchosencolumn=column;\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t//displaying the coordinates that the AI chose.\n\t \t\t\t\tSystem.out.println(\"Player \"+playerturn+\" has placed a piece on coordinates (\"+chosenrow+\",\"+chosencolumn+\")\\n\");\n\t \t\t\t\tvalidation=false;\n\t \t\t\t\tfullboard=true;\n\t \t\t\t\tfor(int x=1;x<=boardwidth;x++){\n\t \t\t\t\t\tfor(int i=1;i<=boardlength;i++){\n\t \t\t\t\t\t\tif(board[x][i].equals(\"-\")){\n\t \t\t\t\t\t\t\tfullboard=false;\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\tif(playerturn==1){\n\t \t\t\t\t\tplayerturn=2;\n\t \t\t\t\t}\n\t \t\t\t\telse{\n\t \t\t\t\t\tplayerturn=1;\n\t \t\t\t\t}\n\t \t\t\t\tplayerpoints(board);\n\t \t\t\t\tif(player1score==0||player2score==0){\n\t \t\t\t\t\tplayerlost=true;\n\t \t\t\t}\n\t \t\t\t}\n\t \t\t\t//the AI's move will also be skipped if no moves can be made on the turn.\n\t \t\t\telse{\n\t \t\t\t\tSystem.out.println(\"Auto-Pass. This turn has been skipped due to the fact that this player cannot make any moves in this turn.\");\n\t \t\t\t\tSystem.out.println(\"Press any key to continue...\");\n\t \t\t\t\tSystem.in.read();\n\t \t\t\t\tif(playerturn==1){\n\t \t\t\t\tplayerturn=2;\n\t \t\t\t}\n\t \t\t\telse{\n\t \t\t\t\tplayerturn=1;\n\t \t\t\t}\n\t \t\t\t}\n \t\t\t}\n \t\t\t//nomovecheck method checks both players to see if they can make a move on the current board, if both of them can't, then the game will end.\n \t\t\tnomovecheck();\n \t\t\t//boardavailability will be reset to false and further changes on this boolean will be set in the next loop\n \t\t\t//this also ensures that if the game ends and restarts, this value will be false and not cause the game to end immediately.\n \t\t\tboardavailability=false;\n \t\t}\n \t\t//game ends if the above while loop ends (due to a certain condition broken)\n \t\tdisplayboard(board);\n \t\t//displays board and score of each player as well as a message of congratulations\n \t\tSystem.out.println(\"\\nFinal score - Player 1: \"+player1score+\" points, Player 2: \"+player2score+\" points\");\n \t\tif(player1score>player2score){\n \t\t\tSystem.out.println(\"\\nCongratulations Player 1. You are the winner! Better luck next time Player 2 :(\");\n \t\t}\n \t\telse if(player2score>player1score){\n \t\t\tSystem.out.println(\"\\nCongratulations Player 2. You are the winner! Better luck next time Player 1 :(\");\n \t\t}\n \t\telse if(player1score==player2score){\n \t\t\tSystem.out.println(\"\\nIt's a tie! Congratulations to both players!\");\n \t\t}\n \t\t//player scores are reset to 2 (starting game scores), nomovecount is set to 0 in case the user decides to run another game.\n \t\tplayer1score=2;\n \t\tplayer2score=2;\n \t\t//if nomovecount is not reset to 0, the next game will end immediately as it starts\n \t\tnomovecount=0;\n \t}\n \telse if(choice==2){\n \t\t//Options choice, allows users to modify board dimensions and set AI players.\n \t\tint optionchoice;\n \t\tSystem.out.println(\"What would you like to modify? (1)Board Dimensions (2)Set AI players\");\n \t\toptionchoice=scan.nextInt();\n \t\twhile(optionchoice!=1&&optionchoice!=2){\n \t\t\tSystem.out.println(\"Invalid option, try again.\");\n \t\t\toptionchoice=scan.nextInt();\n \t\t}\n \t\t//lets user change board size\n \t\tif(optionchoice==1){\n \t\t\tSystem.out.println(\"Here you'll be able to change the reversi gamem board size to your liking.\");\n \t\t\tSystem.out.print(\"Assign the length of the board: \");\n \t\t\tboardlength=scan.nextInt();\n \t\t\t//having boardlength or boardwidth be less than 2, the fundamentals mechanics of Reversi will be broken.\n \t\t\t//if boardlength is over 9, then the column indicators will be inaccurate (after 9, 10 is double digit and will cause the column indicators to not line up to the game board anymore)\n \t\t\twhile(boardlength<2||boardlength>9){\n \t\t\t\tSystem.out.println(\"The game cannot support this board length breaks. Try again.\");\n \t\t\t\tboardlength=scan.nextInt();\n \t\t\t}\n \t\t\tSystem.out.print(\"Assign the width of the board: \");\n \t\t\tboardwidth=scan.nextInt();\n \t\t\t//there is no reason why the width should be less than 9, but keeping it to maximum dimensions of 9 by 9 board is more professional.\n \t\t\twhile(boardwidth<2||boardwidth>9){\n \t\t\t\tSystem.out.println(\"The game cannot support this board width breaks. Try again.\");\n \t\t\t\tboardwidth=scan.nextInt();\n \t\t\t}\n \t\t\tSystem.out.println(\"Your board now has dimensions: \"+boardlength+\" by \"+boardwidth);\n \t\t}\n \t\t//Here, the user will be able to set AI players, all 4 possibilities are listed.\n \t\telse if(optionchoice==2){\n \t\t\tint aichange;\n \t\t\tSystem.out.println(\"(1)Player vs. Player (2)Player vs. Ai (3)AI vs. AI (4)AI vs. Player\");\n \t\t\taichange=scan.nextInt();\n \t\t\twhile(aichange<1||aichange>4){\n \t\t\t\tSystem.out.println(\"Invalid option, try again.\");\n \t\t\t\taichange=scan.nextInt();\n \t\t\t}\n \t\t\tif(aichange==1){\n \t\t\t\tplayer1ai=false;\n \t\t\t\tplayer2ai=false;\n \t\t\t\t}\n \t\t\telse if(aichange==2){\n \t\t\t\tplayer1ai=false;\n \t\t\t\tplayer2ai=true;\n \t\t\t\t}\n \t\t\telse if(aichange==3){\n \t\t\t\tplayer1ai=true;\n \t\t\t\tplayer2ai=true;\n \t\t\t\t}\n \t\t\telse if(aichange==4){\n \t\t\t\tplayer1ai=true;\n \t\t\t\tplayer2ai=false;\n \t\t\t}\n \t\t}\n \t}\n \t//Game tutorial, explains the game using the actual game board to effectively teach the user how the game works\n \telse if(choice==3){\n \t\tboardwidth=8;\n \t\tboardlength=8;\n \t\tfor(int x=0;x<boardwidth+2;x++){\n \t\t\tfor(int i=0;i<boardlength+2;i++){\n \t\t\t\tboard[x][i]=\"-\";\n \t\t\t}\n \t\t}\n \t\tboard[boardwidth/2][boardlength/2]=\"x\";\n \t\tboard[boardwidth/2+1][boardlength/2+1]=\"x\";\n \t\tboard[boardwidth/2+1][boardlength/2]=\"o\";\n \t\tboard[boardwidth/2][boardlength/2+1]=\"o\";\n \t\tSystem.out.println(\"Reversi Game Tutorial\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\");\n \t\tSystem.in.read();\n \t\tSystem.out.println(\"Reversi is a board game where each player's aim is to have more pieces on the board.\");\n \t\tSystem.out.println(\"Turns alternate and on each player's turn, the player can make a move by placing their pieces somewhere on the board.\\nAlternatively, they can pass(not recommended)\");\n \t\tSystem.out.println(\"Please read on to find out more about the pass feature.\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\");\n \t\t//double System.in.read(); are used as one does not perform the action somehow\n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tdisplayboard(board);\n \t\tSystem.out.println(\"\\nThis is the starting board for most games, each player will have 2 pieces diagonal to each other at the center of the board\");\n \t\tSystem.out.println(\"[x] are pieces of player 1, [o] are pieces of player 2, [-] represent unused spaces\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\");\n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tSystem.out.println(\"When a piece is placed, it'll convert [up, down, left, right, all diagonals directions] pieces to its own type if a specific condition is met.\");\n \t\tSystem.out.println(\"The condition is that there must be a same-type piece in that certain direction.\\nSo, if this condition is met, all enemy pieces in between the placed piece and the piece it is making a 'connection' with.\\nNOTE:This connection is broken if there is a blank space [-] in between the connection.\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\"); \n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tSystem.out.println(\"Example: In this situation, Player 1 (x) decides to place their piece on coordinates (5,3)\");\n \t\tdisplayboard(board);\n \t\tboard[5][3]=\"x\";\n \t\tboard[5][4]=\"x\";\n \t\tSystem.out.println(\"\\nPress any key to continue...\"); \n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tdisplayboard(board);\n \t\tSystem.out.println(\"\\nHere is the result of this move.\");\n \t\tSystem.out.println(\"This can happen with all directions simultaneously as long as the above condition is met.\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\"); \n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tSystem.out.println(\"There a few rules to the placing of these pieces on a player's turn:\");\n \t\tSystem.out.println(\"Rule #1: the player piece must be placed on a blank space represented by [-] (cannot replace an already placed piece such as [x] or [o])\");\n \t\tSystem.out.println(\"Rule #2: the player's move must perform an action (make a 'connection' with another piece) other than being placed on the board.\");\n \t\tSystem.out.println(\"NOTE: Rule #2 will take some time to comprehend. Example: a unit cannot be placed in an area where its surrounding units are blank [-],\\nremember, a blank space breaks/blocks potential connection.\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\"); \n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tSystem.out.println(\"ILLEGAL MOVES\");\n \t\tboard[7][7]=\"o\";\n \t\tboard[3][3]=\"x\";\n \t\tdisplayboard(board);\n \t\tSystem.out.println(\"\\nCoordinates (7,7) and (3,3) are illegal in this scenario.\\n(7,7) cannot make any connections due to being surrounded by blank space, on top of the fact that even if it was not, its (up,down,left,right,diagonals) directions never reach the other two present [o] units.\\n(3,3) does reach another x at (down,right) direction, but NO connection is made. A connection must involve opponent pieces in between friendly pieces.\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\"); \n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tSystem.out.println(\"Do you need to worry about this? No, the program will not let you make any illegal moves breaking the rules.\\nYou will need to re-enter your move if this happens.\");\n \t\tSystem.out.println(\"In addition, if no move can be made during one's turn, the program will automatically skip this turn at your leisure.\");\n \t\tSystem.out.println(\"\\nPress any key to continue...\"); \n \t\tSystem.in.read();\n \t\tSystem.in.read();\n \t\tSystem.out.println(\"Conditions of winning:\\n1.Board is full, player with most points wins\\n2.One player has no units/pieces left standing, their opponent wins\\n3.No moves can be made by either player, player with most points win\");\n \t\tSystem.out.println(\"\\nFor more information, see the user manual.\\nEnjoy your game!\");\n \t\tSystem.in.read();\n \t}\n \tSystem.out.println(\"\\nPress any key to return to menu...\");\n \tSystem.in.read();\n \t//For some reasons, System.in.read(); does not work after a game (choice 1) has been played. This if statement ensures that it does.\n \tif(choice==1){\n \t\tSystem.in.read();\n \t}\n \t//re-initializing menu\n \tSystem.out.println(\"\\t\\t Main Menu\");\n \t\tSystem.out.println(\"\\t\\t *********\");\n System.out.println(\"\\t\\t 1. Play Reversi\");\n System.out.println(\"\\t\\t 2. Options\");\n System.out.println(\"\\t\\t 3. How to play\");\n System.out.println(\"\\t\\t 4. Exit\");\n choice=scan.nextInt();\n\t\t}\n System.out.println(\"Thank you for playing Reversi, come play again anytime.\");\n\t}", "void startGame();", "void startGame();", "void startGame();", "private void resetGame(){\n\n }", "public void createGame();", "public void loadGame() {\n\t\tmanager.resumeGame();\n\t}", "Games game();", "public static void RockPaper(){\n\n\t\t// Store user choice as generated option\n\t\tint userNum = getRandomNum();\n\t\t\n\t\t// Store computer choice as generated option\n\t\tint compNum = getRandomNum();\n\t\t\n\t\t// Determine which option was selected for user\n\t\tString userOption = whichRPS(userNum);\n\t\t\n\t\t// Determine which option was selected for computer\n\t\tString compOption = whichRPS(compNum);\n\t\t\n\t // Display user choice and computer choice\n\t System.out.println(\"You played \"+ userOption+\", and the computer played \"+ compOption);\n\t \n\t // Determine results of game\n\t \n\t // If user and computer choices are the same \n\t if (userNum == compNum) {\n\t\t System.out.println(\"It was a tie.\");\n\t } \n\t \n\t // Rock1 > Scissors3\n\t if (compNum==1 && userNum==3) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Scissors3 > Paper2\n\t if (compNum==3 && userNum==2) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Paper2 > Rock1\n\t if (compNum==2 && userNum==1) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Or else the user won\n\t else{\n\t System.out.println(\"You won.\");\n\t }\n\t return;\n\t}", "public void game(){\n gameMusic.loop(pitch, volume);\n }", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public String addRPSPlayed(int p) {\n if(p == 1) {\n return \"rock\";\n } else if(p == 2) {\n return \"paper\";\n } else {\n return \"scissors\";\n }\n }", "public interface GameParameters {\n\n\t// Window Settings\n\tpublic static final int WINDOW_WIDTH = 800;\n\tpublic static final int WINDOW_HEIGHT = 600;\n\tpublic static final int FRAME_RATE = 60;\n\n\t// Game States\n\tpublic static final int MAINMENU_STATE = 0;\n\tpublic static final int GAMEPLAY_STATE = 1;\n\tpublic static final int HIGHSCORE_STATE = 2;\n\n\t// Background\n\tpublic static final String BACKGROUND_ID = \"background\";\n\tpublic static final String BACKGROUND_IMAGE = \"/images/background.png\";\n\n\t// Borders\n\tpublic enum BorderType {\n\t\tTOP, LEFT, RIGHT\n\t};\n\n\tpublic static final int BORDER_WIDTH = 6;\n\tpublic static final String TOP_BORDER_ID = \"topBorder\";\n\tpublic static final String LEFT_BORDER_ID = \"leftBorder\";\n\tpublic static final String RIGHT_BORDER_ID = \"rightBorder\";\n\n\t// Blocks\n\tpublic static final String MAP_FILE = \"maps/level1.map\";\n\tpublic static final String BLOCK_1_IMAGE = \"/images/block_1.png\";\n\tpublic static final String BLOCK_2_IMAGE = \"/images/block_2.png\";\n\tpublic static final String BLOCK_3_IMAGE = \"/images/block_3.png\";\n\n\t// Timer\n\tpublic static final String STOP_WATCH_ID = \"stopWatch\";\n\n\t// Ball\n\tpublic static final String BALL_ID = \"ball\";\n\tpublic static final float INITIAL_BALL_SPEED = 0.3f;\n\tpublic static final float SPEEDUP_VALUE = 0.0001f;\n\tpublic static final String BALL_IMAGE = \"/images/ball.png\";\n\n\t// Stick\n\tpublic static final String STICK_ID = \"stick\";\n\tpublic static final float STICK_SPEED = 0.5f;\n\tpublic static final String STICK_IMAGE = \"/images/stick.png\";\n\n\t// Player\n\tpublic static final String PLAYER_ID = \"player\";\n\tpublic static final String NO_LIFE_LEFT = \"noLifeLeft\";\n\n\t// Pause\n\tpublic static final String PAUSE_ID = \"pause\";\n\tpublic static final String PAUSE_IMAGE = \"/images/pause.png\";\n\n\t// Win\n\tpublic static final String WIN_ID = \"win\";\n\n\t// Escape\n\tpublic static final String ESCAPE_ID = \"escape\";\n\n\t// Highscore\n\tpublic static final String HIGHSCORE_FILE = \"highscores/highscore.hsc\";\n}", "public void render(Graphics2D g){\n if(game.gameState == Game.AppState.MENU){\n Font fnt0 = new Font(\"Serif\", Font.BOLD,45);\n Font fnt1 = new Font(\"Serif\", Font.BOLD,25);\n\n g.setFont(fnt0);\n g.setColor(Color.BLACK);\n g.drawString(\"DYNA BLASTER\", 122, 100);\n\n g.setFont(fnt1);\n g.fillRect(190,200,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"PLAY\", 268, 235);\n\n g.setColor(Color.BLACK);\n g.fillRect(190,300,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"BEST RESULTS\", 205, 335);\n\n g.setColor(Color.BLACK);\n g.fillRect(190,400,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"HELP\", 268, 435);\n\n g.setColor(Color.BLACK);\n g.fillRect(190,500,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"EXIT\", 272, 535);\n }\n else if(game.gameState == Game.AppState.RESULTS){\n Font fnt0 = new Font(\"Serif\", Font.BOLD, 35);\n Font fnt1 = new Font(\"Serif\", Font.BOLD, 25);\n Font fnt2 = new Font(\"Serif\", Font.BOLD, 20);\n\n g.setFont(fnt0);\n g.setColor(Color.BLACK);\n g.drawString(\"LIST\", 255, 80);\n g.setFont(fnt2);\n g.drawString(\"Place Nick Score\", 70, 120);\n for(int i=0;i<10;i++) {\n g.drawString(i+1+\" \"+handler.scores.getScores(i), 90, 150+30*i);\n }\n g.setFont(fnt1);\n g.setColor(Color.BLACK);\n g.fillRect(190,500,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"BACK\", 265, 535);\n }\n else if(game.gameState == Game.AppState.HELP){\n Font fnt0 = new Font(\"Serif\", Font.BOLD, 35);\n Font fnt1 = new Font(\"Serif\", Font.BOLD, 25);\n Font fnt2 = new Font(\"Serif\", Font.BOLD, 20);\n Font fnt3 = new Font(\"Serif\", Font.PLAIN, 16);\n\n g.setFont(fnt0);\n g.setColor(Color.BLACK);\n g.drawString(\"HELP\", 255, 100);\n String []command=helpconfig.gethelpstring();\n g.setFont(fnt2);\n g.drawString(command[0], 70, 150);\n g.setFont(fnt3);\n g.drawString(command[1], 70, 170);\n g.drawString(command[2], 70, 190);\n g.setFont(fnt2);\n g.drawString(command[3], 70, 230);\n g.setFont(fnt3);\n for(int i=4;i<helpconfig.get_length_of_commands();i++) {\n g.drawString(command[i], 70, 250+(i-4)*20);\n\n }\n g.setFont(fnt1);\n g.setColor(Color.BLACK);\n g.fillRect(190,500,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"BACK\", 265, 535);\n }\n }", "@Override\n public void display() {\n Game game = PiggysRevenge.getCurrentGame();\n int bricks = 0;\n House house = game.getHouse();\n if (game.getHouse().isCompleted()) {\n try {\n bricks = GameControl.calcNumberOfBricks(house.getLength(), house.getWidth(), house.getHeight(), house.getStories());\n } catch (GameControlException ex) {\n this.console.println(ex.getMessage());\n }\n } else {\n bricks = 0;\n }\n int turns = game.getTurns();\n boolean hasEaten = game.getPlayer().isHasEaten();\n boolean wolfKilled = game.isWolfKilled();\n int result = 0;\n try {\n result = GameControl.calcScore(bricks, turns, hasEaten, wolfKilled);\n } catch (GameControlException ex) {\n this.console.println(ex.getMessage());\n }\n if (result>0) {\n this.console.println(\"+\" + (bricks*10) + \" Points for building the house.\");\n this.console.println(\"-\" + (turns*10) + \" Points for the number of turns taken (\" + turns + \" turns).\");\n } else {\n this.console.println(\"You get no points if you do not build a house,\"\n + \"\\neat the roast beef, or kill the wolf.\");\n }\n if (hasEaten) {\n this.console.println(\"+1000 Points for eating roast beef.\");\n }\n if (wolfKilled) {\n this.console.println(\"+2000 Points for killing the wolf.\");\n }\n this.console.println(\"\\nYOUR SCORE IS: \" + result);\n\n if (gameOver) {\n HighScore[] highScores;\n\n File varTmpDir = new File(\"highscores.txt\");\n\n if (varTmpDir.exists()) {\n try (FileInputStream fips = new FileInputStream(\"highscores.txt\");\n ObjectInputStream input = new ObjectInputStream(fips);) {\n \n\n highScores = (HighScore[]) input.readObject();\n highScores[10] = new HighScore(game.getPlayer().getName(), result, house);\n\n for (int n = 0; n < highScores.length; n++) {\n for (int m = 0; m < highScores.length - 1 - n; m++) {\n if (highScores[m].getScore() < highScores[m + 1].getScore()\n || \"---\".equals(highScores[m].getName())) {\n HighScore swapHighScore = highScores[m];\n highScores[m] = highScores[m + 1];\n highScores[m + 1] = swapHighScore;\n }\n }\n }\n\n try (FileOutputStream fops = new FileOutputStream(\"highscores.txt\");\n ObjectOutputStream output = new ObjectOutputStream(fops);) {\n \n output.writeObject(highScores);\n this.console.println(\"Score saved successfully\");\n \n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n\n } else {\n try (FileOutputStream fops = new FileOutputStream(\"highscores.txt\");\n ObjectOutputStream output = new ObjectOutputStream(fops);) {\n \n\n highScores = new HighScore[11];\n for (int i = 0; i < highScores.length; i++){\n highScores[i] = new HighScore(\"---\", 0, new House(5, 5, 6, 1));\n \n }\n\n highScores[0] = new HighScore(game.getPlayer().getName(), result, house);\n output.writeObject(highScores);\n this.console.println(\"New highscore file created. Score saved successfully\");\n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n\n }\n }\n }", "@Override\r\n\tpublic void render(GameContainer gc, StateBasedGame sbgame, Graphics g)\r\n\t\t\tthrows SlickException {\r\n\t\tbackground.draw(0, 0);\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(45, 65, 645, 500);\r\n\t\tg.setColor(Color.white);\r\n\t\tg.drawString(\"War Vessels Instructions\", 55, 70);\r\n\t\tg.drawString(\"On the main menu select 'New Game' to start a new game of War Vessels.\", 55, 100);\r\n\t\tg.drawString(\"From this screen you, the player, must strategically place your ships\", 55, 125);\r\n\t\tg.drawString(\"in order to elude your enemies attacks.\", 55, 140);\r\n\t\tg.drawString(\"Once all of your ships have been placed from here you must make a\", 55, 170);\r\n\t\tg.drawString(\"decision. Should you play against a regular opponent or take on the\", 55, 185);\r\n\t\tg.drawString(\"challenge of a smarter one? You make this decision by selecting\", 55, 200);\r\n\t\tg.drawString(\"the start button for either opponent.\", 55, 215);\r\n\t\tg.drawString(\"At this point the game enters the battle phase and you may make\", 55, 245);\r\n\t\tg.drawString(\"your first move by slecting a space to attack on the radar screen,\", 55, 260);\r\n\t\tg.drawString(\"the grid on the right. The game will respond with a hit or a miss\", 55, 275);\r\n\t\tg.drawString(\"for each space and your opponent will then take a shot at your ships.\", 55, 290);\r\n\t\tg.drawString(\"As the game progresses ships will be hit, once the ship is sunk\", 55, 320);\r\n\t\tg.drawString(\"it will be marked in the tray with a large red X\", 55, 335);\r\n\t\tg.drawString(\"The game continues until either you or your opponent has\", 55, 350);\r\n\t\tg.drawString(\"destroyed all of the opposing ships.\", 55, 365);\r\n\t\tg.drawString(\"Once the game is over the opposing player's grid will be shown\", 55, 395);\r\n\t\tg.drawString(\"and statistics will be displayed. You may then go back to the\", 55, 410);\r\n\t\tg.drawString(\"main menu and play another game.\", 55, 425);\r\n\t\tmainMenuButton.draw(MENUX, MENUY);\r\n\t\t\r\n\t}", "private void update() {\n\t\t// Every frame will update these variables, independent of game state\n\t\tmCamera.update();\n\t\tfloat deltaTime = Gdx.graphics.getDeltaTime();\n mHealthText = \"Castle Strength: \" + mCastleHealth;\n mRoundScoreText = \"This Round Score: \" + mRoundScore;\n\t\tmTotalScoreText = \"Total Game Score: \" + mTotalScore;\n\n\t\t// Switch statement to handle game state\n\t\tswitch (mGameState) {\n\t\t\tcase STATE_PRE_GAME:\n\t\t\t\t// Before the game starts, the first two buttons (new game and resume) are visible\n\t\t\t\tmButtons[0].setVisible(true);\n\t\t\t\tmButtons[1].setVisible(true);\n\t\t\t\tcheckStartNewGameButton();\n\t\t\t\tcheckLoadGameButton();\n\t\t\t\tbreak;\n\t\t\tcase STATE_ROUND_START:\n\t\t\t\tmButtons[2].setVisible(true);\n\t\t\t\thandleRoundStart();\n\t\t\t\tcheckPauseGameButton();\n\t\t\t\tbreak;\n\t\t\tcase STATE_ROUND_PLAY:\n\t\t\t\tmButtons[2].setVisible(true);\n\t\t\t\tif(!mPaused) {\n\t\t\t\t\thandleStandardGameplay(deltaTime);\n\t\t\t\t\tcheckPauseGameButton();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmButtons[3].setVisible(true);\n\t\t\t\t\tcheckResumeGameButton();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase STATE_ROUND_OVER:\n\t\t\t\tmButtons[4].setVisible(true);\n\t\t\t\tmButtons[5].setVisible(true);\n\t\t\t\tmButtons[6].setVisible(true);\n\t\t\t\tcheckRepairCastleButton();\n\t\t\t\tcheckSaveGameButton();\n\t\t\t\tcheckNextRoundButton();\n\t\t\t\tbreak;\n\t\t\tcase STATE_GAME_OVER:\n\t\t\t\tmButtons[0].setVisible(true);\n\t\t\t\tcheckStartNewGameButton();\n\t\t\t\tbreak;\n\t\t}\n\n\n\t}", "public void runGame() {\r\n\t\ttry {\r\n\t\t\thost.startNewGame(width, height, false);\r\n\t\t\tguest.startNewGame(width, height, true);\r\n\t\t\tnotifyStartGame(width, height);\r\n\t\t} catch(Exception e) {return;}\r\n\t\twhile(!game.isGameOver()) {\r\n\t\t\tcurrentPlayer = game.getCurrentPlayer();\r\n\t\t\tMove move;\r\n\t\t\ttry {\r\n\t\t\t\tmove = currentPlayer.getNextMove();\r\n\t\t\t} catch(Exception e) { return ;}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif(game.isValidMove(move)) {\r\n\t\t\t\t\tgame.registerMove(move);\r\n\t\t\t\t\thost.registerMove(move);\r\n\t\t\t\t\tguest.registerMove(move);\r\n\t\t\t\t\tnotifyMove(move);\r\n\t\t\t\t}\r\n\t\t\t} catch (IllegalMove e) { }\r\n\t\t\tcatch (Exception e) { return; }\r\n\t\t}\r\n\n\t\ttry {\r\n\t\t\thost.finishGame(game.getResult(host));\r\n\t\t\tguest.finishGame(game.getResult(guest));\r\n\t\t\tnotifyFinishGame(game.getResult(host));\r\n\t\t} catch( Exception e) { return; }\n\t}", "public GameTypeWrapper playGame();", "public void newGame() {\n\t\tplayer1Score = 0;\r\n\t\tplayer2Score = 0;\r\n\t\tif (score != null) {\r\n\t\t\tdrawScore();\r\n\t\t}\r\n\t\treset();\r\n\t}", "public Game() {\r\n\r\n\t\tmakeFrame();\r\n\t\tisClicked = false;\r\n\t\tisPlaying = false;\r\n\t\tlevelEasy = true;\r\n\t\tlevelIntermediate = false;\r\n\t\tlevelHard = false;\r\n\t\tplayerScore = 0;\r\n\r\n\t}", "@Override\n public Roshambo generateRoshambo() {\n playerResult = Roshambo.ROCK;\n return playerResult;\n }", "@Override\r\n\tpublic void playGame() {\n\t\tSystem.out.println(\"SmartPhone具有玩游戏的功能\");\r\n\t}", "public GameLogic() {\n this.display = createScreen();\n playerShipHealth = 30;\n enemyShipHealth = 20;\n playerShield = 1;\n enemyShield = 1;\n playerMissile = 10;\n enemyMissile = 5;\n\n isPlayerPilotDamaged = false;\n isPlayerGunLDamaged = false;\n isPlayerGunMDamaged = false;\n isPlayerShieldDamaged = false;\n isPlayerEngineDamaged = false;\n\n isEnemyPilotDamaged = false;\n isEnemyGunLDamaged = false;\n isEnemyGunMDamaged = false;\n isEnemyShieldDamaged = false;\n isEnemyEngineDamaged = false;\n\n playerEvasionPercent = .3;\n enemyEvasionPercent = .3;\n\n }", "public static void main(String[] args){\n\t\tGameLoop game=new GameLoop();\n\t\tgame.registerGlobalCallbacks();\n\t\t//Game loop and setting initial scene\n\t\tmusic = new Sound(\"res\\\\Music.wav\");\n\t\tmusic.setLoop(true);\n\t\tgameOverMenu.setMusic(new Sound(\"res\\\\GameOver.wav\"));\n\t\ttimeText = new Text(screenWidth*9/10-100,screenHeight*1/32-20,20,20,\"\");\n\t\ttimeText.setColor(0, 0, 0);\n\t\tscoreText = new Text(screenWidth*9/10-100,screenHeight*1/32,20,20,\"\");\n\t\tscoreText.setColor(0, 0, 0);\n\t\twaveText = new Text(screenWidth*9/10-100,screenHeight*1/32+20,20,20,\"\");\n\t\twaveText.setColor(0, 0, 0);\n\t\t\n\t\tinitScene iLauncher = new initScene(game);\n\t\toLauncher = new overScene(game);\n\t\t\n\t\tmainMenu.addUnselItem(screenWidth/2-165, screenHeight/2-300, 50, 50, \"Spell Flingers\",0,0,1);\n\t\tmainMenu.addUnselItem(25, screenHeight-45, 20, 20, \"CONTROLS: WASD to move, esc to pause, and mouse buttons to cast spells!\",0,0,0);\n\t\tmainMenu.addUnselItem(screenWidth/2-265, screenHeight/2-308, 64, (Texture) SpellList.getTexture(Spell.ARCANE_MISSILE)[0]);\n\t\tmainMenu.addUnselItem(screenWidth/2+265, screenHeight/2-308, 64, (Texture) SpellList.getTexture(Spell.ARCANE_MISSILE)[0]);\n\t\tmainMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-100, 30, 30, \"Play Game\", 1, 0, 0, 0, 0, 0), iLauncher);\n\t\tmainMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-50, 30, 30, \"Exit\", 1, 0, 0, 0, 0, 0), null);\n\t\tmainMenu.select(0);\n\t\t\n\t\tpauseMenu.addUnselItem(screenWidth/2-165, screenHeight/2-300, 50, 50, \"PAUSED\",0,1,0);\n\t\tpauseMenu.addUnselItem(timeText);\n\t\tpauseMenu.addUnselItem(scoreText);\n\t\tpauseMenu.addUnselItem(waveText);\n\t\tpauseMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-100, 30, 30, \"Resume Game\", 1, 0, 0, 0, 0, 0), game);\n\t\tpauseMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-50, 30, 30, \"Abandon Run\", 1, 0, 0, 0, 0, 0), oLauncher);\n\n\t\ttimeTextGO = new Text(screenWidth/2-165, 240, 20, 20,\"\");\n\t\ttimeTextGO.setColor(1, 1, 1);\n\t\tscoreTextGO = new Text(screenWidth/2-165, 270, 20, 20,\"\");\n\t\tscoreTextGO.setColor(1, 1, 1);\n\t\twaveTextGO = new Text(screenWidth/2-165, 300, 20, 20,\"\");\n\t\twaveTextGO.setColor(1, 1, 1);\n\t\tgameOverMenu.addUnselItem(screenWidth/2-165, 100, 50, 50, \"GAME OVER\",1,0,0);\n\t\tgameOverMenu.addUnselItem(timeTextGO);\n\t\tgameOverMenu.addUnselItem(scoreTextGO);\n\t\tgameOverMenu.addUnselItem(waveTextGO);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+50, 30, 30, \"New Game\", 1, 0, 0, 1, 1, 1), iLauncher);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+100, 30, 30, \"Return to Main Menu\", 1, 0, 0, 1, 1, 1), mainMenu);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+150, 30, 30, \"Exit\", 1, 0, 0, 1, 1, 1), null);\n\t\t\n\t\tgame.setScene(mainMenu);\n\t\tgame.gameLoop();\n\t}", "private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "boolean winGame();", "@Override\n public void loop() {\n\n telemetry.addData(\"Status\", \"TeleOp Mode Running\");\n\n // Sets the power level for each driving motors\n double leftPower;\n double rightPower;\n\n // sets the power level for lifting the grippers\n double armPower;\n\n // get power value from gamepad1 (person 1) y position for driving\n leftPower = -gamepad1.left_stick_y;\n rightPower = gamepad1.right_stick_y;\n\n leftPower = Range.clip(leftPower, -0.7, 0.7);\n rightPower = Range.clip(rightPower, -0.7, 0.7);\n\n // gently raise or lower the arm (restricted to -0.5 lower | 0.5 raise)\n // get power value from gamepad2 (person 2) y position for extending arm\n\n armPower = -gamepad2.right_stick_y; // ensure the motor goes in the correct direction (full power possible)\n armPower = Range.clip(armPower, -0.5, 0.5);\n\n // Servo control: 0-0degrees, 0.5=90 degrees, 1.0=180 degrees\n // HS-485-HB servos\n\n // The settings for gripper arms positions (person 2)\n\n // forward position or grabbed block\n if (gamepad2.y) {\n leftGrab.setPosition(1); // set position to 0 degrees\n rightGrab.setPosition(0);\n leftTop.setPosition(0.6);\n rightTop.setPosition(0.4);\n telemetry.addData(\"pressed\", \"Y\");\n\n // side position\n } else if (gamepad2.b) {\n leftGrab.setPosition(0.82); // set position to 45 degrees\n rightGrab.setPosition(0.18);\n leftTop.setPosition(1);\n rightTop.setPosition(0);\n telemetry.addData(\"pressed\", \"B\");\n\n // ready to grab position \\ /\n } else if (gamepad2.a) {\n leftGrab.setPosition(0.9167); // set position to 15 degrees\n rightGrab.setPosition(0.0833);\n leftTop.setPosition(1);\n rightTop.setPosition(0);\n telemetry.addData(\"pressed\", \"A\");\n\n // stowed\n } else if (gamepad2.right_bumper) {\n leftGrab.setPosition(0);\n rightGrab.setPosition(1);\n telemetry.addData(\"pressed\", \"X\");\n }\n\n if(gamepad1.b) {\n\n colorArm.setPosition(0.25); // stowed colorArm\n telemetry.addData(\"pressed\", \"B\");\n\n }\n\n\n // top grap positions set\n if (gamepad2.left_bumper) {\n leftTop.setPosition(0.4);\n rightTop.setPosition(0.6);\n telemetry.addData(\"Info\", \"STOWED\");\n\n }\n /*\n else if (gamepad2.dpad_up) {\n leftTop.setPosition(0.9);\n rightTop.setPosition(0.1);\n telemetry.addData(\"Info\", \"UP\");\n\n }\n else if (gamepad2.dpad_down) {\n\n leftTop.setPosition(0.45);\n rightTop.setPosition(0.55);\n telemetry.addData(\"Info\", \"DOWN\");\n\n }\n */\n\n // Send calculated power to wheels\n leftDrive.setPower(leftPower);\n rightDrive.setPower(rightPower);\n armMotor.setPower(armPower);\n // extendingArm.setPower(extendingArmPower);\n\n // Show the elapsed game time and current status of robot's hardware.\n telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n telemetry.addData(\"Motors\", \"left (%.2f), right (%.2f)\", leftDrive.getPower(), rightDrive.getPower());\n telemetry.addData(\"Arm Motor\", \"(%.2f)\", armMotor.getPower());\n telemetry.addData(\"Left Grab Servo Position\", leftGrab.getPosition());\n telemetry.addData(\"Right Grab Servo Position\", rightGrab.getPosition());\n telemetry.addData(\"Left Top Servo Position\", leftTop.getPosition());\n telemetry.addData(\"Right Top Servo Position\", rightTop.getPosition());\n telemetry.addData(\"Color Arm Position\", colorArm.getPosition());\n telemetry.update();\n }", "public void playGame() {\n \t\n \t//Starts up window for graphical display of game\n MainWindow window = new MainWindow();\n window.launchWindow();\n \n boolean playing = true;\n int attacker, defender;\n Attack attack;\n Response response;\n /*\n * Each iteration of this loop is one player's turn.\n */\n while (playing) {\n /*\n * For now we do debug output. Before going ot production we would want to change this,\n * and at least shop showing all secret Ship placement at every turn.\n */\n //printDebugState(0);\n // printDebugState(1);\n\n attacker = currentPlayer;\n defender = otherPlayer(currentPlayer);\n\n \n /*\n * First gather an Attack\n */\n if (isAI[attacker]) { // It is an AI's turn\n attack = players[attacker].makeAttack(playerShips[1]); //makeAttack takes the players Ship array to check and see if it gets a hit\n } else { // It is a human's turnids[1\n attack = consoleGetAttack(attacker);\n }\n\n System.out.println(\"Player \" + currentPlayer +\n \" attacks at (\" + attack.getRow() + \",\" + attack.getColumn() + \")\");\n \n /*\n * Deliver the attack and collect the Response\n */\n if (isAI[defender]) { // The defender is an AI\n response = players[defender].receiveAttack(attack);\n } else { // It is a human's turn\n response = consoleGetResponse(attack, defender);\n }\n\n switch (response.getResult()) {\n case Response.HIT:\n System.out.println(\"It's a HIT!\");\n break;\n case Response.MISS:\n System.out.println(\"It's a MISS!\");\n break;\n case Response.SUNK:\n System.out.println(\"Ship sunk: \" + response.getShipName());\n \n break;\n case Response.ALLSUNK:\n System.out.println(\"Ship sunk: \" + response.getShipName());\n System.out.println(\"Game over; player \" + currentPlayer + \" wins!\");\n playing = false;\n break;\n }\n \n \n /*\n * Return the Response to the Attacker\n */\n if (isAI[currentPlayer]) { // It is an AI's turn\n players[currentPlayer].receiveResponse(response);\n } else { // It is a human's turn\n }\n\n /*\n * Finally update the UI's instance variables\n */\n if (response.getResult() == Response.MISS) {\n grids[currentPlayer].set(attack.getRow(), attack.getColumn(), Grid.MISS);\n } else {\n grids[currentPlayer].set(attack.getRow(), attack.getColumn(), Grid.HIT);\n }\n changeCurrentPlayer();\n } // while (true) -- Continue playing turns until the game ends\n }", "public void actualGame(Stage gameStage){\r\n\t\tsetStartConditions();\r\n\t\tGroup gamePane = new Group(player1, coins1, enemy1, moneycounter, portal1, portal2);\r\n\t\tScene gameScene = new Scene(gamePane, 46*20, 85*10);\r\n\r\n\r\n\t\t//starts moving player, added links to sprites of player facing different directions\r\n\t\t//not sure how to implement them yet\r\n\t\tgameScene.setOnKeyPressed(new EventHandler<KeyEvent>() {\r\n\t\t\tpublic void handle(KeyEvent pressed){\r\n\r\n\r\n\t\t\t\tif(pressed.getCode() == KeyCode.W){\r\n\t\t\t\t\twhichDirection = Direction.UP;\r\n\t\t\t\t}\r\n\t\t\t\telse if(pressed.getCode() == KeyCode.A){\r\n\t\t\t\t\twhichDirection = Direction.LEFT;\r\n\t\t\t\t}\r\n\t\t\t\telse if(pressed.getCode() == KeyCode.S){\r\n\t\t\t\t\twhichDirection = Direction.DOWN;\r\n\t\t\t\t}\r\n\t\t\t\telse if(pressed.getCode() == KeyCode.D){\r\n\t\t\t\t\twhichDirection = Direction.RIGHT;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t);\r\n\r\n\t\t// stops the player once key is released\r\n\t\tgameScene.setOnKeyReleased(new EventHandler<KeyEvent>(){\r\n\t\t\tpublic void handle(KeyEvent lifted){\r\n\t\t\tif(lifted.getCode()== KeyCode.W){\r\n\t\t\t\twhichDirection = Direction.NONE;\r\n\t\t\t}\r\n\t\t\telse if(lifted.getCode()== KeyCode.A){\r\n\t\t\t\twhichDirection = Direction.NONE;\r\n\t\t\t}\r\n\t\t\telse if(lifted.getCode()== KeyCode.S){\r\n\t\t\t\twhichDirection = Direction.NONE;\r\n\t\t\t}\r\n\t\t\telse if(lifted.getCode()== KeyCode.D){\r\n\t\t\t\twhichDirection = Direction.NONE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twhichDirection = Direction.NONE;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t});\r\n\r\n\t\tmoneycounter.setStyle(\"-fx-font-size: 40px;\");\r\n\t\tgameStage.setTitle(\"Try Not to Die Simulator\");\r\n\t\tgameStage.setScene(gameScene);\r\n\t\tgameStage.show();\r\n\r\n\t\t//determines speed of player\r\n\t\tAnimationTimer timer = new AnimationTimer() {\r\n\t\t\tprivate long lastMapUpdate = 0;\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void handle(long now) {\r\n\t\t\t\t\t\tif(now - lastMapUpdate >= 28_000_000){\r\n\t\t\t\t\t int x = 0;\r\n\t\t\t\t\t int y = 0;\r\n\t\t\t\t\t if (whichDirection != Direction.NONE) {\r\n\r\n\t\t\t\t\t\t Direction enemyMove = gamemap.getEnemy().getMove(gamemap.getPlayer());\r\n\t\t\t\t\t\t isItValid = gamemap.isEnemyValid(gamemap.getEnemy(), enemyMove);\r\n\t\t\t\t\t\t if (isItValid == 2) {\r\n\t\t\t\t\t\t\t gamemap.moving(enemyMove, false);\r\n\t\t\t\t\t\t\t x = gamemap.getEnemy().getX();\r\n\t\t\t\t\t\t\t y = gamemap.getEnemy().getY();\r\n\t\t\t\t\t\t\t enemy1.relocate(x*46 - 46, y*85 - 85);\r\n\r\n\t\t\t\t\t\t } else if (isItValid == 3) {\r\n\t\t\t\t\t\t\t //setStartConditions();\r\n\t\t\t\t\t\t\t gamemap.stop();\r\n\t\t\t\t\t\t\t gameStage.close();\r\n\t\t\t\t\t\t\t gameOver(deadStage);\r\n\t\t\t\t\t\t\t //System.out.println(\"Awww you got caught, try again next time.\");\r\n\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t int isItValid = gamemap.isPlayerValid(gamemap.getPlayer(), whichDirection);\r\n\t\t\t\t\t\t if (isItValid == 2) {\r\n\t\t\t\t\t\t\t gamemap.moving(whichDirection, true);\r\n\t\t\t\t\t\t\t x = gamemap.getPlayer().getX();\r\n\t\t\t\t\t\t\t y = gamemap.getPlayer().getY();\r\n\t\t\t\t\t\t\t player1.relocate(x*46 - 46, y*85 - 85);\r\n\r\n\r\n\r\n\t\t\t\t\t\t } else if (isItValid == 1) {\r\n\t\t\t\t\t\t\t counter++;\r\n\t\t\t\t\t\t\t moneycounter.setText(\"$: \" + Integer.toString(counter));\r\n\t\t\t\t\t\t\t //System.out.println(\"Congratulations you found a bag of gold!\");\r\n\t\t\t\t\t\t\t if(counter ==10) {\r\n\t\t\t\t\t\t\t gamemap.stop();\r\n\t\t\t\t\t\t\t gameStage.close();\r\n\t\t\t\t\t\t\t actualGame2(gameStage2);\r\n\t\t\t\t\t\t\t isItValid = 10;\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t setStartConditions();\r\n\t\t\t\t\t\t\t isItValid = 0;\r\n\t\t\t\t\t\t } else if(isItValid == 4) {\r\n\t\t\t\t\t\t\t //\t\tportal1.relocate(9*46, 9*85);\r\n\t\t\t\t\t\t\t //\t\tportal2.relocate(9*46, 0*85);\r\n\t\t\t\t\t\t\t\tif (gamemap.getPlayer().getY() != 10) {\r\n\t\t\t\t\t\t\t\t\tgamemap.setPlayerLocation(10, 10);\r\n\t\t\t\t\t\t\t\t\tplayer1.relocate(10*46, 10*85);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tgamemap.setPlayerLocation(10, 1);\r\n\t\t\t\t\t\t\t\t\tplayer1.relocate(10*46, 1*85);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\tgamemap.mapChecker();\r\n\t\t\t\t\t }\r\n\r\n\r\n\t\t\t\t\t lastMapUpdate = now;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t};\r\n\t\t\ttimer.start();\r\n\r\n\t\t}", "public void tick()\n {\n \n move();\n if(redShellOn)\n moveShell();\n timer += .1;\n \n //adjusts the time based on the difficulty level\n if(!pause)\n {\n if(difficult.equals(\"EASY\"))\n {\n if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0) \n {\n timer2 += .045;\n powerupTimer -=.045;\n }\n else\n {\n timer2 += .067;\n if(powerupTimer > 0)\n {\n powerupTimer -= .067;\n }\n }\n }\n else if(modeT)\n {\n if(snakeOnDot() || wideSnakeOnDot())\n {\n tempScore = timer2;\n }\n if(!((lastpowerUp.equals(\"RAINBOW\")||lastpowerUp.equals(\"CRYSTAL\")) && powerupTimer>0))\n timer2 -= .025;\n //add here\n \n //System.out.println(\"Temp score: \" + tempScore + \"\\nTimer2: \" + timer2 + \"\\n\");\n if(tempScore -10 +3 < timer2)\n timer3 +=.025;\n if(lastpowerUp.equals(\"DOUBLE\") && powerupTimer > 0)\n {\n if(tempScore -20 + 6 < timer2)\n timer3 += .025;\n }\n if(powerupTimer > 0)\n {\n powerupTimer -= .025;\n }\n }\n else if(difficult.equals(\"MEDIUM\")||difficult.equals(\"GHOST\")|| difficult.equals(\"TROLL\"))\n {\n timer2 += .045;\n if(powerupTimer > 0)\n {\n powerupTimer -= .045;\n }\n }\n else if(difficult.equals(\"HARD\"))\n {\n timer2 += .03;\n if(powerupTimer > 0)\n {\n powerupTimer -= .03;\n }\n }\n else if(difficult.equals(\"YOU WILL NOT SURVIVE\"))\n {\n timer2 += .01;\n if(powerupTimer > 0)\n {\n powerupTimer -= .01;\n }\n }\n \n \n } \n }", "public static void russianRoulette(Scanner input,Questions thisSession){\n boolean isAlive=true;\n Random rand=new Random();\n int randomNumber,score=0;\n byte numberOfWeaponSlots=6,bullet,weaponFire;\n String userAnswer;\n System.out.println(\"Welcome to russian roulette, the game where you need to see how long can you survive.\"+\n \"\\nA random question from the ones you created will be shown on screen.\\nYou need to write your answer.\\n\"+\n \"If your answer is wrong, the gun will fire, and if the bullet comes out, you will lose.\\nLet's Begin!\");\n \n randomNumber=rand.nextInt(thisSession.getLength()); \n do{\n System.out.println(thisSession.getQuestion(randomNumber));\n userAnswer=input.nextLine();\n userAnswer=userAnswer.toLowerCase();\n if (userAnswer.equals(thisSession.getAnswer(randomNumber))){\n randomNumber=rand.nextInt(thisSession.getLength());\n System.out.println(\"That's the answer!\");\n numberOfWeaponSlots=6;\n score++;\n }else{\n System.out.println(\"Wrong answer.\");\n bullet=(byte) rand.nextInt(numberOfWeaponSlots);\n weaponFire=(byte) rand.nextInt(numberOfWeaponSlots);\n if (bullet==weaponFire){\n gunFiresBullet();\n System.out.println(\"Game over\");\n isAlive=false;\n }else{\n gunFiresNoBullet();\n numberOfWeaponSlots--;\n System.out.println(\"Try again\");\n }\n\n }\n\n }while (isAlive);\n System.out.println(\"Final score: \" + score+\"\\nThanks for playing! Returning to main menu...\");\n }", "private GameResponse playNextRound() {\n if(gameResponse.getPoint() == 0) {\n gameResponse.setMessage(null);\n roll();\n gameResponse.setPoint(currentRoll);\n if (WINS.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (LOSES.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n } else {\n roll();\n if (currentRoll == gameResponse.getPoint()) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (currentRoll == 7) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n }\n return gameResponse;\n }", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "@Override\n\tpublic void initGame() {\n\t\t\n\t\t//width = 480f;\n\t\t//height = 1000f;\n\t\t//scale = 100f;\n\t\t\n\t\tioManager.debugPrint();\n\t\t\n\t\t\n\t\t\n\t\treset();\n\t\t\n\t\t//scale = 1f;\n\t\t//width /= 100f;\n\t\t//height /= 100f;\n\t}", "void gameStarted();", "void gameStarted();", "public void startGame(){\n\tp1= new Player();\r\n\tp2= new Player();\r\n\tp3= new Player();\r\n\r\nint guessp1=0, guessp2=0, guessp3=0;\r\nboolean p1isRight = false, p2isRight=false, p3isRight = false;\r\n\r\nint targetNumber = (int) (Math.random() * 10);\r\n\r\nSystem.out.println(\"I'm thinking of a number between 0 and 9...\");\r\n\r\nwhile(true){\r\n\tSystem.out.println(\"Number to guess is \" +targetNumber);\r\n\tp1.guess();\r\n\tp2.guess();\r\n\tp3.guess();\r\n\tguessp1 = p1.number;\r\n\tguessp2 = p2.number;\r\n\tguessp3 = p3.number;\r\n\r\n\tif(guessp1 == targetNumber){\r\n\t\tp1isRight=true;\r\n\t}if(guessp2 == targetNumber){\r\n\t\tp2isRight=true;\r\n\t}if(guessp3 == targetNumber){\r\n\t\tp3isRight=true;\r\n\t}\r\n\r\n\tif(p1isRight||p2isRight||p3isRight){\r\n\t\tSystem.out.println(\"We have a Winner!\");\r\n\t\tSystem.out.println(\"Player one got it right? \" +p1isRight);\r\n\t\tSystem.out.println(\"Player two got it right? \" +p2isRight);\r\n\t\tSystem.out.println(\"Player three got it right? \" +p3isRight);\r\n\r\n\t\tbreak;\r\n\t}else{\r\n\t\tSystem.out.println(\"Players will have to try again.\");\r\n\t}\r\n}\r\n}", "public void newGame();", "public void newGame();", "public void newGame();" ]
[ "0.6911623", "0.64788306", "0.64481413", "0.64343077", "0.63963264", "0.63566846", "0.6345897", "0.6325966", "0.630159", "0.62847", "0.6265691", "0.6265635", "0.6256206", "0.62481856", "0.62009203", "0.6194583", "0.6189579", "0.61378783", "0.61319673", "0.6129257", "0.6120216", "0.61057866", "0.60935074", "0.6079714", "0.6069601", "0.6068625", "0.6052262", "0.60501176", "0.60392493", "0.6037757", "0.60346407", "0.60288674", "0.60285115", "0.60257006", "0.60240203", "0.6023046", "0.6012259", "0.60112774", "0.6006382", "0.60015917", "0.6001582", "0.59720796", "0.5969104", "0.5968596", "0.5959696", "0.5955289", "0.5932012", "0.5932012", "0.59281844", "0.5924964", "0.59145075", "0.59047514", "0.5904177", "0.59024656", "0.59007365", "0.58939606", "0.5892942", "0.58892095", "0.58857894", "0.5885312", "0.5885312", "0.5885312", "0.58829015", "0.5877654", "0.587578", "0.5875709", "0.5864444", "0.58636147", "0.5858284", "0.5855737", "0.5852455", "0.58497095", "0.5847548", "0.5847372", "0.58433473", "0.5842766", "0.5838067", "0.58377266", "0.5830985", "0.58258885", "0.58248645", "0.5819724", "0.5819343", "0.5819201", "0.5815985", "0.58121747", "0.5806667", "0.5805332", "0.5799376", "0.57990515", "0.5797368", "0.57853097", "0.5783535", "0.5777558", "0.5776748", "0.5776748", "0.5771564", "0.576778", "0.576778", "0.576778" ]
0.5890599
57
desconectar tudo conectar ao wifi selecionado quando a conexao estiver ok entao faz o upload da imagem p firebase quando o upload estiver ok entao salva no banco de dados firebase :)
public void onCadastro(View v){ if(this.mAnuncio!= null){ this.mAnuncio.getAp().setPreSharedKey(this.senha_wifi.getText().toString()); this.mAnuncio.setName(this.nome.getText().toString()); this.mAnuncio.setDescription("criado em "+new Date().getTime() +"@beltrao"); this.presenter.tryToConnectWifi(this.mAnuncio.getAp(), this); }else{ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void uploadFile() {\n //checking if file is available\n if (filePath != null) {\n //displaying progress dialog while image is uploading\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.show();\n\n //getting the storage reference\n StorageReference sRef = storageReference.child(\"admins/\" + System.currentTimeMillis() + \".\" + getFileExtension(filePath));\n\n //adding the file to reference\n sRef.putFile(filePath).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //dismissing the progress dialog\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n //displaying the upload progress\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\n }\n });\n } else {\n Toast.makeText(RegisterAsAdmin.this, \"File Error\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n\n //Obtiene la URI de la imagen\n Uri uri = data.getData();\n\n //Declara un InputStream\n InputStream inputStream = null;\n try {\n //Inicializa el InputStream utilizando como fuente de datos la URI de la imagen\n inputStream = getContentResolver().openInputStream(uri);\n\n //Obtiene una referencia al almacen de Firebase\n StorageReference storageReference = FirebaseStorage.getInstance().getReference();\n //Situa la referencia en la ruta donde se almacena la imagen de perfil del usuario\n storageReference = storageReference.child(\"usuarios\").child(usuario.getId()).child(\"perfil.png\");\n //Crea un objeto UploadTask, utilizado para subir la imagen al almacen de Firebase\n UploadTask uploadTask;\n //Inicializa el UploadTask haciendo una llamada al metodo putStream del objeto StorageReference\n //y pasandole por parametro el InputStream\n uploadTask = storageReference.putStream(inputStream);\n //Añade escuchadores al UploadTask que recibiran los eventos de operacion exitosa u operacion\n //fallida\n uploadTask.addOnFailureListener(new OnFailureListener() {\n /**\n * onFailure: se ejecuta si la operacion fallo\n * @param e\n */\n @Override\n public void onFailure(@NonNull Exception e) {\n //Muestra un Snackbar informando al usuaario del error\n Snackbar.make(ivFotoPerfil,\"Error al subir la imagen al servidor: \"\n + e.getMessage(),\n Snackbar.LENGTH_LONG).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n /**\n * onSuccess: se ejecuta si la operacion se realizo exitosamente\n * @param taskSnapshot\n */\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n //Etiqueta para evitar que el IDE se queje de que el metodo getDownloadUrl\n //solo deberia ser visible por tests o en un ambito private\n @SuppressWarnings(\"VisibleForTests\")\n //Obtiene del TaskSnapShot la URI de la imagen\n Uri uri = taskSnapshot.getDownloadUrl();\n //Establece la URL de la imagen de usuario en el objeto Usuario con la nueva URL\n usuario.setImagenUrl(uri.toString());\n\n //Obtiene una referencia a la base de datos\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\n //Almacena en la base de datos el objeto Usuario actualizado\n databaseReference.child(\"usuarios\").child(usuario.getId()).setValue(usuario);\n\n //Carga la nueva imagen en el ImageView\n Glide.with(getApplicationContext())\n .load(uri)\n .apply(new RequestOptions().placeholder(R.drawable.iconouser).centerCrop())\n .into(ivFotoPerfil);\n }\n });\n } catch (FileNotFoundException e) {\n //Si no se encontro la imagen, se muestra un Snackbar informando del error al usuario\n //y termina la ejecucion del metodo mediante return\n Snackbar.make(ivFotoPerfil,\"No se ha podido cargar la imagen: \"\n + e.getMessage(),\n Snackbar.LENGTH_LONG).show();\n\n }\n\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if(resultCode == RESULT_OK){\n Bitmap imagem = null;\n try {\n switch (requestCode){\n case SELECAO_GALERIA:\n Uri localImage = data.getData();\n imagem = MediaStore.Images.Media.getBitmap(getContentResolver(), localImage);\n break;\n }\n if(imagem != null){\n //configuração da imagem em Bitmap\n imageView.setImageBitmap(imagem);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n imagem.compress(Bitmap.CompressFormat.JPEG, 70, baos);\n byte[] dadosImagem = baos.toByteArray();\n\n //referência para pasta no Storage\n final StorageReference imagemRef = storageReference\n .child(\"imagens\")\n .child(\"servicos\")\n .child(idUserLogado)\n .child(imagem + \"jpeg\");\n\n //upload dos bytes da imagem\n UploadTask uploadTask = imagemRef.putBytes(dadosImagem);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(NovoProdutoEmpresaActivity.this,\n \"Erro ao fazer o upload da imagem\", Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(NovoProdutoEmpresaActivity.this,\n \"Sucesso ao fazer o upload da imagem\", Toast.LENGTH_SHORT).show();\n }\n });\n\n //recupera o link de download da imagem\n Task<Uri> urlTask = uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()){\n throw task.getException();\n }\n return imagemRef.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n Uri downloadUri = task.getResult();\n\n //salva a url na string\n urlImagemSelecionada = downloadUri.toString();\n }\n }\n });\n\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }", "private void uploadFile(Uri selectedImageUri) {\n String imageName = UUID.randomUUID().toString();\n StorageReference mStorageRefrence = mStorage.getReference().child(\"driver_images\");\n final StorageReference storageReference = mStorageRefrence.child(imageName);\n storageReference.putFile(selectedImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n dialog.dismiss();\n storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Glide.with(view).load(uri).apply(new RequestOptions().override(150, 150)).into(driverImage);\n\n if (FirebaseAuth.getInstance().getCurrentUser() != null) {\n Map map = new HashMap();\n map.put(\"photo\", uri.toString());\n FirebaseDatabase.getInstance().getReference(Common.user_driver_tbl).child(mAuth.getCurrentUser().getUid()).updateChildren(map, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError databaseError, @NonNull DatabaseReference databaseReference) {\n if (databaseError == null) {\n dialog.dismiss();\n Toast.makeText(DriverHome.this, \" information updated successfully!\", Toast.LENGTH_SHORT).show();\n\n } else {\n dialog.dismiss();\n Toast.makeText(DriverHome.this, \" uploading fialed !\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n }\n });\n }\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n dialog.setMessage(\"uploading \" + (int) progress + \"%\");\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n\n @Override\n public void onFailure(@NonNull Exception e) {\n\n Toast.makeText(DriverHome.this, \"Error \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n /* .continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n\n // Continue with the task to get the download URL\n return storageReference.getDownloadUrl();\n }\n })*/\n\n }", "private void uploadImage(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Uploading...\",\"Please wait...\",false,false);\n StringRequest stringRequest = new StringRequest(Request.Method.POST, \"http://192.168.0.52/temps/salvar_img/setAvaliacao.php\",\n new Response.Listener<String>() {\n @Override\n public void onResponse(String s) {\n //Disimissing the progress dialog\n loading.dismiss();\n //Showing toast message of the response\n Toast.makeText(MainActivity.this, s , Toast.LENGTH_LONG).show();\n }\n\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n //Dismissing the progress dialog\n loading.dismiss();\n\n //Showing toast\n Toast.makeText(MainActivity.this, volleyError.getMessage().toString(), Toast.LENGTH_LONG).show();\n }\n }){\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n //Converting Bitmap to String\n String image = getStringImage(bmpChange);\n\n\n //Creating parameters\n Map<String,String> params = new Hashtable<String, String>();\n\n //Adding parameters\n params.put(\"image\", image);\n\n //returning parameters\n return params;\n }\n };\n\n //Creating a Request Queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n //Adding request to the queue\n requestQueue.add(stringRequest);\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"registro Exitoso\", Toast.LENGTH_SHORT).show();\n usuario.setUid(auth.getCurrentUser().getUid());\n\n String key = auth.getCurrentUser().getUid();\n\n final DatabaseReference reference = db.getReference().child(\"usuarios\").child(usuario.getUid());\n\n reference.setValue(usuario);\n\n if (path != null) {\n try {\n final StorageReference ref = firebaseStorage.getReference().child(\"Proyectos\").child(key).child(\"fotoPerfil.jpg\");\n FileInputStream file = new FileInputStream(new File(path));\n //Sube la foto\n ref.putStream(file).addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {\n if (task.isSuccessful()) {\n\n reference.child(\"urlImagen\");\n\n reference.setValue(ref.getDownloadUrl().toString());\n Toast.makeText(MainActivity.this, \"Registro realizado correctamente\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } catch (FileNotFoundException ex) {\n\n }\n }\n\n\n //aqui me voy para la otra actividad\n\n\n reference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n\n String valor3 = (String) dataSnapshot.child(\"tipo\").getValue();\n\n if(valor3.equals(Usuario.EMPRENDEDOR)){\n Intent i = new Intent(MainActivity.this,Background.class);\n startActivity(i);\n finish();\n }\n else{\n Intent i = new Intent(MainActivity.this,Background_Inversor.class);\n startActivity(i);\n finish();\n }\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n }", "private void uploadBitmap(final Bitmap bitmap, final String idKop, final String id_bidangusaha, final String alamat, final String status, final String omzet, final String Loc, final String simpananpokok, final String jmlsimpananpokok, final String simpananwajib, final String jmlsimpananwajib, final String shutahunan, final String user) {\n pDialog.setMessage(\"Loading ...\");\n showDialog();\n VolleyMultipartRequest volleyMultipartRequest = new VolleyMultipartRequest(Request.Method.POST, AppConfig.URL_INPUT_KEUANGAN,\n new Response.Listener<NetworkResponse>() {\n @Override\n public void onResponse(NetworkResponse response) {\n hideDialog();\n\n Intent intent = new Intent(Form1Kelurahan4.this,\n SlidePageF1.class);\n startActivity(intent);\n finish();\n\n Toast.makeText(getApplicationContext(), \"Succes Insert\", Toast.LENGTH_SHORT).show();\n\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"Data Error: \" + error.getMessage());\n //cek error timeout, noconnection dan network error\n if ( error instanceof TimeoutError || error instanceof NoConnectionError ||error instanceof NetworkError) {\n Toast.makeText(getApplicationContext(),\n \"Please Check Your Connection\",\n Toast.LENGTH_SHORT).show();}\n hideDialog();\n }\n }) {\n\n\n\n /*\n * If you want to add more parameters with the image\n * you can do it here\n * here we have only one parameter with the image\n * which is tags\n * */\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"id_koperasi\", idKop);\n params.put(\"bidang_usaha\", id_bidangusaha);\n params.put(\"alamat_usaha\", alamat);\n params.put(\"status_usaha\", status);\n params.put(\"omzet\", omzet);\n params.put(\"location\", Loc);\n params.put(\"simp_pokok\", simpananpokok);\n params.put(\"jml_simp_pokok\", jmlsimpananpokok);\n params.put(\"simp_wajib\", simpananwajib);\n params.put(\"jml_simp_wajib\", jmlsimpananwajib);\n params.put(\"shu_tahunan\", shutahunan);\n params.put(\"user_id\", user);\n return params;\n }\n\n /*\n * Here we are passing image by renaming it with a unique name\n * */\n @Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }\n };\n\n //adding the request to volley\n Volley.newRequestQueue(this).add(volleyMultipartRequest);\n }", "private void uploadFile() {\n //if there is a file to upload\n if (filePath != null) {\n\n\n final StorageReference storageReference2nd = storageReference.child(System.currentTimeMillis() + \".\" + GetFileExtension(filePath));\n storageReference2nd.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n /* storageReference2nd.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n final String ImageUrl = uri.toString();\n\n }\n });*/\n\n // Getting Description, Price, Address, Mobile from EditText and store into string variable.\n String TempDescription = Description.getText().toString().trim();\n String TempPrice = Price.getText().toString().trim();\n String TempAddress = Address.getText().toString().trim();\n String TempPhone = Phone.getText().toString().trim();\n String TempImageUrl = ImageUrl;\n\n\n\n\n\n //if the upload is successfull\n\n //and displaying a success toast\n Toast.makeText(postadv.this, \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n\n @SuppressWarnings(\"VisibleForTests\")\n ImageUploadInfo imageUploadInfo = new ImageUploadInfo(TempDescription, TempPrice, TempAddress, TempPhone, storageReference2nd.getDownloadUrl().toString());\n\n // Getting image upload ID.\n String ImageUploadId = databaseReference.push().getKey();\n\n // Adding image upload id s child element into databaseReference.\n databaseReference.child(ImageUploadId).setValue(imageUploadInfo);\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n //if the upload is not successfull\n //hiding the progress dialog\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }\n //if there is not any file\n else {\n Toast.makeText(postadv.this, \"Failed\", Toast.LENGTH_SHORT).show();\n }\n }", "private void uploadPhoto() {\n // Get the data from an ImageView as bytes\n ImageView imageView = (ImageView)findViewById(R.id.imgView);\n imageView.setDrawingCacheEnabled(true);\n imageView.buildDrawingCache();\n Bitmap bitmap = imageView.getDrawingCache();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n FirebaseStorage storage = FirebaseStorage.getInstance();\n\n // Create a storage reference from our app\n StorageReference storageRef = storage.getReferenceFromUrl(Config.FIREBASE_STORAGE_URL);\n\n // Create a reference to 'images/profile/userNodeId.jpg'\n StorageReference mountainImagesRef = storageRef.child(\"images/profile/\"+currentUser.getFireUserNodeId()+\".jpg\"); // set image name as userid.jpg which is unique\n\n UploadTask uploadTask = mountainImagesRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(Exception exception) {\n // Handle unsuccessful uploads\n Toast.makeText(getApplicationContext(),\"Photo upload failed!\",Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // taskSnapshot.getMetadata() contains file metadata such as size, content-type, and download URL.\n Toast.makeText(getApplicationContext(),\"Photo uploaded successfully!\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }", "private void uploadFile() {\n // make sure image was selected\n if (mImageUri != null) {\n // set up image file path for firebase storage\n StorageReference fileReference = mStorageRef.child(System.currentTimeMillis()\n + \".\" + getFileExtension(mImageUri));\n\n // create file metadata including the content type\n StorageMetadata metadata = new StorageMetadata.Builder()\n .setContentType(\"image/jpg\")\n .build();\n \n\n // upload the file and metadata\n mUploadTask = fileReference.putFile(mImageUri, metadata)\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n // show progress bar during upload\n double progress = (100.0 * taskSnapshot.getBytesTransferred() / taskSnapshot.getTotalByteCount());\n mProgressBar.setProgress((int) progress);\n }\n });\n // Get download url of the uploaded image\n Task<Uri> urlTask = mUploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n // get the download URL\n return fileReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n // get download uri\n Uri downloadUri = task.getResult();\n imageUrl = downloadUri.toString();\n String imageDescription = mEditTextFileName.getText().toString().trim();\n // build hashmap to hold object of Upload class\n final Map uploadBody = new HashMap();\n uploadBody.put(\"name\", imageDescription);\n uploadBody.put(\"imageUrl\", imageUrl);\n // get key of the realtime database\n String uploadId = mDatabaseRef.push().getKey();\n // update the realtime database\n mDatabaseRef.child(uploadId).setValue(uploadBody);\n } else {\n // Handle failures\n Toast.makeText(getActivity(), \"Error getting image Url\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n Toast.makeText(getActivity(), \"Upload succesful\", Toast.LENGTH_SHORT).show();\n\n }else {\n Toast.makeText(getActivity(), \"No file selected\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(),\"Imagens não serão baixadas.\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void run() {\n\n // execute query and get result\n try {\n // create query\n PreparedStatement preparedStatement = connectionMSSQL.prepareStatement(\"INSERT INTO dbo.androidTest(dateTime, description, picture, miniature, userName) VALUES (?, ?, ?, ?, ?)\");\n preparedStatement.setString(1, dateTime);\n preparedStatement.setString(2, description);\n preparedStatement.setBytes(3, bArray);\n preparedStatement.setBytes(4, bArrayResized);\n preparedStatement.setString(5, userName);\n\n resultInt = preparedStatement.executeUpdate(); // result is OK if 1\n //boolean resultInt = preparedStatement.execute(); // result is OK if true - don't work\n preparedStatement.close(); // close\n } catch (SQLException e) {\n error = e.toString();\n Log.d(TAG, \"onCreate: SQLException: \" + error);\n }\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() { //in UI thread\n\n if (resultInt == 0) { // resultInt = 0 - ERROR\n showAlertDialog(\"Nie wysłano wiadomości \\n\\nError: \" + error);\n\n // change color of background for time\n changeBackgroudColorForTimeInSec(1);\n\n } else { // resultInt = 1 - SUCCES\n Toast.makeText(ActivityScreans.this, \"Wiadomość wysłana.\", Toast.LENGTH_SHORT).show();\n\n // clear views\n editTextDescription.setText(\"\");\n imageViewOfPhotoFromCamera.setImageResource(R.drawable.question_mark);\n imageBitmap = null;\n }\n\n // hide progress bar and show button Sent\n buttonSendPhotoToMSSQL.setVisibility(View.VISIBLE);\n progressBarInDefectWait.setVisibility(View.GONE);\n\n }\n });\n }", "public void sendToFirebase() {\n\n String imageCategory = imageSpinner.getSelectedItem().toString();\n final Intent intent = new Intent(MainActivity.this, ResultActivity.class);\n\n if(filepath!=null) {\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading Data...\");\n progressDialog.setMessage(\"In-Progress...\");\n progressDialog.show();\n\n final StorageReference sRef = storageReference.child(\"images/\"+ UUID.randomUUID().toString());\n\n if(imageCategory.equals(\"Medical CBC Report\")) {\n sRef.putFile(filepath).continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()){\n throw task.getException();\n }\n return sRef.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()){\n Uri downUri = task.getResult();\n progressDialog.dismiss();\n neuralData+=\"imageTag:cbc#\"+\"imageUrl:\"+downUri+\"#\";\n databaseReference.child(\"joel\").setValue(neuralData);\n startActivity(intent);\n }\n }\n });\n } else if(imageCategory.equals(\"Chest X-Ray\")){\n sRef.putFile(filepath).continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()){\n throw task.getException();\n }\n return sRef.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()){\n Uri downUri = task.getResult();\n progressDialog.dismiss();\n neuralData+=\"imageTag:xray#\"+\"imageUrl:\"+downUri+\"#\";\n databaseReference.child(\"joel\").setValue(neuralData);\n startActivity(intent);\n }\n }\n });\n } else if(imageCategory.equals(\"Breast Histopathology\")) {\n sRef.putFile(filepath).continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()){\n throw task.getException();\n }\n return sRef.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()){\n Uri downUri = task.getResult();\n progressDialog.dismiss();\n neuralData+=\"imageTag:breast#\"+\"imageUrl:\"+downUri+\"#\";\n databaseReference.child(\"joel\").setValue(neuralData);\n startActivity(intent);\n }\n }\n });\n }\n\n }\n\n if(!neuralData.isEmpty()) {\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading Data...\");\n progressDialog.setMessage(\"In-Progress...\");\n progressDialog.show();\n databaseReference.child(\"joel\").setValue(neuralData).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n progressDialog.dismiss();\n startActivity(intent);\n }\n });\n\n }\n\n if(neuralData.isEmpty()&&filepath==null) {\n Toast.makeText(this,\"You need to input something!\", Toast.LENGTH_LONG).show();\n }\n }", "public void uploadMultipart(String path, final String name) {\n //getting name for the image\n // String name = editText.getText().toString().trim();\n\n //getting the actual path of the image\n // String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, UPLOAD_URL)\n .addFileToUpload(path, \"image\") //Adding file\n .addParameter(\"name\", name) //Adding text parameter to the request\n .addParameter(\"alert\", mAlertId) //Adding text parameter to the request\n .addParameter(\"device\",\n android.os.Build.MODEL) //Adding text parameter to the request\n .addParameter(\"title\", currentCaptureDirectory.getName())\n .setNotificationConfig(new UploadNotificationConfig()).setMaxRetries(2)\n .setDelegate(new UploadStatusDelegate() {\n @Override\n public void onProgress(Context context, UploadInfo uploadInfo) {\n // your code here\n }\n\n @Override\n public void onError(Context context, UploadInfo uploadInfo,\n Exception exception) {\n // your code here\n }\n\n @Override\n public void onCompleted(Context context, UploadInfo uploadInfo,\n ServerResponse serverResponse) {\n Log.i(\" _ \", \" \");\n Log.d(TAG, \"JSON RESPONSE::: \" + serverResponse.toString());\n Log.d(TAG, \"JSON RESPONSE::: \" + serverResponse.getBodyAsString());\n Log.i(\" _ \", \" \");\n\n File photo = new File(currentCaptureDirectory, name);\n if (photo.exists()) photo.delete();\n\n if (mSendEmail) {\n mSendEmail = false;\n mEmailResetHandler.removeCallbacks(emailResetRunnable);\n mEmailResetHandler.postDelayed(emailResetRunnable, 1000 * 600);\n String link = mServerUrl + \"sendEmail.php?device=\" + mDeviceName +\n \"&name=\" + name + \"&title=\" +\n currentCaptureDirectory.getName();\n new updateData().execute(link);\n\n String link2 = mServerUrl + \"init.php?device=\" + mDeviceName;\n new updateData().execute(link2);\n\n mHandler.postDelayed(runnable, 6000);\n }\n\n // your code here\n // if you have mapped your server response to a POJO, you can easily get it:\n // YourClass obj = new Gson().fromJson(serverResponse.getBodyAsString(), YourClass.class);\n // File photo = new File(Environment.getExternalStorageDirectory(), name + \".jpg\");\n // if (photo.exists()) photo.delete();\n }\n\n @Override\n public void onCancelled(Context context, UploadInfo uploadInfo) {\n // your code here\n }\n }).startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Log.i(TAG, exc.getMessage());\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n //Etiqueta para evitar que el IDE se queje de que el metodo getDownloadUrl\n //solo deberia ser visible por tests o en un ambito private\n @SuppressWarnings(\"VisibleForTests\")\n //Obtiene del TaskSnapShot la URI de la imagen\n Uri uri = taskSnapshot.getDownloadUrl();\n //Establece la URL de la imagen de usuario en el objeto Usuario con la nueva URL\n usuario.setImagenUrl(uri.toString());\n\n //Obtiene una referencia a la base de datos\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\n //Almacena en la base de datos el objeto Usuario actualizado\n databaseReference.child(\"usuarios\").child(usuario.getId()).setValue(usuario);\n\n //Carga la nueva imagen en el ImageView\n Glide.with(getApplicationContext())\n .load(uri)\n .apply(new RequestOptions().placeholder(R.drawable.iconouser).centerCrop())\n .into(ivFotoPerfil);\n }", "private void uploadImage(final Bitmap bitmap) {\n if(bitmap!=null) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView responseText = findViewById(R.id.responseText);\n responseText.setText(\"Loading diagnosis...\");\n }\n });\n }\n\n VolleyMultipartRequest volleyMultipartRequest = new VolleyMultipartRequest(Request.Method.POST, URL,\n new Response.Listener<NetworkResponse>() {\n @Override\n public void onResponse(final NetworkResponse response) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n try {\n String json = new String(response.data, HttpHeaderParser.parseCharset(response.headers));\n TextView responseText = findViewById(R.id.responseText);\n responseText.setText(json);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n e.getMessage();\n }\n }\n });\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"GotError\",\"\"+error.getMessage());\n }\n }) {\n\n\n @Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"image\", new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }\n };\n\n volleyMultipartRequest.setRetryPolicy(new DefaultRetryPolicy(0, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n //adding the request to volley\n Volley.newRequestQueue(this).add(volleyMultipartRequest);\n }", "@Override\n public void onSuccess(byte[] bytes) {\n storageRef.child(\"profilepics/\" + authUser.getUid()+ \".jpg\")\n .putBytes(bytes)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"control\", \"foto subida\");\n }\n });\n }", "private void loadActuality(){\n\n Log.i(\"TAG0\", \"TAG0\");\n if (mPaths.size() > 0){\n Log.i(\"TAG1\", \"TAG1\");\n try {\n File file = new File(mPaths.get(0));\n Bitmap bitmap = new Compressor(this)\n .setMaxWidth(320)\n .setMaxHeight(180)\n .setQuality(90)\n .compressToBitmap(file);\n\n Log.i(\"TAG11\", \"TAG11\");\n final String path = getPathFile();\n StorageReference storageReference = FireBaseUtil.mStorageRef.child(path);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask = storageReference.putBytes(data);\n\n uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.i(\"TAG2\", \"TAG2\");\n url = taskSnapshot.getDownloadUrl().toString();\n\n saveFakenews(url, taskSnapshot.getMetadata().getCreationTimeMillis());\n Log.i(\"TAG3\", \"TAG3\");\n uploading.stop();\n Log.i(\"TAG4\", \"TAG4\");\n }\n });\n }catch (IOException ex){\n Log.e(\"TAG\", ex.getMessage());\n }\n }else {\n Toast.makeText(this,\"Veuillez sélectionner une image\", Toast.LENGTH_SHORT).show();\n }\n }", "private void saveImageToLocalStore(Bitmap finalBitmap) {\n Calendar cal = Calendar.getInstance();\n //--------------\n File direct = new File(Environment.getExternalStorageDirectory() + \"/NDS images\");\n\n if (!direct.exists()) {\n direct = new File(\"/NDS images\");\n direct.mkdirs();\n }\n final String filename = \"NDS_img_\" + cal.getTimeInMillis() + \".png\";\n\n File file = new File(Environment.getExternalStorageDirectory() + File.separator\n + \"/NDS images/\", filename);\n if (file.exists()) {\n file.delete();\n\n }\n //--\n\n // File file = new File(directory+\"/Boo_images/\", filename);\n if (file.exists()) file.delete();\n try {\n FileOutputStream out = new FileOutputStream(file);\n finalBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);\n out.flush();\n out.close();\n //---\n String path_0 = Environment.getExternalStorageDirectory() + File.separator\n + \"/NDS images/\" + filename;\n String filename_to_up = path_0.substring(path_0.lastIndexOf(\"/\") + 1);\n if (!editText.getText().toString().isEmpty()) {\n //addCaptionToSuggestionMedia(path_0, filename_to_up, \"image\", MYRemoteId, (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString());\n //addCaptionToSuggestionMedia(path_0, filename_to_up, \"audio\", MYRemoteId, (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString());\n path_000 = path_0;\n filename_000 = filename_to_up;\n myRemoteId_000 = MYRemoteId;\n SuggestionBoxId_000 = (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString();\n //-000000000000000000000000-----Image to send-----------------------------------------\n mediaType_000 = \"image\";\n image_tag.setTag(filename_to_up);\n image_tag.setVisibility(View.VISIBLE);\n video_tag.setVisibility(View.GONE);\n audio_tag.setVisibility(View.GONE);\n textSuggestion.setVisibility(View.GONE);\n File imgFile = new File(path_0);\n if (imgFile.exists()) {\n try {\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 2;\n Bitmap bm = BitmapFactory.decodeFile(path_0, options);\n //Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n // Log.w(\"myPath\", path);\n //--Adjust imagte before final display haha!---------\n\n\n //---\n Bitmap srcBmp = bm;\n Bitmap dstBmp = null;\n //---Cropping for small display--\n try {\n if (srcBmp.getWidth() >= srcBmp.getHeight()) {\n try {\n dstBmp = Bitmap.createBitmap(srcBmp, srcBmp.getWidth() - srcBmp.getHeight(), 0, srcBmp.getHeight(), srcBmp.getHeight());\n //Log.w(\"cropped yes\",\"good\");\n } catch (RuntimeException shhh) {\n\n }\n } else {\n try {\n dstBmp = Bitmap.createBitmap(srcBmp, 0, srcBmp.getHeight() - srcBmp.getWidth(), srcBmp.getWidth(), srcBmp.getWidth());\n //Log.w(\"cropped yes\",\"good\");\n } catch (RuntimeException shhh) {\n\n }\n }\n\n\n //-----------------\n Drawable d = new BitmapDrawable(getResources(), dstBmp);\n edixt_image.setImageDrawable(d);\n\n // edixt_image.setImageBitmap(dstBmp);\n edixt_image.setTag(path_0);\n } catch (RuntimeException shhh) {\n\n }\n\n\n } catch (Exception vb) {\n\n }\n\n //-------------\n\n\n //----------------\n }\n\n //---------0000000000000000000000000000000000000000000000000000000000000000000000000000000000\n } else {\n Toast.makeText(Suggestion_box_suggest.this, \"Choose or type in receipient\", Toast.LENGTH_SHORT).show();\n }\n galleryAddPic();\n deleteLatestPicture();\n //-------------------------------------------\n } catch (Exception e) {\n e.printStackTrace();\n\n\n Log.w(\"DirImage\", \"failed!\" + e.toString());\n Toast.makeText(Suggestion_box_suggest.this, \"Image not saved! Not enough space!\" + e.toString(), Toast.LENGTH_SHORT).show();\n }\n }", "private void uploadData() {\n if (imageUri != null) {\n final StorageReference fileReference = firebaseStorage.child(\"imageUploads\")\n .child(System.currentTimeMillis() + \".\" + getFileExtension(imageUri));\n\n uploadTask = fileReference.putFile(imageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n progressBar.setProgress(0);\n\n }\n //delay upload\n }, 500);\n\n //upload success\n //progressDialog.dismiss();\n Task<Uri> downloadUrl = fileReference.getDownloadUrl();\n downloadUrl.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n imageReference = uri.toString();\n String uploadId = firebaseDatabase.push().getKey();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.yyyy 'at' HH:mm z\");\n\n Toast.makeText(SellActivity.this, \"Posting Successful\", Toast.LENGTH_LONG).show();\n ImageUpload upload =\n new ImageUpload(editTextTitle.getText().toString().trim(),\n editTextDesc.getText().toString().trim(),\n imageReference,\n category.trim(),\n price,\n uploadId,\n user.getUid(),\n sdf.format(new Date()));\n\n firebaseDatabase.child(\"category\").child(category).child(uploadId).setValue(upload);\n\n\n //store user's listing history\n firebaseDatabase.child(\"users\").child(user.getUid()).child(\"Sell History\").child(uploadId).setValue(upload);\n firebaseDatabase.child(\"users\").child(user.getUid()).child(\"Sell Current\").child(uploadId).setValue(upload);\n\n endTask();\n\n }\n });\n }\n\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n //upload fail\n //progressDialog.dismiss();\n Toast.makeText(SellActivity.this, \"Posting Unsuccessful\", Toast.LENGTH_SHORT).show();\n\n }\n\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(@NonNull UploadTask.TaskSnapshot taskSnapshot) {\n\n //show progress while image is uploaded\n double progress = (100.0 * taskSnapshot.getBytesTransferred() / taskSnapshot.getTotalByteCount());\n if (progress < 20) {\n progress = 20;\n }\n progressBar.setProgress((int) progress);\n\n }\n });\n\n } else {\n Toast.makeText(this, \"No file selected\", Toast.LENGTH_SHORT).show();\n }\n }", "public void uploadPic() {\n try {\n if (bitmap == null) {\n Toast.makeText(AddPage.this, \"Please Select Image\", Toast.LENGTH_SHORT).show();\n\n } else {\n if (bitmap != null) {\n\n final DatabaseReference newref = FirebaseDatabase.getInstance().getReference(\"Page\").push();\n FirebaseStorage storage = FirebaseStorage.getInstance();\n\n StorageReference storageRef = storage.getReferenceFromUrl(\"gs://questo-1f35e.appspot.com\");\n // Create a reference to 'images/mountains.jpg'\n StorageReference mountainImagesRef = storageRef.child(\"PageImages\").child(newref.getKey() + \"\");\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n UploadTask uploadTask = mountainImagesRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n }\n\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // taskSnapshot.getMetadata() contains file metadata such as size, content-type, and download URL.\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n\n if (downloadUrl != null) {\n // article = new Article(newref.getKey(), date.getTime(), title.getText().toString(), input.getText().toString(), MyData.getMyUser().id, MyData.getMyUser().name, downloadUrl.toString());\n if (dialog != null && dialog.isShowing())\n dialog.dismiss();\n\n upload(downloadUrl.toString());\n\n\n\n\n final String s = name;\n if (s.trim().length() != 0) {\n\n if(MainActivity.rootLayout!=null)\n Snackbar.make(MainActivity.rootLayout, \"Successfully created page \" + s, Snackbar.LENGTH_LONG)\n .setAction(\"Show\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n Intent intent = new Intent(AddPage.this, PageOpenActivity.class);\n intent.putExtra(\"id\", s);\n startActivity(intent);\n\n }\n }).show();\n\n\n\n if(PageActivity.rootlayout!=null)\n Snackbar.make(PageActivity.rootlayout, \"Successfully created page \" + s, Snackbar.LENGTH_LONG)\n .setAction(\"Show\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n Intent intent = new Intent(AddPage.this, PageOpenActivity.class);\n intent.putExtra(\"id\", s);\n startActivity(intent);\n\n }\n }).show();\n\n\n\n\n\n }\n\n // FirebaseAuth.getInstance().signOut();\n// finish()\n\n finish();\n }\n }\n });\n }\n }\n } catch (Exception e) {\n FirebaseDatabase.getInstance().getReference(\"Exceptions\").child(Profile.getCurrentProfile().getId()).push().setValue(e.toString());\n\n }\n\n }", "private void uploadToCloud()\n {\n final String TAG = \"uploadToCloud.uploadTask\";\n try\n {\n final File f = new File(currentPhotoPath);\n final Uri uri = Uri.fromFile(f);\n metaData = new StorageMetadata.Builder().setContentType(\"image/jpg\").build();\n final StorageReference ref = mStorageRef.child(mAuth.getCurrentUser().getUid() + \"/Pictures/\" + uri.getLastPathSegment());\n uploadTask = ref.putFile(uri, metaData);\n\n uploadTask.addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>()\n {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot)\n {\n progressBar.setVisibility(View.VISIBLE);\n progressBar.setProgress(Math.toIntExact\n ((taskSnapshot.getBytesTransferred() / taskSnapshot.getTotalByteCount()) * 100));\n Toast.makeText(getActivity(), \"Upload in Progress\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener()\n {\n @Override\n public void onFailure(@NonNull Exception exception)\n {\n progressBar.setVisibility(View.GONE);\n Log.w(TAG, \"uploadToCloud.uploadTask:failure\", exception);\n Toast.makeText(getActivity(), \"Unable to Upload: \"\n + exception.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>()\n {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n Task<Uri> urlTask = uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>()\n {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception\n {\n if (!task.isSuccessful())\n {\n throw task.getException();\n }\n return ref.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>()\n {\n @Override\n public void onComplete(@NonNull Task<Uri> task)\n {\n if (task.isSuccessful())\n {\n Uri downloadUri = task.getResult();\n Image image = new Image(downloadUri.toString());\n mDataRef.child(\"user/\" + mAuth.getCurrentUser().getUid() + \"/imageDownload/\"\n + FilenameUtils.getBaseName(uri.getLastPathSegment())).setValue(image); }\n else\n {\n Log.d(TAG, \"uploadToCloud.uploadTask.continueWithTask:failure\");\n }\n\n progressBar.setVisibility(View.GONE);\n Log.d(TAG, \"uploadToCloud.uploadTask:success\");\n Toast.makeText(getActivity(), \"Upload Complete\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n }\n catch (Exception e)\n {\n Log.d(TAG, \"uploadToCloud.imageCapture:null\");\n Toast.makeText(getActivity(), \"Unable to Upload: Please Load Local Image\", Toast.LENGTH_SHORT).show();\n }\n }", "private void registrationRequest(){\n class registrationRequest extends AsyncTask<Bitmap,Void,String> {\n\n ProgressDialog loading;\n RequestHandler rh = new RequestHandler();\n\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n loading = ProgressDialog.show(Registrazione.this, \"Upload Immagine\", \"Attendi...\",true,true);\n }\n\n @Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n loading.dismiss();\n if(s.equals(\"1\")){\n Toast.makeText(getApplicationContext(),\"Registrazione avvenuta con successo\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Errore durante la registrazione\",Toast.LENGTH_LONG).show();\n }\n onBackPressed();\n }\n\n @Override\n protected String doInBackground(Bitmap... params) {\n Globals g = Globals.getInstance();\n HashMap<String,Object> data = new HashMap<>();\n data.put(UPLOAD_KEY_IMAGE, g.getDomain() + manager_image.getImageName());\n data.put(UPLOAD_KEY_PASS,md5(password.getText().toString()));\n data.put(UPLOAD_KEY_MAIL,email.getText().toString());\n data.put(UPLOAD_KEY_USER,username.getText().toString());\n\n\n String result = rh.sendPostRequest(g.getDomain()+\"registrazione.php\",data);\n\n return result;\n }\n }\n\n registrationRequest ui = new registrationRequest();\n ui.execute();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n\n if (uriTask.isSuccessful()){\n\n\n //setup data to save\n HashMap<String,Object> hashMap = new HashMap<>();\n hashMap.put(\"uid\",\"\"+firebaseAuth.getUid());\n hashMap.put(\"email\",\"\"+email);\n hashMap.put(\"name\",\"\"+fullName);\n hashMap.put(\"phone\",\"\"+phoneNumber);\n hashMap.put(\"address\",\"\"+address);\n hashMap.put(\"timestamp\",\"\"+timestamp);\n // hashMap.put(\"code\",\"\"+code);\n hashMap.put(\"accountType\",\"User\");\n // hashMap.put(\"online\",\"true\");\n hashMap.put(\"profileImage\",\"\"+downloadImageUri); //url of uploaded image\n\n //save to db\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"SchoolFirst\");\n ref.child(firebaseAuth.getUid()).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //db updated\n progressDialog.dismiss();\n startActivity(new Intent(RegisterUserActivity.this,MainActivity.class));\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //failed updating db\n progressDialog.dismiss();\n startActivity(new Intent(RegisterUserActivity.this,MainActivity.class));\n finish();\n }\n });\n\n }\n }", "private void UploadImage() {\n\n if(imageuri!=null)\n {\n final StorageReference filepath = CustomerImageRef.child(Prevalent.currentOnlineUsers.getPhone_number() + \".jpg\");\n uploadTask = filepath.putFile(imageuri);\n\n uploadTask.continueWithTask(new Continuation() {\n @Override\n public Object then(@NonNull Task task) throws Exception {\n if(!task.isSuccessful())\n {\n throw task.getException();\n }\n\n\n return filepath.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful())\n {\n Uri downloadUrl = task.getResult();\n myUrl=downloadUrl.toString();\n\n DatabaseReference reference =FirebaseDatabase.getInstance().getReference().child(\"users\");\n\n HashMap<String,Object> hashMap=new HashMap<>();\n hashMap.put(\"Contact_no\",user_phone.getText().toString());\n hashMap.put(\"name\",user_fullname.getText().toString().trim());\n hashMap.put(\"Profilepic_URL\",myUrl);\n\n reference.child(Prevalent.currentOnlineUsers.getPhone_number()).updateChildren(hashMap);\n\n// loadingbar.dismiss();\n\n Toast.makeText(getContext(), \"Uploaded data sucessfully\", Toast.LENGTH_SHORT).show();\n// startActivity(new Intent(getActivity(),HomeFragment.class));\n\n\n getFragmentManager().beginTransaction().replace(R.id.nav_host_fragment, fragment).commit();\n\n\n }\n else\n {\n// loadingbar.dismiss();\n Toast.makeText(getContext(), \"error try again\", Toast.LENGTH_SHORT).show();\n\n\n }\n\n }\n });\n\n }\n else\n {\n Toast.makeText(getContext(), \"image is not selected\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "private void uploadImage(final String userID){\n\n final ProgressDialog loading = ProgressDialog.show(imageUpload.this,\"Uploading...\",\"Please wait...\",false,false);\n StringRequest stringRequest = new StringRequest(Request.Method.POST, UPLOAD_URL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String s) {\n db.fotoUpdate(uid);\n //Disimissing the progress dialog\n loading.dismiss();\n //Showing toast message of the response\n Toast.makeText(imageUpload.this, \"Foto profil kamu berhasil di perbaharui\", Toast.LENGTH_LONG).show();\n\n if (fromActivity.equals(\"Main\")){\n Intent m = new Intent(imageUpload.this, MainActivity.class);\n m.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(m);\n }\n else{\n session.changeValueRegister(\"upload\",1);\n Intent q = new Intent(imageUpload.this, questionsActivity.class);\n startActivity(q);\n finish();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n //Dismissing the progress dialog\n loading.dismiss();\n\n //Showing toast\n Toast.makeText(imageUpload.this, \"Silakan cek koneksi anda\", Toast.LENGTH_LONG).show();\n }\n }){\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n //Converting Bitmap to String\n String image = getStringImage(bitmap);\n\n //Creating parameters\n Map<String,String> params = new Hashtable<String, String>();\n\n //Adding parameters\n params.put(\"image\", image);\n params.put(\"userid\",userID);\n params.put(\"jodiUploadImg\",\"\");\n\n //returning parameters\n return params;\n }\n };\n\n //Creating a Request Queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n //Adding request to the queue\n requestQueue.add(stringRequest);\n stringRequest.setRetryPolicy(new DefaultRetryPolicy(60000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n\n /** if (fromActivity.equals(\"Main\")){\n Intent m = new Intent(this, MainActivity.class);\n m.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(m);\n }\n else{\n session.changeValueRegister(\"upload\",1);\n Intent q = new Intent(this, questionsActivity.class);\n startActivity(q);\n } **/\n }", "public void uploadPhoto(boolean isCheckDeviceAssocation) {\n\n String stSdcardState = Environment.getExternalStorageState();\n\n if (stSdcardState.equals(Environment.MEDIA_SHARED)) {\n\n Toast.makeText(this, getString(R.string.error_msg_sdcard_write), Toast.LENGTH_LONG)\n .show();\n finish();\n return;\n\n } else if (stSdcardState.equals(Environment.MEDIA_REMOVED)) {\n Toast.makeText(this, getString(R.string.error_msg_sdcard), Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n finish();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n String downloadUrl = task.getResult().toString();\n product.setImage(downloadUrl);\n databaseReference.child(\"productos\").child(product.getId()).setValue(product);\n progressDialog.dismiss();\n Intent mainActivityView = new Intent(AddProduct.this, MainActivity.class);\n AddProduct.this.startActivity(mainActivityView);\n Toast.makeText(AddProduct.this, \"¡Producto guardado con éxito!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n taskSnapshot.getMetadata().getReference().getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n FirebaseStorage.getInstance().getReference().child(\"faculty_images\").child(imageIdentifier).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Useremail.photouri = uri;\n FirebaseFirestore.getInstance().collection(\"Faculty_Bag\").document(Useremail.email).update(\"photo_uri\",Useremail.photouri.toString()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Showfancytoasr.show(MainActivity.this,\"Uploading process was successful\");\n progressDialog.dismiss();\n finish();\n startActivity(getIntent());\n }\n });\n }\n });\n }\n }\n });\n }", "public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n @SuppressWarnings(\"VisibleForTests\")\n Uri downloadUrI = taskSnapshot.getDownloadUrl();\n FirebasePost firebasePost = new FirebasePost();\n firebasePost.imageUrl = downloadUrI.toString();\n myImage.child(\"home\").setValue(firebasePost);\n\n\n }", "public String guardarImgPost(){\n \n File archivo=null;//Objeto para el manejo de os archivos\n InputStream in =null;//Objeto para el manejo del stream de datos del archivo\n //Se obtiene el codigo de usuario de la sesion actual\n String codUsuario=codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Se obtiene un codigo producto de la combinacion del codigo del usuario y de un numero aleatorio\n String codGenerado=new Utiles().generar(codUsuario);\n String extension=\"\";\n int i=0;\n //Extension del archivo ha subir\n extension=\".\"+FilenameUtils.getExtension(this.getObjImagen().getImagen().getFileName());\n \n \n try {\n //Pasa el buffer de datos en un array de bytes , finalmente lee cada uno de los bytes\n in=this.getObjImagen().getImagen().getInputstream();\n byte[] data=new byte[in.available()];\n in.read(data);\n \n //Crea un archivo en la ruta de publicacion\n archivo=new File(this.rutaImgPublicacion+codGenerado+extension);\n FileOutputStream out=new FileOutputStream(archivo);\n //Escribe los datos en el nuevo archivo creado\n out.write(data);\n \n System.out.println(\"Ruta de Path Absolute\");\n System.out.println(archivo.getAbsolutePath());\n \n //Cierra todas las conexiones\n in.close();\n out.flush();\n out.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n return \"none.jpg\";\n }\n //Retorna el nombre de la iamgen almacenada\n return codGenerado+extension;\n }", "private void uploadPhoto() {\n\n final ProgressDialog pd = new ProgressDialog(this);\n pd.setTitle(\"Uploading Image...\");;\n pd.show();\n\n final String randomKey = UUID.randomUUID().toString();\n StorageReference storageRef = storageReference.child(\"images/\" + randomKey);\n\n storageRef.putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n final Task<Uri> firebaseUri = taskSnapshot.getStorage().getDownloadUrl();\n firebaseUri.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n photoURL = uri.toString();\n }\n });\n\n pd.dismiss();\n Snackbar.make(findViewById(android.R.id.content), \"Image Uploaded.\", Snackbar.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n pd.dismiss();\n Toast.makeText(getApplicationContext(), \"Failed To Upload\", Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(@NonNull UploadTask.TaskSnapshot snapshot) {\n double progressPercent = (100.00 * snapshot.getBytesTransferred() / snapshot.getTotalByteCount());\n pd.setMessage(\"Percentage: \" + (int) progressPercent + \"%\");\n }\n });\n }", "@Override\n public void onSuccess(Uri uri) {\n Image_Upload upload = new Image_Upload( uri.toString());\n mDatabaseRef.child(String.valueOf(a)).setValue(upload);\n Intent i=new Intent(All_Images.this, More_About_Users.class);\n startActivity(i);\n }", "private void UploadImageToStorage(){\n final StorageReference filepath = storageRootRef.child(\"MyImages\").child(imageURIFromDevice.getLastPathSegment());\n\n filepath.putFile(imageURIFromDevice).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // I'll be notified here if my image has been uploaded\n\n // Extract the URI of the image\n filepath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n // teh result uri of the image on WEB\n Uri downloadURIofImage = uri;\n\n // Pass the URI and ImageView to Picasso\n Picasso.get().load(downloadURIofImage).into(resultImageView);\n }\n });\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n }\n });\n }", "private void uploadImage() {\n final ProgressDialog pd = new ProgressDialog(MyProfile.this);\n pd.setMessage(\"Uploading...\");\n pd.show();\n\n //if image address is not null --> convert to format that can be stored into firebase\n if(imageUri != null) {\n final StorageReference fileReference = storageReference.child(System.currentTimeMillis() + \".\" + getFileExtension(imageUri));\n\n //puts imageUri into firebase\n uploadTask = fileReference.putFile(imageUri);\n\n uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if(!task.isSuccessful()) {\n throw task.getException();\n }\n return fileReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n //if task successful --> get uri and convert to string to set to \"ProfilePic\" in firebase\n if(task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n String mUri = downloadUri.toString();\n //Log.d(\"uri\", mUri);\n\n //get firebase reference, update map w/ profilePic, and update map in reference\n reference = FirebaseDatabase.getInstance().getReference(\"USERS\").child(firebaseUser.getUid());\n HashMap<String, Object> map = new HashMap<>();\n map.put(\"ProfilePic\", mUri);\n reference.updateChildren(map);\n\n pd.dismiss();\n }\n //if task not successful --> show toast\n else {\n Toast.makeText(getApplicationContext(), \"Upload failed!\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n //show error message for why task failed\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n pd.dismiss();\n }\n });\n }\n else {\n Toast.makeText(getApplicationContext(), \"No image selected\", Toast.LENGTH_SHORT).show();\n }\n }", "public void sendServer(){\n class sendData extends AsyncTask<Void, Void, String> {\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n }\n @Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n\n sendMessageFirebase(\"MOA\", \"주문서 기능을 사용해보세요!!!!!!!!\", \"none\", \"MOA\", \"none\");\n Intent intent = new Intent(getApplicationContext(), ChattingActivity.class);\n// Intent intent = new Intent(getApplicationContext(), ReceiptActivity.class);\n intent.putExtra(\"room_id\",roomID);\n saveImage();\n startActivity(intent);\n finish();\n }\n @Override\n protected void onProgressUpdate(Void... values) {\n super.onProgressUpdate(values);\n }\n @Override\n protected void onCancelled(String s) {\n super.onCancelled(s);\n }\n @Override\n protected void onCancelled() {\n super.onCancelled();\n }\n @Override\n protected String doInBackground(Void... voids) {\n try {\n OkHttpClient client = new OkHttpClient();\n JSONObject jsonInput = new JSONObject();\n\n jsonInput.put(\"creator_email\", MyData.mail);\n jsonInput.put(\"creator_name\", MyData.name);\n jsonInput.put(\"category\", stuffRoomInfo.getCategory());\n jsonInput.put(\"title\", stuffRoomInfo.getTitle());\n jsonInput.put(\"order_date\", stuffRoomInfo.getOrderDate());\n jsonInput.put(\"order_time\", stuffRoomInfo.getOrderTime());\n jsonInput.put(\"place\", stuffRoomInfo.getPlace());\n jsonInput.put(\"stuff_link\", stuffRoomInfo.getStuffLink());\n// jsonInput.put(\"stuff_cost\", Integer.parseInt(stuffRoomInfo.getStuffCost()));\n\n RequestBody reqBody = RequestBody.create(\n MediaType.parse(\"application/json; charset=utf-8\"),\n jsonInput.toString()\n );\n\n Request request = new Request.Builder()\n .post(reqBody)\n .url(urls)\n .build();\n\n Response responses = null;\n responses = client.newCall(request).execute();\n\n JSONObject jObject = new JSONObject(responses.body().string());\n roomID = jObject.getString(\"room_id\");\n responses.close();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }\n }\n sendData sendData = new sendData();\n sendData.execute();\n }", "private void configStorage(){\n try {\n final StorageReference storageReference = FirebaseStorage.getInstance()\n .getReference(\"motolost/\"+ String.valueOf(Math.random()) + getFileExtension(filePath));\n storageReference.putFile(filePath)\n .continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n return storageReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n saveRegistry(downloadUri.toString());\n }\n }\n });\n } catch (Exception ex) {\n Constant.showMessage(\"Exception\", ex.getMessage(), this);\n }\n }", "public void uploadImageButton(Uri imageUri) {\n title = titleUpdate.getText().toString();\n content = contentUpdate.getText().toString();\n time = timeUpdate.getText().toString();\n place = placeUpdate.getText().toString();\n organize = organizeUpdate.getText().toString();\n\n\n imageReference = firebaseStorage.getReference().child(firebaseAuth.getUid()).child(\"AdminImage\").child(titlestarred).child(\"image\");\n\n if(imageUri == null) {\n imageURL=imageNameUpdate.getText().toString();\n //Log.d(\"kimmy\", imageURL);\n event = new Event(content, fileURL, imageURL, organize, place, time, title);\n eventPathDatabaseReference.setValue(event);\n //uploadFileButton(pdfUri);\n\n }else if(imageUri != null){\n uploadTaskImage = imageReference.putFile(imageUri);\n Task<Uri> urlTask = uploadTaskImage.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n // Continue with the task to get the download URL\n return imageReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n imageURL = task.getResult().toString();\n event = new Event(content, fileURL, imageURL, organize, place, time, title);\n eventPathDatabaseReference.setValue(event);\n }\n else {\n // Handle failures\n // ...\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getContext(), \"File not Succesfully upload\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n\n }", "public void uploadImage() {\n if (imgPath != null && !imgPath.isEmpty()) {\n //prgDialog.setMessage(\"Converting Image to Binary Data\");\n //prgDialog.show();\n // Convert image to String using Base64\n new EncodeImageToStringTask().execute();\n // When Image is not selected from Gallery\n } else {\n //Toast.makeText(\n // getApplicationContext(),\n // \"You must select image from gallery before you try to upload\",\n // Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onClick(View view) {\n StorageReference myfileRef = storageRef.child(email).child(\"ProfPic.jpg\");\n //StorageReference myfileRef = storageRef.child(\"ProfPic.jpg\");\n viewImage.setDrawingCacheEnabled(true);\n viewImage.buildDrawingCache();\n Bitmap bitmap = viewImage.getDrawingCache();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask = myfileRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(ProfilePicture.this, \"TASK FAILED\", Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(ProfilePicture.this, \"Upload Successful!\", Toast.LENGTH_SHORT).show();\n //progressBar.setVisibility(View.GONE);\n\n Uri downloadUrl =taskSnapshot.getDownloadUrl();\n String DOWNLOAD_URL = downloadUrl.getPath();\n Log.v(\"Download URL\", DOWNLOAD_URL);\n Toast.makeText(ProfilePicture.this, DOWNLOAD_URL, Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void registrar_contacto() {\n\n\n String nombre_contacto = txtV_nombre_contacto.getText().toString();\n String numero_contacto = txtV_numero_contacto.getText().toString();\n\n enviar_sms();\n\n progressDialog = new ProgressDialog(AddContactosActivity.this);\n progressDialog.setMessage(\"Subiendo por favor espere...\");\n progressDialog.show();\n\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 10, baos);\n byte[] imageBytes = baos.toByteArray();\n final String imageString = Base64.encodeToString(imageBytes, Base64.NO_WRAP);\n Log.d(\"IMAGE\", \"registrar_contacto: \" + imageString);\n\n\n JSONObject js = new JSONObject();\n try {\n js.put(\"alias\", nombre_contacto);\n js.put(\"nroCelular\", numero_contacto);\n js.put(\"photo\", imageString);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // Make request for JSONObject\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(\n Request.Method.POST, URL_ADD_CONTACT, js,\n\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n progressDialog.dismiss();\n Log.d(\"RESPONSE CORRECTO\", response.get(\"idContacto\") + \" i am queen\");\n Toast.makeText(getApplicationContext(), \"Contacto Agregado\", Toast.LENGTH_LONG).show();\n finish();\n //Snackbar.make(v,\"CONFIRMA TU PASSWORD CON\",Snackbar.LENGTH_INDEFINITE).setAction(\"LOGIN\",new View.OnClickListener(){\n // @Override\n //public void onClick(View v) {\n // finish();\n //}\n //}).show();\n } catch (JSONException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \" error\" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(\"eRRor Response\", \"Error: \" + error.toString());\n Toast.makeText(getApplicationContext(), \"\" + error.toString(), Toast.LENGTH_LONG).show();\n }\n }) {\n\n /**\n * Passing some request headers\n */\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n headers.put(\"Authorization\", \"Bearer \" + TOKEN);\n return headers;\n }\n };\n // Adding request to request queue\n Volley.newRequestQueue(getApplicationContext()).add(jsonObjReq);\n }", "private void uploadFile(String uploadDate,String uploadMealName) {\n\n Context context = this;\n Thread imageWithMealBinder = new Thread(){\n private Context localContext = context;\n @Override\n public void run(){\n if (mImageUri != null) {\n String address = System.currentTimeMillis() + \".\" + getFileExtension(mImageUri);\n final StorageReference fileReference = mStorageRef.child(address);\n\n\n fileReference.putFile(mImageUri).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(MealViewer.this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred() / taskSnapshot.getTotalByteCount());\n mProgressBar.setProgress((int) progress);\n\n }\n }).continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n return fileReference.getDownloadUrl();\n }\n }).addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(@NonNull Uri downloadUri) {\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n mProgressBar.setProgress(0);\n }\n }, 5000);\n\n Toast.makeText(MealViewer.this, R.string.upload_successfull, Toast.LENGTH_SHORT).show();\n Upload upload = new Upload(mealNameTextbox.getText().toString().trim(), downloadUri.toString());\n\n // Make a unique Id - We can change this later.\n String uploadId = mDatabaseRef.push().getKey();\n\n // Use this to get data\n mDatabaseRef.child(uploadId).setValue(upload);\n\n // Get the url\n String imageUrl = upload.getImageUrl();\n\n\n //update the database\n MealCalendar mc =\n GreenFoodChallengeDatabase.getCurrentUser().getMealCalendar();\n\n synchronized (mc){\n Day day = mc.getDay(uploadDate);\n Meal meal = day.getMeal(uploadMealName);\n meal.setImageUrl(imageUrl);\n day.setMeal(meal);\n mc.updateDay(uploadDate,day);\n\n GreenFoodChallengeDatabase.updateCurrentUser();\n }\n\n }\n });\n\n }\n }\n\n };\n imageWithMealBinder.start();\n }", "private void uploadImage() {\n final ProgressDialog pd = new ProgressDialog(this);\n //progress dialog\n pd.setMessage(getResources().getString(R.string.Uploading));\n pd.show();\n\n if (mInageUri != null){\n //upload new profile image to:\n final StorageReference filereference = storageRef.child(System.currentTimeMillis()\n + \".\" + getFileExtension(mInageUri));\n\n uploadTask = filereference.putFile(mInageUri);\n uploadTask.continueWithTask(new Continuation() {\n @Override\n public Object then(@NonNull Task task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n return filereference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n String myUrl = downloadUri.toString();\n\n //get uid\n DatabaseReference reference = FirebaseDatabase.getInstance()\n .getReference(\"Users\").child(firebaseUser.getUid());\n\n HashMap<String, Object> hashMap = new HashMap<>();\n hashMap.put(\"imageurl\", \"\" + myUrl);\n\n reference.updateChildren(hashMap);\n\n pd.dismiss();\n Toasty.success(EditProfileActivity.this, R.string.updated, Toast.LENGTH_LONG, true).show();\n } else {\n Toasty.error(EditProfileActivity.this, R.string.Failed, Toast.LENGTH_LONG, true).show();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toasty.error(EditProfileActivity.this, R.string.Failed, Toast.LENGTH_LONG, true).show();\n }\n });\n }else {\n Toasty.info(EditProfileActivity.this, R.string.NoImageselected, Toast.LENGTH_LONG, true).show();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n fotoReferencia.getDownloadUrl()\n .addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Mensaje mensajeFoto = new Mensaje\n (nombreUsuario,\n \"Ha enviado una foto\",\n FirebaseAuth.getInstance().getCurrentUser()\n .getPhotoUrl().toString(),\n \"2\",\n DateFormat.getTimeInstance().format\n (Timestamp.now().toDate()),\n uri.toString(),\n idUsuario,\n idVeterinario);\n db.collection(\"chat\")\n .document(idChat)\n .collection(\"mensajes\")\n .add(mensajeFoto);\n }\n });\n }", "private void putImageInStorage() {\n final StorageReference ref = storageReference.child(\"images/\" + java.util.UUID.randomUUID().toString());\n ref.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n if (taskSnapshot.getMetadata() != null) {\n if (taskSnapshot.getMetadata().getReference() != null) {\n Task<Uri> result = taskSnapshot.getStorage().getDownloadUrl();\n result.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n imageUrl = uri.toString();\n ChatMessage Message = new\n ChatMessage(null,\n mUsername,\n imageUrl, dateAndTime);\n mFirebaseDatabaseReference.child(CHATS_PATH + chatCode)\n .push().setValue(Message);\n }\n });\n }\n }\n }\n });\n }", "private void saveAndUploadAndSendNotification(byte[] bytes) throws IOException {\n Log.d(TAG, \"saving picture \");\n Bitmap pictureAsBitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n\n Matrix matrix = new Matrix();\n if (currentCamera == CAMERA_FRONT) {\n matrix.postRotate(-90);\n } else {\n if (currentCamera == CAMERA_BACK) {\n matrix.postRotate(90);\n }\n }\n Bitmap rotatedBitmap = Bitmap.createBitmap(pictureAsBitmap, 0, 0, pictureAsBitmap.getWidth(), pictureAsBitmap.getHeight(), matrix, true);\n\n Uri uri = getImageUri(getContext(), rotatedBitmap);\n\n double altitude = 0;\n double latitude = 0;\n double longitude = 0;\n if (currentLocation != null) {\n altitude = currentLocation.getAltitude();\n latitude = currentLocation.getLatitude();\n longitude = currentLocation.getLongitude();\n }\n HEPicture hePicture = new HEPicture(rotatedBitmap,\n uri.getLastPathSegment(),\n sizeOf(rotatedBitmap),\n altitude,\n latitude,\n longitude,\n cityName,\n Calendar.getInstance().getTime().toString()\n );\n HEPicture.getPictures().put(hePicture.getLastPathSegment(), hePicture);\n PictureListFragment.hePictureInterface.onNewPictureLoaded(hePicture.getLastPathSegment());\n HEPicture.savePicture(hePicture);\n uploadFromUri(uri, hePicture);\n }", "private void uploadFile() {\n if (filePath != null) {\n //displaying a progress dialog while upload is going on\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.show();\n\n StorageReference riversRef = mStorageRef.child(previously);\n riversRef.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //if the upload is successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n // picup =true;\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n //if the upload is not successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n //calculating progress percentage\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n\n //displaying percentage in progress dialog\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\n }\n });\n }\n //if there is not any file\n else {\n //you can display an error toast\n }\n }", "public void ImageUploadToServerFunction(){\r\n\r\n ByteArrayOutputStream byteArrayOutputStreamObject ;\r\n\r\n byteArrayOutputStreamObject = new ByteArrayOutputStream();\r\n\r\n // Converting bitmap image to jpeg format, so by default image will upload in jpeg format.\r\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStreamObject);\r\n\r\n byte[] byteArrayVar = byteArrayOutputStreamObject.toByteArray();\r\n\r\n final String ConvertImage = Base64.encodeToString(byteArrayVar, Base64.DEFAULT);\r\n\r\n class AsyncTaskUploadClass extends AsyncTask<Void,Void,String> {\r\n\r\n @Override\r\n protected void onPreExecute() {\r\n\r\n super.onPreExecute();\r\n\r\n // Showing progress dialog at image upload time.\r\n progressDialog = ProgressDialog.show(MakeRequestActivity.this,\"Image is Uploading\",\"Please Wait\",false,false);\r\n }\r\n\r\n @Override\r\n protected void onPostExecute(String string1) {\r\n\r\n super.onPostExecute(string1);\r\n\r\n // Dismiss the progress dialog after done uploading.\r\n progressDialog.dismiss();\r\n\r\n // Printing uploading success message coming from server on android app.\r\n Toast.makeText(MakeRequestActivity.this,string1,Toast.LENGTH_LONG).show();\r\n\r\n // Setting image as transparent after done uploading.\r\n postImage.setImageResource(android.R.color.transparent);\r\n\r\n\r\n }\r\n\r\n @Override\r\n protected String doInBackground(Void... params) {\r\n\r\n ImageProcessClass imageProcessClass = new ImageProcessClass();\r\n\r\n HashMap<String,String> HashMapParams = new HashMap<String,String>();\r\n\r\n HashMapParams.put(ImageNameFieldOnServer, GetImageNameFromEditText);\r\n\r\n HashMapParams.put(ImagePathFieldOnServer, ConvertImage);\r\n\r\n String FinalData = imageProcessClass.ImageHttpRequest(ImageUploadPathOnSever, HashMapParams);\r\n\r\n return FinalData;\r\n }\r\n }\r\n AsyncTaskUploadClass AsyncTaskUploadClassOBJ = new AsyncTaskUploadClass();\r\n\r\n AsyncTaskUploadClassOBJ.execute();\r\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n //Muestra un Snackbar informando al usuaario del error\n Snackbar.make(ivFotoPerfil,\"Error al subir la imagen al servidor: \"\n + e.getMessage(),\n Snackbar.LENGTH_LONG).show();\n }", "private void uploadFile() {\n if (selectedImageUri != null) {\n //displaying a progress dialog while upload is going on\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.show();\n\n StorageReference riversRef = storageReference.child(\"Images/Adhaar\"+jill+\"/\"+jack);\n riversRef.putFile(selectedImageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //if the upload is successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n Intent step3 = new Intent(step4.this, step4.class);\n startActivity(step3);\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n //if the upload is not successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n //calculating progress percentage\n @SuppressWarnings(\"VisibleForTests\") double re=taskSnapshot.getBytesTransferred();\n @SuppressWarnings(\"VisibleForTests\") double rem=taskSnapshot.getBytesTransferred();\n double progress = (100.0 * re) / rem;\n\n //displaying percentage in progress dialog\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\n }\n });\n }\n //if there is not any file\n else {\n //you can display an error toast\n }\n }", "private void registerNewUser() {\n progressBar.setVisibility(View.VISIBLE);\n\n final String email, password, displayName;\n email = emailTV.getText().toString();\n password = passwordTV.getText().toString();\n displayName = nameTV.getText().toString();\n\n //Make sure user has entered details for all fields.\n if(TextUtils.isEmpty(displayName)){\n Toast.makeText(getApplicationContext(), \"Please enter username.\", Toast.LENGTH_LONG).show();\n return;\n }\n if (TextUtils.isEmpty(email)) {\n Toast.makeText(getApplicationContext(), \"Please enter email.\", Toast.LENGTH_LONG).show();\n return;\n }\n if (TextUtils.isEmpty(password)) {\n Toast.makeText(getApplicationContext(), \"Please enter password.\", Toast.LENGTH_LONG).show();\n return;\n }\n if(filePath == null){\n Toast.makeText(getApplicationContext(), \"Please select an image and try again.\", Toast.LENGTH_LONG).show();\n return;\n }\n //Updates Firebase to register a new user with email and password\n //also uploads image to Firebase for user account.\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n Uri userUri;\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n Toast.makeText(getApplicationContext(), \"Registration successful!\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n //Create a new user with name and email address.\n User newUser = new User(displayName, email , getLocationAddress(), loc.getLatitude(), loc.getLongitude());\n newUser.writeUser(FirebaseAuth.getInstance().getCurrentUser().getUid());\n //Update user profile on Firebase to add a display name.\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder().setDisplayName(displayName).build();\n mAuth.getCurrentUser().updateProfile(profileUpdates);\n\n if (filePath != null) {\n //displaying progress dialog while image is uploading\n Log.e(\"FilePath: \", filePath.toString());\n Log.e(\"Current User: \", mAuth.getCurrentUser().getEmail());\n final StorageReference sRef = mStorageReference.child(\"users/\" + mAuth.getCurrentUser().getUid());\n //Get image from users phone media.\n Bitmap bmpImage = null;\n try {\n bmpImage = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Compress image size.\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bmpImage.compress(Bitmap.CompressFormat.JPEG, 25, baos);\n byte[] data = baos.toByteArray();\n //adding the file to firebase reference\n sRef.putBytes(data)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n sRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n final Uri downloadUri = uri;\n userUri = downloadUri;\n //Upload image file to Firebase database.\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference dbRef = database.getReference().child(\"users\").child(mAuth.getCurrentUser().getUid()).child(\"photoUri\");\n Log.e(\"user download url: \", userUri.toString());\n dbRef.setValue(userUri.toString());\n //displaying success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n //Add user dp url to user class in Firebase.\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder().setPhotoUri(downloadUri).build();\n mAuth.getCurrentUser().updateProfile(profileUpdates);\n }\n });\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n } else {\n Toast.makeText(getApplicationContext(), \"Select a picture and try again.\", Toast.LENGTH_SHORT).show();\n }\n Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);\n startActivity(intent);\n }\n else {\n Toast.makeText(getApplicationContext(), \"Registration failed! Please try again later\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n }\n });\n }", "void UploadToFirebase() {\n // This gives the path name for the storage\n StorageReference photoRef = mStorageRef.child(\"images\").child(selectedImageUri.getLastPathSegment());\n\n // This uploads it into firebase storage\n // Toast makes the little comment appear at the bottom of the screen\n photoRef.putFile(selectedImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @SuppressLint(\"ShowToast\")\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Uploaded\", Toast.LENGTH_SHORT);\n toast.show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @SuppressLint(\"ShowToast\")\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Upload failed\", Toast.LENGTH_SHORT);\n toast.show();\n }\n });\n }", "private void uploadImagetoFirebase(Uri imageUri) {\n StorageReference fileRef = storageReference.child(\"/users/\").child(fAuth.getCurrentUser().getUid()).child(\"/profile.png/\");\n fileRef.putFile(imageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(editAccount.this, \"Image Uploaded\", Toast.LENGTH_SHORT).show();\n fileRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n String userID = fAuth.getCurrentUser().getUid();\n DatabaseReference currentUser_db = FirebaseDatabase.getInstance().getReference().child(\"/Profile/UserInfo/\").child(userID);\n currentUser_db.child(\"imgURL\").setValue(String.valueOf(uri));\n Picasso.get().load(uri).into(editImage);\n\n }\n });\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull @NotNull Exception e) {\n Toast.makeText(editAccount.this, \"Failed\", Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, final Intent data)\n {\n if (requestCode == Constants.CAMERA_PIC_REQUEST && resultCode == RESULT_OK)\n {\n try\n {\n //setup variables to send to server\n //bytearraystring, filename, orientation\n file = photoFile;\n ExifInterface exifInterface = new ExifInterface(file.getAbsolutePath());\n orientation = exifInterface.getAttribute(ExifInterface.TAG_ORIENTATION);\n\n bitmap = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), capturedImageUri);\n\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byteArray = byteArrayOutputStream.toByteArray();\n byteArrayString = Base64.encodeToString(byteArray, Base64.DEFAULT);\n fileName = file.getName() + \".jpg\";\n\n //upload data\n new HttpTasks(UPLOAD_IMAGE).execute();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n if (requestCode == Constants.FILE_CHOOSER && resultCode == RESULT_OK)\n {\n try\n {\n //get exif orientation from original file\n ExifInterface exifInterface = new ExifInterface(FileUtils.getRealPathFromURI(this, data.getData()));\n orientation = exifInterface.getAttribute(ExifInterface.TAG_ORIENTATION);\n\n //filename needed to upload\n filepath = data.getData().getPath();\n File actualFile = new File(filepath);\n fileName = actualFile.getName() + \".jpg\";\n\n //create cached file container\n file = new File(userCacheDir + \"/\" + fileName);\n file.createNewFile();\n FileOutputStream out = new FileOutputStream(file);\n\n// upload byte array to online db\n //convert bitmap to a byte array\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), data.getData());\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byteArray = byteArrayOutputStream.toByteArray();\n byteArrayString = Base64.encodeToString(byteArray, Base64.DEFAULT);\n\n //write bytearray to file container\n out.write(byteArray);\n ExifInterface newFileExif = new ExifInterface(file.getAbsolutePath());\n newFileExif.setAttribute(ExifInterface.TAG_ORIENTATION, orientation);\n newFileExif.saveAttributes();\n byteArrayOutputStream.close();\n\n out.close();\n //upload data\n new HttpTasks(UPLOAD_IMAGE).execute();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void done(View view){\n RequestQueue req = Volley.newRequestQueue(this);\n String url = imageSrc.getText().toString();\n ImageRequest imageReq = new ImageRequest(url, new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap response) {\n imageView.setImageBitmap(response);\n }\n }, 0, 0, null, Bitmap.Config.RGB_565, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity2.this, \"Invalid image URL, try another one!\", Toast.LENGTH_LONG).show();\n }\n });\n req.add(imageReq);\n\n //inserting data in our Realtime Database\n reference = FirebaseDatabase.getInstance().getReference(id.getText().toString());\n reference.child(\"imagesrc\").setValue(imageSrc.getText().toString());\n reference.child(\"latitude\").setValue(lat.getText().toString());\n reference.child(\"longitude\").setValue(lon.getText().toString());\n reference.child(\"description\").setValue(description.getText().toString());\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "public void nextClicked(View view) {\n createSnapImageView.setDrawingCacheEnabled(true);\n createSnapImageView.buildDrawingCache();\n Bitmap bitmap = createSnapImageView.getDrawingCache();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n final byte[] data = baos.toByteArray();\n\n final UploadTask[] uploadTask = {FirebaseStorage.getInstance().getReference().child(\"images\").child(imageName).putBytes(data)};\n uploadTask[0].addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle unsuccessful uploads\n Toast.makeText(CreateSnapActivity.this, \"Upload Failed\", Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // taskSnapshot.getMetadata() contains file metadata such as size, content-type, etc.\n\n // ...\n\n final StorageReference ref = FirebaseStorage.getInstance().getReference().child(\"images\").child(imageName);\n uploadTask[0] = ref.putBytes(data);\n\n Task<Uri> urlTask = uploadTask[0].continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n\n // Continue with the task to get the download URL\n return ref.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n Log.i(\"URL\", downloadUri.toString());\n\n Intent intent = new Intent(CreateSnapActivity.this, ChooseUserActivity.class);\n intent.putExtra(\"imageURL\", downloadUri.toString());\n intent.putExtra(\"imageName\", imageName);\n intent.putExtra(\"message\", messageEditText.getText().toString());\n startActivity(intent);\n\n } else {\n // Handle failures\n // ...\n }\n\n }\n });\n\n\n }\n\n });\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n if (uriTask.isSuccessful())\n {\n //save info with image\n HashMap<String, Object> hashMap = new HashMap<>();\n\n hashMap.put(\"uid\",\"\"+uid_user);\n hashMap.put(\"name\",\"\"+nameSt);\n hashMap.put(\"phone\",\"91\"+phoneSt);\n hashMap.put(\"mail\",\"\"+mailSt);\n hashMap.put(\"profileImage\", \"\"+downloadImageUri);\n hashMap.put(\"timestamp\", \"\" + timpstamp);\n mRef.child(uid_user).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"add user sucessfully\", Toast.LENGTH_SHORT).show();\n goToHomePage();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n }", "@Override\n public void onFailure(int code, String msg) {\n Log.i(\"Allen\", \"上传文件失败:\" + msg + \" ImgURL=\" + ImgURL);\n mDialog.dismiss();\n ToastUtils.toastFail(RegisterActivity.this, \"上传文件失败\" + msg);\n\n }", "private void sendImage(byte[] arr){\n MediaManager.get().upload(arr).option(\"tags\", ConnectionUtils.IMAGE_TAG).callback(new UploadCallback() {\n @Override\n public void onStart(String requestId) {\n MessageUtils.toast(ImageActivity.this, \"Uploading Image!\", 0);\n }\n\n @Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n }\n\n @Override\n public void onSuccess(String requestId, Map resultData) {\n MessageUtils.toast(ImageActivity.this, \"Image Uploaded!\", 0);\n mImageView.setImageURI(null);\n mParent.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onError(String requestId, ErrorInfo error) {\n MessageUtils.toast(ImageActivity.this, error.getDescription(), 1);\n mParent.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onReschedule(String requestId, ErrorInfo error) {\n }\n }).dispatch();\n }", "private void cloudSavedDataResult(final DataResult dataResult) {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);\n View view = LayoutInflater.from(context).inflate(R.layout.cloud_saving_loading_view, null, false);\n final AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.setView(view);\n alertDialog.setCancelable(false);\n alertDialog.setCanceledOnTouchOutside(false);\n alertDialog.show();\n// FirebaseStorageRequest firebaseStorageRequest = new FirebaseStorageRequest(dataResult, new StorageListener() {\n// @Override\n// public void onSuccess(DataResult dataResult) {\n// moflusSQLiteHelper.updateDataResult(dataResult);\n// notifyDataSetChanged();\n// alertDialog.dismiss();\n// Toast.makeText(context,\"Data Result Saved to Cloud\",Toast.LENGTH_SHORT).show();\n// }\n//\n// @Override\n// public void onFailed(String error) {\n// alertDialog.dismiss();\n// Toast.makeText(context,\"Error While Saving To The Cloud\",Toast.LENGTH_SHORT).show();\n// }\n// });\n// firebaseStorageRequest.saveToCloud();\n User user = MoflusSharedPreferenceHelper.getUser(context);\n SaveDataResult saveDataResult = new SaveDataResult();\n saveDataResult.setUid(user.getUid());\n saveDataResult.setDataResult(dataResult);\n MoFluSService.getService().saveDataResult(saveDataResult).enqueue(new Callback<Status>() {\n @Override\n public void onResponse(Call<Status> call, Response<Status> response) {\n if (response.body()!= null && response.body().isSuccess()) {\n ImageUploader imageUploader = new ImageUploader(context,MoflusSharedPreferenceHelper.getUser(context));\n\n imageUploader.uploadDataResultPreview(BitmapHelper.createBitmapToFile(dataResult.getPreview_picture(),String.valueOf(dataResult.getId())));\n dataResult.setIs_clouded(true);\n moflusSQLiteHelper.updateDataResult(dataResult);\n notifyDataSetChanged();\n alertDialog.dismiss();\n Toast.makeText(context, dataResult.getName()+\" Saved to Cloud\", Toast.LENGTH_SHORT).show();\n } else {\n alertDialog.dismiss();\n Toast.makeText(context, \"Error While Saving To The Cloud\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Status> call, Throwable t) {\n alertDialog.dismiss();\n Toast.makeText(context, \"Internet Problem\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n protected void onPostExecute(String msg) {\n params.add(new BasicNameValuePair(\"image\", encodedString));\n // Trigger Image upload\n new upload_image().execute();\n }", "public void uploadImage(View v) {\n // When Image is selected from Gallery\n if (imgPath != null && !imgPath.isEmpty()) {\n prgDialog.setMessage(\"Converting Image to Binary Data\");\n prgDialog.show();\n // Convert image to String using Base64\n encodeImagetoString();\n // When Image is not selected from Gallery\n } else {\n Toast.makeText(\n getApplicationContext(),\n \"You must select image from gallery before you try to upload\",\n Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n mStorageRef.child(type).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n //Setting the url to database\n\n reference2.child(type).setValue(uri.toString());\n\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }\n\n });\n }", "public void conectar() {\n\t\tif (isOnline()) {\n\t\t\tregister_user();\n\n\t\t} else {\n\t\t\tToast notification = Toast.makeText(this,\n\t\t\t\t\t\"Activa tu conexión a internet\", Toast.LENGTH_SHORT);\n\t\t\tnotification.setGravity(Gravity.CENTER, 0, 0);\n\t\t\tnotification.show();\n\t\t\t//progreso.setVisibility(View.GONE);\n\t\t\tsetProgressBarIndeterminateVisibility(false);\n\t\t}\n\t}", "private void databaseUpload() {\n StorageReference reference;\n\n// Toast.makeText(NewBeneficiary2.this, \"\"+by.length, Toast.LENGTH_SHORT).show();\n\n reference = FirebaseStorage.getInstance().getReference().child(\"Applications/\").child(FirebaseAuth.getInstance().getUid() + \"_doc\");\n reference.putBytes(by).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n String generatedFilePath = uri.toString();\n NewBeneficiary1.applicationModel.setDocPic(generatedFilePath);\n\n FirebaseFirestore.getInstance().document(\"Applications/\"+FirebaseAuth.getInstance().getUid()+\"/\")\n .set(NewBeneficiary1.applicationModel)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n StatusModel statusModel = new StatusModel();\n statusModel.setStageName(\"Application Submitted\");\n statusModel.setTimestamp(Timestamp.now());\n FirebaseFirestore.getInstance().collection(\"Applications/\"+FirebaseAuth.getInstance().getUid()+\"/Statuses\")\n .document()\n .set(statusModel)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Toast.makeText(NewBeneficiary2.this, \"Completed\", Toast.LENGTH_LONG).show();\n dialog.dismiss();\n startActivity(new Intent(NewBeneficiary2.this, MainActivity.class));\n }\n });\n }\n });\n\n }\n });\n }\n });\n\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == GALLERY_INTETN && resultCode==RESULT_OK) {\n dialog.setMessage(\"Uploading\");\n dialog.show();\n Uri uri= data.getData();\n\n StorageReference filepath= mStorage.child(\"volunteer_aadhar_pic\").child(uri.getLastPathSegment());\n try\n {\n compressed = MediaStore.Images.Media.getBitmap(ApplyAsVolunteer.this.getContentResolver(), uri);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressed.compress(Bitmap.CompressFormat.JPEG, 30, baos);\n byte[] cimg = baos.toByteArray();\n filepath.putBytes(cimg).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n path = taskSnapshot.getDownloadUrl();\n //accountref = FirebaseDatabase.getInstance().getReference().child(\"user_details\").child(auth.getUid());\n //accountref.child(\"userImgUrl\").setValue(String.valueOf(path));\n Toast.makeText(ApplyAsVolunteer.this, \"Document uploaded\", Toast.LENGTH_LONG).show();\n //finish();\n //startActivity(getIntent());\n afterText.setVisibility(View.VISIBLE);\n clicksubmit.setVisibility(View.GONE);\n dialog.dismiss();\n }\n });\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n ref.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n\n\n\n @Override\n public void onSuccess(Uri uri) {\n //String uid = firebaseAuth.getCurrentUser().getUid();\n Toast.makeText(Edit_Profile.this, user_id, Toast.LENGTH_SHORT).show();\n // Toast.makeText(Edit_Profile.this, \"Image Uploaded\", Toast.LENGTH_SHORT).show();\n ImageUpload imageUpload = new ImageUpload(uri.toString());\n url = imageUpload.getUrl();\n\n // User us = new User(U_Email,U_Fname,U_LName,url);\n User us = new User(edt_email.getText().toString(),edt_name.getText().toString(),edt_lastname.getText().toString(),url);\n\n Log.i(\"data\", edt_email.getText().toString().trim() + edt_name.getText().toString().trim() + edt_lastname.getText().toString().trim() );\n // database k references ka user table k child ki value set hogaeee on SuccessListener par\n databaseReference.child(\"Users\").child(user_id).setValue(us).addOnSuccessListener(new OnSuccessListener<Void>() {\n\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Edit_Profile.this, \"Profile Updated!\", Toast.LENGTH_SHORT).show();\n }\n\n\n });\n }\n });\n }", "@Override\n public void onSuccess(Uri uri) {\n UserProfileChangeRequest profileupdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n FirebaseUser current_user =FirebaseAuth.getInstance().getCurrentUser();\n String uid = current_user.getUid();\n\n mDatabase= FirebaseDatabase.getInstance().getReference().child(\"Users\").child(name);\n HashMap<String, String> userMap = new HashMap<>();\n userMap.put(\"UID\", uid);\n userMap.put(\"Nombre\", name);\n userMap.put(\"descripción\", \"Hola, estoy usando Trendy Reads.\");\n userMap.put(\"imagen\", sdownload_url);\n mDatabase.setValue(userMap);\n\n currentUser.updateProfile(profileupdate).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful() ) {\n\n showMessage(\"Registro completo\");\n\n updateUI();\n }\n\n else{\n showMessage(\"Ocurrió un error\");\n }\n /* HashMap< String, String > userMap = new HashMap<>();\n userMap.put(\"name\", name);\n userMap.put(\"status\", \"Hola, estoy usando Trendy Reads\");\n userMap.put(\"image\", \"default\");\n\n mDatabase.setValue(userMap);\n */\n }\n });\n\n }", "private void saveing_data_firebase(String recodfile) {\r\n\r\n Uri uri = Uri.fromFile(new File(recodfile));\r\n Mprogress.setTitle(\"Please wait ...\");\r\n Mprogress.setMessage(\"wait for a moment your voice is uploading\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n StorageReference filepath = audiofile.child(uri.getLastPathSegment());\r\n filepath.putFile(uri)\r\n .addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n\r\n String audiouri = task.getResult().getDownloadUrl().toString();\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n Calendar calendar_date = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_date = new SimpleDateFormat(DataManager.DatePattern);\r\n CurrentDate = simpleDateFormat_date.format(calendar_date.getTime());\r\n\r\n DatabaseReference NewNode = FirebaseDatabase.getInstance().getReference().child(\"GlobalChat\").push();\r\n\r\n String push_id = NewNode.getKey();\r\n\r\n\r\n Map<String, Object> globalmap = new HashMap<String, Object>();\r\n globalmap.put(\"message\", audiouri);\r\n globalmap.put(\"name\", Currentuser_name);\r\n globalmap.put(\"time\", CurrentTime);\r\n globalmap.put(\"date\", CurrentDate);\r\n globalmap.put(\"type\", \"Audio\");\r\n globalmap.put(\"MessageKey\", push_id);\r\n globalmap.put(\"MyID\", FirebaseAuth.getInstance().getCurrentUser().getUid());\r\n globalmap.put(\"Uri\", current_image_uri);\r\n globalmap.put(DataManager.UserNameSerach, Currentuser_name.toLowerCase());\r\n\r\n NewNode.updateChildren(globalmap)\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n\r\n fine_user_send_audio_notifaction();\r\n Mprogress.dismiss();\r\n } else {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), e.getMessage().toString(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n\r\n } else {\r\n\r\n Mprogress.dismiss();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n\r\n Mprogress.dismiss();\r\n }\r\n });\r\n }", "private void updateImageToFirebaseStorage() {\n userProfileProgressBar.setVisibility(View.VISIBLE);\n profileImageRef= profileImageRef.child(\"UID \"+currentUserUid).child(\"Current Profile Image\"+\".jpg\");\n if(selectImageUri!=null){\n uploadTask=profileImageRef.putFile(selectImageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n userProfileProgressBar.setVisibility(View.GONE);\n profileImageUrl=taskSnapshot.getDownloadUrl().toString();\n Handler handler=new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n userProfileProgressBar.setProgress(0);\n }\n }, 5000);\n Toast toast=Toast.makeText(getActivity(),\"Your profile pic has been update\",Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n Toast.makeText(getActivity(),profileImageUrl,Toast.LENGTH_SHORT);\n databaseReference.child(\"Users Data\").child(\"Sign Up Info\").child(\"UID \"+currentUserUid).child(\"Profile Image Url\").setValue(profileImageUrl);\n // databaseReference.child(\"Users Data\").child(\"Public Profile Images\").child(\"UID \"+currentUserUid).setValue(profileImageUrl);\n }\n\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast toast=Toast.makeText(getActivity(),\"Unable to Update\",Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress=(100.0*taskSnapshot.getBytesTransferred()/taskSnapshot.getTotalByteCount());\n userProfileProgressBar.setProgress((int)progress);\n }\n });\n\n }\n else{\n userProfileProgressBar.setVisibility(View.GONE);\n }\n }", "static void uploadImage(String phone, Bitmap userPhoto, Uri imageUri, Context context) {\n FirebaseStorage storage = FirebaseStorage.getInstance();\n StorageReference storageReference = storage.getReference();\n final StorageReference filePath = storageReference.child(\"images\").child(phone);\n if(userPhoto == null)\n {\n filePath.putFile(imageUri).addOnSuccessListener(taskSnapshot ->\n Log.d(\"T2T_UPLOAD_IMAGE\", \"Image uploaded successfully\"));\n }\n else\n {\n filePath.putFile(getImageUri(context, userPhoto)).addOnSuccessListener(taskSnapshot ->\n Log.d(\"T2T_UPLOAD_IMAGE\", \"Image uploaded successfully\"));\n }\n }", "private void uploadFromDataStorage() {\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n @SuppressWarnings(\"VisibleForTests\")\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n linkPhoto = String.valueOf(downloadUrl);\n User pelamar = new User(nama, linkPhoto, jenis_pengguna, deskripsi, video);\n myRef.child(\"User\").child(user.getUid()).setValue(pelamar);\n\n }", "private void uploadFromUri(final Uri fileUri, final String videoname , final String link) {\n\n final StorageReference photoRef = mStorageRef.child(videoname\n + \".\" + getFileExtension(fileUri));\n\n uploadTask=photoRef.putFile(fileUri);\n\n uploadTask.addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n if (isCancelled)\n return;\n showProgressNotification(\"Uploading\",\n taskSnapshot.getBytesTransferred(),\n taskSnapshot.getTotalByteCount());\n }\n })\n .continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n // Forward any exceptions\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n\n Log.d(TAG, \"uploadFromUri: upload success\");\n\n // Request the public download URL\n return photoRef.getDownloadUrl();\n }\n })\n .addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(@NonNull final Uri downloadUri) {\n // Upload succeeded\n Log.d(TAG, \"uploadFromUri: getDownloadUri success\");\n\n // [START_EXCLUDE]\n broadcastUploadFinished(downloadUri, fileUri);\n showUploadFinishedNotification(downloadUri, fileUri);\n taskCompleted();\n // [END_EXCLUDE]\n\n //[META_DATA TO DATABASE]\n\n\n StorageReference reference =FirebaseStorage.getInstance().getReference(\"videosThumnails\").child(videoname+\".jpg\");\n reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n Map<String,Object> videoMetaData= new HashMap<>();\n videoMetaData.put(\"videoName\",videoname);\n videoMetaData.put(\"thumbnail\",uri.toString());\n videoMetaData.put(\"videoUrl\",downloadUri.toString());\n videoMetaData.put(\"time\", FieldValue.serverTimestamp());\n\n mDatabaseRef.collection(\"VideoMetadata\").document(videoname)\n .set(videoMetaData);\n//\n }\n });\n\n\n\n Toast.makeText(getApplicationContext(), \"Upload Complete\", Toast.LENGTH_SHORT).show();\n\n }\n }).addOnCanceledListener(new OnCanceledListener() {\n @Override\n public void onCanceled() {\n\n dismissProgressNotification();\n stopSelf();\n }\n });\n\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}", "private void UploadPic(String name){\n if(filepath!=null)\n {\n progressDialog.setTitle(\"Uploading...\");\n progressDialog.show();\n //\"UserProfile/user.jpg\"\n StorageReference imageRef = storageReference.child(firebaseAuth.getCurrentUser().getEmail() + \"/\" + name + \".jpg\" );\n imageRef.putFile(filepath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //Get URL to uploaded Content\n progressDialog.hide();\n Toast.makeText(UserInfoForm.this, \"Upload Successful\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.hide();\n Toast.makeText(UserInfoForm.this, \"Upload Failed\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred()/taskSnapshot.getTotalByteCount());\n progressDialog.setMessage( (int)progress + \"% Uploaded\");\n }\n });\n }\n else{\n Toast.makeText(this, \"Upload Failed\", Toast.LENGTH_SHORT).show();\n }\n }", "private void uploadImageToFirebase(Uri imageUri){\n final StorageReference fileReference = storageReference.child(\"users/\"+fAuth.getCurrentUser().getUid()+\"/profile.jpg\");\n fileReference.putFile(imageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n fileReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n Picasso.get().load(uri).into(profileImage);\n }\n });\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, \"Upload Failed\", Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "private void uploadImageToFirebase(Uri imageUri) {\n final StorageReference fileRef = storageReference.child(\"users/\"+FirebaseAuth.getInstance().getCurrentUser().getUid()+\"/profile.jpg\");\n\n fileRef.putFile(imageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(ProfilActivity.this, \"Image uploaded\", Toast.LENGTH_SHORT).show();\n fileRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Picasso.get().load(uri).into(profilImage);\n }\n }\n );\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(ProfilActivity.this, \"Failed\", Toast.LENGTH_SHORT);\n\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_registro_usuario);\n\n TelefonoEdt = (EditText) findViewById(R.id.TelefonoEdt);\n CorreoEdt = (EditText) findViewById(R.id.CorreoEdt);\n ContrasenaEdt =(EditText) findViewById(R.id.ContrasenaEdt);\n RegistrarBtn = (Button) findViewById(R.id.RegistrarBtn);\n Nombretext = (EditText) findViewById(R.id.Nombre);\n\n mAuth = FirebaseAuth.getInstance();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n btnFotoP =(Button) findViewById (R.id.button);\n fotoP = findViewById (R.id.imageView5);\n\n dDatabase = FirebaseDatabase.getInstance();\n dReference = FirebaseDatabase.getInstance().getReference();\n dStorage = FirebaseStorage.getInstance().getReference();\n sp_rol = findViewById(R.id.sp_rol);\n\n\n RegistrarBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Se asigna los que el usuario ingresan en los EditText a las variables\n telefono = TelefonoEdt.getText().toString();\n correo = CorreoEdt.getText().toString();\n contrasena = ContrasenaEdt.getText().toString();\n nombre = Nombretext.getText().toString();\n\n if(!telefono.isEmpty() && !correo.isEmpty() && !contrasena.isEmpty() && !nombre.isEmpty()){\n if(contrasena.length()>=6 && telefono.length()==10){\n registrarUsuario();\n }else{\n Toast.makeText(ActivityUsuario.this, \"La contraseña debe tener al menos 6 caracteres\", Toast.LENGTH_LONG).show();\n Toast.makeText(ActivityUsuario.this, \"El telefono debe ser de 10 dígitos\", Toast.LENGTH_LONG).show();\n }\n\n }else{\n Toast.makeText(ActivityUsuario.this, \"Completar campos vacíos\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n\n final TextView textViewLogin = findViewById(R.id.textLogin);\n\n textViewLogin.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent login = new Intent(ActivityUsuario.this, MainActivity.class);\n startActivity(login);\n finish();\n }\n });\n\n btnFotoP.setOnClickListener (new View.OnClickListener ( ) {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent (Intent.ACTION_PICK);\n intent.setType (\"image/*\");\n startActivityForResult (intent,GALLERY_INTENT);\n }\n });\n\n }", "private void cargardatos() {\n String link = \"http://192.168.43.30:8080/appLavanderia/subidadatos.php?\";\n\n //Toast.makeText(getApplicationContext(), \"1\", Toast.LENGTH_SHORT).show();\n respuesta = new StringRequest(Request.Method.POST, link, new Response.Listener<String>() {\n\n @Override //En caso que si se pudo hacer la conexion\n public void onResponse(String response) {\n if (response.equalsIgnoreCase(\"registra\")){\n Toast.makeText(getApplicationContext(), \"Registro Exitoso\", Toast.LENGTH_SHORT).show();\n }else{\n Toast.makeText(getApplicationContext(), \"errorr\", Toast.LENGTH_SHORT).show();\n }\n //Toast.makeText(getApplicationContext(), \"2\", Toast.LENGTH_SHORT).show();\n\n }//En dado caso que no se pueda guardar\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"No \"+error.toString(), Toast.LENGTH_SHORT).show();\n\n }\n }){\n @Override //Contiene la informacion para enviar\n protected Map<String, String> getParams() throws AuthFailureError {\n\n String nombre = nombreimagen.getText().toString();\n String descripcion = descricpion.getText().toString();\n String fecha = fechaexp.getText().toString();\n String Foto = ConvertImagenTexto(imagenpro);\n\n //enviar los datos al servidor\n Map<String, String> datosparaenviar = new HashMap<>();\n datosparaenviar.put(\"Nombre\",nombre);\n datosparaenviar.put(\"DescripcionPromo\",descripcion);\n datosparaenviar.put(\"FechaPromo\",fecha);\n datosparaenviar.put(\"ImagenPromo\",Foto);\n return datosparaenviar;\n }\n };\n envio.add(respuesta);\n }", "private void uploadRequest(String msg){\n String path = \"\";\r\n try {\r\n path = getPath(imageUri);\r\n }\r\n catch (URISyntaxException e){\r\n showMsg(\"wrong uri\");\r\n }\r\n String number = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString(\"number\",\"12345\");\r\n\r\n AndroidNetworking.upload(Endpoints.upload_request)\r\n .addMultipartFile(\"file\",new File(path))\r\n .addQueryParameter(\"message\",msg)\r\n .addQueryParameter(\"number\",number)\r\n .setPriority(Priority.HIGH)\r\n .build()\r\n .setUploadProgressListener(new UploadProgressListener() {\r\n @Override\r\n public void onProgress(long bytesUploaded, long totalBytes) {\r\n // do anything with progress\r\n long progress = (bytesUploaded/totalBytes*100);\r\n chooseImageText.setText(String.valueOf(progress));\r\n chooseImageText.setOnClickListener(null);\r\n }\r\n })\r\n .getAsJSONObject(new JSONObjectRequestListener() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n try {\r\n if(response.getBoolean(\"success\")){\r\n showMsg(\"Succes\");\r\n MakeRequestActivity.this.finish();\r\n }\r\n else {\r\n showMsg(response.getString(\"message\"));\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n @Override\r\n public void onError(ANError anError) {\r\n\r\n }\r\n });\r\n\r\n }", "public void criarConta() throws IOException {\n if (userU == null) {\n userU = new Usuario();\n }\n\n\n userU.setNome(nomeEditText.getText().toString());\n userU.setSenha(senhaEditText.getText().toString());\n // user.setFoto( campoFotoObjeto.setImageBitmap(ConversorImagem.converteByteArrayPraBitmap(x));\n userU.setDataNasc(cadastro_data_nasc.getText().toString());\n userU.setPeso(pesoEditText.getText().toString());\n if (selecionouSexoMasculino = radioButtonMasc.isChecked()) {\n userU.setSexo(\"m\");\n } else if (selecionouSexoFem = radioButtonFem.isChecked()) {\n userU.setSexo(\"f\");\n } else\n System.out.println(\"selecione um sexo\");\n UsuarioDAO dao = new UsuarioDAO(getApplicationContext());\n dao.adicionausuario(userU);\n\n Toast.makeText(getApplicationContext(), \"Conta criada com sucesso\", Toast.LENGTH_LONG).show();\n\n //CADASTRANDO NO FIREBASE O USUÁRIO\n cadastrarUsuarioNoFirebase(userU);\n\n Intent voltar = new Intent(CadastroLoginActivity.this, LoginActivity.class);\n startActivity(voltar);\n // userU.setFoto( campoFotoObjeto.setImageBitmap(ConversorImagem.converteByteArrayPraBitmap(x)));\n\n\n if (simpleSwitch1.isChecked()) {\n Intent i = new Intent(getApplicationContext(), CadastroNutricionistraActivity.class);\n\n bundle.putString(\"nome\", nomeEditText.getText().toString());\n bundle.putString(\"senha\", senhaEditText.getText().toString());\n bundle.putString(\"email\", emailEditText.getText().toString());\n //bundle.putString(\"foto\", x.toString());\n i.putExtras(bundle);\n startActivity(i);\n } else {\n Intent a = new Intent(getApplicationContext(), CadastrarMedidasActivity.class);\n bundle.putString(\"nome\", nomeEditText.getText().toString());\n bundle.putString(\"senha\", senhaEditText.getText().toString());\n bundle.putString(\"email\", emailEditText.getText().toString());\n a.putExtras(bundle);\n startActivity(a);\n }\n\n\n /*Intent outratela = new Intent(CadastrarUsuarioActivity.this, CadastroMetricosActivity.class);\n\n\n\n bundle.putString(\"nome\", nomeEditText.getText().toString());\n bundle.putString(\"senha\", senhaEditText.getText().toString());\n outratela.putExtras(bundle);\n startActivity(outratela);*/\n\n }", "public void ImageUrlSendServer(){\n class sendData extends AsyncTask<Void, Void, String> {\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n }\n @Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n }\n @Override\n protected void onProgressUpdate(Void... values) {\n super.onProgressUpdate(values);\n }\n @Override\n protected void onCancelled(String s) {\n super.onCancelled(s);\n }\n @Override\n protected void onCancelled() {\n super.onCancelled();\n }\n @Override\n protected String doInBackground(Void... voids) {\n try {\n OkHttpClient client = new OkHttpClient();\n JSONObject jsonInput = new JSONObject();\n\n jsonInput.put(\"room_id\", roomID);\n jsonInput.put(\"image_url\", stuffRoomInfo.getImageUrl());\n jsonInput.put(\"og_title\", stuffRoomInfo.getOgTitle());\n Log.i(\"db\", stuffRoomInfo.getImageUrl());\n RequestBody reqBody = RequestBody.create(\n MediaType.parse(\"application/json; charset=utf-8\"),\n jsonInput.toString()\n );\n\n Request request = new Request.Builder()\n .post(reqBody)\n .url(imageUrls)\n .build();\n\n Response responses = null;\n responses = client.newCall(request).execute();\n responses.close();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }\n }\n sendData sendData = new sendData();\n sendData.execute();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Error updating Image..\", Toast.LENGTH_SHORT).show();\n\n }", "private void saveAndUpload(String name, String email, Uri photoUri){\n\n // TODO implement save to local DB\n // TODO implement safe upload to Server\n }", "@Test (enabled = true , retryAnalyzer = Retry.class, testName=\"Sanity Tests\", description = \"Test the Upload utility with Android\" ,\n\t\t\tgroups= {\"Sanity Android\"})\t\n\tpublic void uploadImage() throws ParserConfigurationException, SAXException, IOException, InterruptedException{\n\t\tgenMeth.clickId( genMeth, droidData.BTNlsm_ID);\n\t\tgenMeth.clickName( genMeth, \"upload from existing test\");\n\t\tboolean isEmpty = genMeth.checkIsElementVisible(By.name(droidData.NoFilesFound_Name));\n\t\tif ( isEmpty != true){\n\t\t\t\n\t\t\tgenMeth.longPressElement(driver, genMeth, By.id(droidData.ListSecondaryText_ID));\n\t\t\tgenMeth.clickName( genMeth, droidData.BTNdelete_name);\n\t\t\tgenMeth.clickId( genMeth, droidData.BTNdeleteConfirm_id);\n\t\t\tgenMeth.clickName(genMeth, droidData.BTNmoreOptions_Name);\n\t\t\tgenMeth.clickName(genMeth, droidData.BTNrefresh_name);\n\t\t\tisEmpty = genMeth.checkIsElementVisible(By.name(droidData.NoFilesFound_Name));\n\t\t}\n\t\t\n\t\t\n\t\t//Make sure that the folder is empty\n\t\t\n\t// Capture an image\n\t\tgenMeth.clickName( genMeth, droidData.BTNupload_name);\n\t\tgenMeth.clickName( genMeth, droidData.OPTIONcaptureNewPhoto_name);\n\t\tThread.sleep(2000);\n\t\t\n//\t\tgenMeth.clickId( genMeth, droidData.BTNcapturePhoto_LG_id);\n\t\tgenMeth.clickName(genMeth, droidData.BTNcapturePhoto_GooglePhone_Name);\n\t\tgenMeth.clickName(genMeth, droidData.IconReviewDoneForImageGooglePhone_Name);\n\n//\t\tgenMeth.clickName( genMeth, droidData.BTNok_Name);\n\t\tThread.sleep(2000);\n\t\tgenMeth.clickClassName(driver, genMeth, droidData.BTNmoreOptions_ClassName);\n\t\tgenMeth.clickName( genMeth, droidData.BTNrefresh_name);\n\t\t\n\t// Check if the image display in the list\n\t\tWebElement uploadedImage = genMeth.returnId(driver, genMeth, \"com.pogoplug.android:id/text_secondary\");\n\t\tString lastUpload = uploadedImage.getText();\n\t\tString currentUpload= \"None\";\n\t\tThread.sleep(1000);\n\t\t\n\t// Add an if that will verify that the Upload has finished (compare the KB - once not changing it probably has finished or stuck)\t\n\t\tif (lastUpload != currentUpload ){\n\t\t\tgenMeth.clickClassName(driver, genMeth, droidData.BTNmoreOptions_ClassName);\n\t\t\tgenMeth.clickName( genMeth, droidData.BTNrefresh_name);\n\t\t\tlastUpload = uploadedImage.getText();\n\t\t\tThread.sleep(5000);\n\t\t\tgenMeth.clickClassName(driver, genMeth, droidData.BTNmoreOptions_ClassName);\n\t\t\tgenMeth.clickName( genMeth, droidData.BTNrefresh_name);\n\t\t\tcurrentUpload = uploadedImage.getText();\n\t\t\t\n\t\t}\n\t\t\n\t// Open the image & make sure that it displays \n\t\tgenMeth.clickName( genMeth, currentUpload);\n\t// Make sure that the \"Image not available\" text doesn't displayed\n\t\tThread.sleep(3000);\n\t\tgenMeth.isElementInvisibleText( By.name(droidData.ImageNotAvailable_Name), droidData.ImageNotAvailable_Name);\n\t\tgenMeth.takeScreenShotPositive( genMeth, \"testUploadImage\");\n\t\tThread.sleep(1000);\t\n\t//\tgenMeth.clickXpth(driver, genMeth, \"//android.view.View[1]\");\n\t\tgenMeth.clickId( genMeth, droidData.FullScreen_ID);\n\t\tgenMeth.clickId( genMeth, droidData.BTNhome_ID);\n\t// Delete the image\n\t\tgenMeth.longPressElement(driver, genMeth, By.id(droidData.ListSecondaryText_ID));\n//\t\tThread.sleep(5000);\n\t\tgenMeth.clickName( genMeth, droidData.BTNdelete_name);\n\t\tgenMeth.clickId( genMeth, droidData.BTNdeleteConfirm_id);\n\t// Check that the image was deleted\n\t\tgenMeth.isElementInvisible( By.id(droidData.FullScreen_ID));\n\t\tgenMeth.clickClassName(driver, genMeth, droidData.BTNmoreOptions_ClassName);\n\t\tgenMeth.clickName( genMeth, droidData.BTNrefresh_name);\n\t\tgenMeth.isElementVisible(By.name(droidData.NoFilesFound_Name));\n\t\t//Back to start page\n\t\tgenMeth.pressBackButton();\n\t\tgenMeth.clickId(genMeth, droidData.BTNlsm_ID);\n\t\tgenMeth.isTextPresentAndroid(driver, By.name(droidData.CATEGORIES), droidData.CATEGORIES);\n\n\t\t\n\t\t}", "private void uploadToServer(String filePath) {\n myProgressBar.setVisibility(View.VISIBLE);\n File file = new File(filePath);\n RequestBody filename = RequestBody.create(MediaType.parse(\"text/plain\"), file.getName());\n RequestBody requestFile = RequestBody.create(MediaType.parse(getActivity().getContentResolver().getType(imageUri)), file);\n MultipartBody.Part multipartBody = MultipartBody.Part.createFormData(\"file\", file.getName(), requestFile);\n\n Call<Prediction> responseBodyCall = uploadAPIs.uploadImage(\"127.0.0.1\", 12, Build.SERIAL, filename,multipartBody);\n\n responseBodyCall.enqueue(new Callback<Prediction>() {\n @Override\n public void onResponse(Call<Prediction> call, Response<Prediction> response) {\n myProgressBar.setVisibility(View.GONE);\n btn_predict.setVisibility(View.VISIBLE);\n btn_photo.setVisibility(View.VISIBLE);\n if(tv_res.getAnimation()!=null)\n tv_res.getAnimation().cancel();\n float pred = Float.parseFloat(response.body().getPred()) * 100;\n float positive = 100-pred;\n String pos = \"0\";\n String resume=\"\";\n if(pred<50.0){\n tv_res.setTextColor(Color.GREEN);\n tv_res.setText(getString(R.string.allwell));\n tv_resume.setText(getString(R.string.nothingbad));\n resume=getString(R.string.resume_allwell);\n }else{\n pos = \"1\";\n tv_res.setTextColor(Color.RED);\n tv_res.setText(getString(R.string.result_cancer));\n tv_resume.setText(getString(R.string.cancerdetected));\n resume=getString(R.string.resume_allbad);\n }\n tv_pred.setText(rootView.getResources().getString(R.string.cancerdetection) + \" \"+ pred + \"%\");\n tv_total.setText(rootView.getResources().getString(R.string.negativecancer) + \" \"+ positive + \"%\");\n tv_policy.setText(getString(R.string.policy));\n btn_chart.setVisibility(View.VISIBLE);\n String timeStamp =\n new SimpleDateFormat(\"yyyy MM dd - HH:mm:ss\",\n Locale.getDefault()).format(new Date());\n if(newAlbum)\n idalbum = dbPreds.insertAlbum(getString(R.string.newalbum),bodyPart,getRealPathFromURI(getContext(),imageUri));\n else\n dbPreds.UpdateAlbumImage(String.valueOf(idalbum),getRealPathFromURI(getContext(),imageUri));\n\n dbPreds.insertPrediction(pos,String.valueOf(pred),getRealPathFromURI(getContext(),imageUri),timeStamp,resume,String.valueOf(idalbum));\n\n\n\n }\n\n @Override\n public void onFailure(Call<Prediction> call, Throwable t) {\n btn_predict.setVisibility(View.VISIBLE);\n btn_photo.setVisibility(View.VISIBLE);\n Log.d(\"failure\", \"message = \" + t.getMessage());\n Log.d(\"failure\", \"cause = \" + t.getCause());\n\n fails++;\n Toast.makeText(getContext(), t.getMessage(), Toast.LENGTH_LONG).show();\n tv_res.setText(t.getMessage());\n\n tv_res.setText(getString(R.string.analyzing) + fails + \"...\");\n\n\n if(fails<4)\n uploadToServer(getRealPathFromURI(getContext(), imageUri));\n else {\n if(tv_res.getAnimation()!=null)\n tv_res.getAnimation().cancel();\n tv_res.setText(getString(R.string.connection));\n tv_policy.setText(getString(R.string.conn_error_server));\n myProgressBar.setVisibility(View.GONE);\n Snackbar.make(rootView, getString(R.string.connerror), Snackbar.LENGTH_LONG).show();\n }\n }\n });\n }", "public void sendMessage(String str, final String str2) {\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setMessage(\"Sending...\");\n progressDialog.setCancelable(false);\n progressDialog.show();\n final DatabaseReference reference2 = FirebaseDatabase.getInstance().getReference(this.dbname);\n this.uploadId = reference2.push().getKey();\n if (this.filePath != null) {\n StorageReference reference3 = FirebaseStorage.getInstance().getReference(this.dbname);\n final StorageReference child = reference3.child(this.uploadId + \".pdf\");\n final String str3 = str;\n final String str4 = str2;\n final ProgressDialog progressDialog2 = progressDialog;\n child.putFile(this.filePath).addOnSuccessListener((OnSuccessListener) new OnSuccessListener<UploadTask.TaskSnapshot>() {\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n child.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n public void onSuccess(Uri uri) {\n HashMap hashMap = new HashMap();\n hashMap.put(\"sender\", str3);\n hashMap.put(\"message\", str4);\n hashMap.put(\"time\", DateFormat.format(\"dd-MM-yyyy (HH:mm:ss)\", System.currentTimeMillis()).toString());\n hashMap.put(ImagesContract.URL, uri.toString());\n hashMap.put(JamXmlElements.TYPE, DiscussionActivity.this.type);\n hashMap.put(Scopes.PROFILE, DiscussionActivity.this.profile_url);\n hashMap.put(\"receiver\", DiscussionActivity.this.name);\n reference2.child(DiscussionActivity.this.uploadId).setValue(hashMap);\n DiscussionActivity.this.filePath = null;\n progressDialog2.dismiss();\n }\n });\n }\n }).addOnFailureListener((OnFailureListener) new OnFailureListener() {\n public void onFailure(Exception exc) {\n progressDialog.dismiss();\n Toast.makeText(DiscussionActivity.this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n HashMap hashMap = new HashMap();\n hashMap.put(\"sender\", str);\n hashMap.put(\"message\", str2);\n hashMap.put(\"time\", DateFormat.format(\"dd-MM-yyyy (HH:mm:ss)\", System.currentTimeMillis()).toString());\n hashMap.put(ImagesContract.URL, (Object) null);\n hashMap.put(JamXmlElements.TYPE, (Object) null);\n hashMap.put(Scopes.PROFILE, this.profile_url);\n hashMap.put(\"receiver\", this.name);\n reference2.child(this.uploadId).setValue(hashMap);\n progressDialog.dismiss();\n }\n if (this.department.isEmpty()) {\n FirebaseDatabase.getInstance().getReference(\"Staff\").addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot children : dataSnapshot.getChildren()) {\n for (DataSnapshot next : children.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Staff staff = (Staff) next.getValue(Staff.class);\n if (!staff.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(staff.getToken(), staff.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"HODs\").addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot children : dataSnapshot.getChildren()) {\n for (DataSnapshot next : children.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Hod hod = (Hod) next.getValue(Hod.class);\n if (!hod.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(hod.getToken(), hod.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"Principal\").addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Principal principal = (Principal) next.getValue(Principal.class);\n if (!principal.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(principal.getToken(), principal.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n return;\n }\n FirebaseDatabase.getInstance().getReference(\"Staff\").child(this.department).addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Staff staff = (Staff) next.getValue(Staff.class);\n if (staff.getId() != null && !staff.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(staff.getToken(), staff.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"HODs\").child(this.department).addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Hod hod = (Hod) next.getValue(Hod.class);\n if (!hod.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(hod.getToken(), hod.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"Students\").child(this.department).child(this.semester).addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Student student = (Student) next.getValue(Student.class);\n if (!student.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(student.getToken(), student.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n try {\n\n\n imageView.setImageURI(data.getData()); // 이미지 뷰에 삽입\n photoUri = data.getData(); // 이미지 경로 원본\n\n // photostring = getPath(data.getData());\n\n\n\n\n /* StorageReference reference= storageRef.child(System.currentTimeMillis()+ \".\"+getPath(data.getData()));\n Uri file = Uri.fromFile(new File(getPath(data.getData())));\n UploadTask mUploadTask= reference.putFile(file);\n Task<Uri> urlTask = mUploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n\n // Continue with the task to get the download URL\n return storageRef.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n mDatabase.child(\"images\").child(\"imageUrl\").setValue(downloadUri.toString());\n } else {\n // Handle failures\n // ...\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n });*/\n\n\n\n /* photo = getPath(data.getData());\n Log.d(TAG, \"getPath(photoUri)\" + photo + \"\");\n\n\n\n\n\n photostring = photoUri.toString(); // myphotouri String - > Uri로 변환 / 프로필 사진 uri); // myphotouri String - > Uri로 변환 / 프로필 사진 uri\n photostr = photostring;\n*/\n\n\n\n /* // 선택한 이미지에서 비트맵 생성\n InputStream in = getContentResolver().openInputStream(data.getData());\n Bitmap img = BitmapFactory.decodeStream(in);\n in.close();\n // 이미지 표시\n imageView.setImageBitmap(img);*/\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void uploadImageFirebase(String filePath) {\n //compress image here before upload\n //TODO make compression inside task fragment\n String compressFilePath = compressImage(filePath);\n if (compressFilePath == null || compressFilePath.isEmpty()){\n showToast(R.string.error_occurred);\n return;\n }\n File chosenFile = new File(compressFilePath);\n\n Uri file = Uri.fromFile(chosenFile);\n mTaskFragment.uploadPhotoProfile(file);\n }", "public void saveImage(final Bitmap imageBitmap, final SaveImageListener listener) {\n //1. save the image remotly\n firebaseModel.saveImage(imageBitmap, new SaveImageListener() {\n @Override\n public void onComplete(String url) {\n // 2. saving the file localy\n String localName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"cach image: \" + localName);\n saveImageToFile(imageBitmap,localName); // synchronously save image locally\n //listener.oncomplete(url);\n listener.onComplete(url);\n }\n\n @Override\n public void fail() {\n listener.fail();\n }\n });\n }", "public static void uploadFileToServer(Context mContext, okhttp3.Callback callback1, String credential, String url, boolean isShowLoader) {\n if (isShowLoader) {\n Util.progressDialog(mContext, \"loading\");\n }\n MultipartBody multipartBody = requestBody.build();\n\n// if (credential != null && !credential.isEmpty()) {\n// request = new okhttp3.Request.Builder().header(\"Authorization\", credential)\n// .url(url)\n// .post(multipartBody)\n// .build();\n// } else {\n request = new Request.Builder()\n .header(Constants.FLD_CONTENT_TYPE, Constants.VAL_CONTENT_TYPE)\n .header(Constants.FLD_CIPHER, Constants.VAL_CIPHER)\n .header(Constants.FLD_BUILD_VERSION, Constants.VAL_BUILD_VERSION)\n .header(Constants.FLD_DEVICE_TYPE, Constants.VAL_ANDROID)\n .url(url)\n .post(multipartBody)\n .build();\n// }\n//\n\n// OkHttpClient httpClient=new OkHttpClient();\n client.newCall(request).enqueue(callback);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask= uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n\n if(!task.isSuccessful()){\n\n throw task.getException();\n\n }\n ImageUrl = filepath.getDownloadUrl().toString();\n return filepath.getDownloadUrl();\n\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n\n ImageUrl = task.getResult().toString();\n //Toast.makeText(getApplicationContext(),\"Image saved to database\" ,Toast.LENGTH_SHORT).show();\n SaveProductInfo();\n }\n }\n });\n }", "private void uploadImage(byte[] data) {\n final FirebaseUser user = DatabaseContants.getCurrentUser();\n StorageReference profileImageRef = StorageConstants.getUserPhotoRef(user.getUid());\n UploadTask uploadTask = profileImageRef.putBytes(data);\n\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle unsuccessful uploads\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // taskSnapshot.getMetadata() contains file metadata such as size,\n // content-type, and download URL.\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\n .setPhotoUri(downloadUrl)\n .build();\n\n user.updateProfile(profileUpdates)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(TAG, \"User profile updated.\");\n }\n }\n });\n String profileUri = (downloadUrl != null) ? downloadUrl.toString() : \"\";\n DatabaseContants.getCurrentUserRef().child(UserModel.URI_KEY).setValue(profileUri);\n }\n });\n }", "public void saveImageFromURL() {\n Executors.newFixedThreadPool(1).execute(new Runnable() {\n @Override\n public void run() {\n if (context != null) {\n OutputStream os = null;\n InputStream is = null;\n final File file = new File(context.getExternalFilesDir(null), pictureName);\n\n try {\n URL url = new URL(loadUrl);\n httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.setDoInput(true);\n httpConnection.connect();\n is = httpConnection.getInputStream();\n Bitmap bit = BitmapFactory.decodeStream(is);\n os = new FileOutputStream(file);\n bit.compress(compressFormat, compressPercent, os);\n is.close();\n os.close();\n httpConnection.disconnect();\n } catch (IOException e) {\n Log.w(\"ExternalStorage\", \"Error writing \" + file, e);\n } finally {\n if (httpConnection != null) {\n httpConnection.disconnect();\n try {\n os.flush();\n os.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n });\n }", "public void cadastrarUsuario(final Usuario usuario){\n mAuth = ConfiguracaoFirebase.getFirebaseAuth();\n mAuth.createUserWithEmailAndPassword(\n usuario.getEmail(),usuario.getSenha()\n ).addOnCompleteListener(\n this, new OnCompleteListener<AuthResult>() {\n //Verifica exceções e se o usuário se cadastrou\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"Usuário cadastrado com sucesso!\",Toast.LENGTH_SHORT).show();\n finish();\n //Convertendo email em base 64 para ser usado como uidPessoa\n try {\n String identificadorUsuario = Base64Custom.codificarBase64(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setUidPessoa(identificadorUsuario);\n usuario.setNome(FirebaseAuth.getInstance().getCurrentUser().getDisplayName());\n usuario.setEmail(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setPontos(1);\n usuario.salvar();\n cadastrarUsuario(usuario);\n logarUsuario(usuario);\n abrirTelaPrincipal();\n }catch (Exception e){\n e.printStackTrace();\n }\n }else {String excecao = \"\";\n try{\n throw task.getException();\n\n }catch (FirebaseAuthWeakPasswordException e){\n excecao = \"Digite uma senha forte!\";\n }catch (FirebaseAuthInvalidCredentialsException e){\n excecao = \"Por favor, digite um e-mail válido\";\n }catch (FirebaseAuthUserCollisionException e){\n excecao = \"esta conta já está cadastrada\";\n }catch (Exception e){\n excecao = \"Erro ao cadastrar usuário\" + e.getMessage();\n e.printStackTrace();\n }\n Toast.makeText(getApplicationContext(),excecao,Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void saveUserInfo() {\n progressBar.setVisibility(View.VISIBLE);\n //get value from fields and convert them to strings\n name = mNameField.getText().toString();\n phone = mPhoneField.getText().toString();\n mAge = mAgeField.getText().toString();\n about=mAboutField.getText().toString();\n loc= mLocationField.getText().toString();\n int selectId = mRadioGroup.getCheckedRadioButtonId();\n\n\n final RadioButton radioButton =getView().findViewById(selectId);\n\n if(radioButton.getText() == null){\n return;\n }\n\n Map userInfo = new HashMap();\n //write where to put values in database\n userInfo.put(\"Name\",name);\n userInfo.put(\"Phone\",phone);\n userInfo.put(\"Age\",mAge);\n userInfo.put(\"About\",about);\n userInfo.put(\"Location\",loc);\n userInfo.put(\"Preferred Gender\", radioButton.getText().toString());\n\n\n //save to database\n mUserDb.updateChildren(userInfo);\n //checks if image has changed\n if (resultUri != null){\n StorageReference filepath = FirebaseStorage.getInstance().getReference().child(\"profileImages\").child(userId);\n Bitmap bitmap = null;\n\n //pass image we got from image uri\n //create a safety net for any unacounted errors\n try {\n bitmap = MediaStore.Images.Media.getBitmap(getContext().getContentResolver(), resultUri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //compress image to small size\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 20,baos);\n byte[] data = baos.toByteArray();\n\n //try to upload file\n //try on fail to catch error uploads\n UploadTask uploadTask = filepath.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getContext(),\"fail\",Toast.LENGTH_LONG).show();\n }\n });\n\n //do the other case where image upload is successfull\n uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //grap url from the profile image from the database\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downLoadUrl = uriTask.getResult();\n\n Map userInfo = new HashMap();\n //write where to put values in database\n userInfo.put(\"profileImageUrl\",downLoadUrl.toString());\n mUserDb.updateChildren(userInfo);\n\n return;\n }\n });\n\n }else{\n //Toast.makeText(SettingsActivity.this,\"Image load ++\", Toast.LENGTH_LONG).show();\n Toast.makeText(getActivity(),\"Image load ++\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onSuccess(Uri uri) {\n Log.i(\"upload diary\", \"photo in storage\");\n uploadDiary.setPhotoUri(uri.toString());\n db.collection(\"Diary\").document(diary.getTime() + \":\" + diary.getUsername()).set(uploadDiary).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"upload diary\", \"photo succ\");\n }\n });\n }", "private void uploadDados(DadosUpload dadosUpload){\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n viewModel.upload(dadosUpload);\n }\n }, AppConfig.TEMPO_CONSULTA_UPLOAD);\n\n }", "@Override\n\t\tprotected String doInBackground(Void... arg0) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t//\tif (handler != null){\n\t\t //\t\thandler.removeCallbacks(runnable);\n\t\t //\t}\n\t\t\t\t\n\t\t\t\t//handler.postDelayed(runnable, 5000);\n\t\t\t\t\n\t\t\t\t//Log.v(\"upl\", \"ok\");\n\t\t\t\t\n\t\t\t\tupload_data();\n\t\t\t\t//download_data();\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tLog.v(\"error upl noo\", e.toString());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn null;\n\t\t}" ]
[ "0.6606543", "0.6567732", "0.63692236", "0.625462", "0.6196659", "0.61875576", "0.6187185", "0.616301", "0.6106663", "0.60838455", "0.60499746", "0.60310024", "0.60270834", "0.5993655", "0.59557873", "0.59258384", "0.5923099", "0.5885765", "0.58727974", "0.58492213", "0.5847358", "0.5819599", "0.5817573", "0.5800797", "0.5789966", "0.57612705", "0.5729224", "0.5710543", "0.56885916", "0.56768847", "0.5664131", "0.5662084", "0.5661648", "0.56603014", "0.56591594", "0.5658325", "0.56395817", "0.56346047", "0.56287235", "0.56087583", "0.5600532", "0.5595176", "0.55947846", "0.5593871", "0.559323", "0.5589205", "0.557782", "0.55684966", "0.55621266", "0.55616635", "0.5535183", "0.55198485", "0.5505773", "0.5498178", "0.5478571", "0.547474", "0.547194", "0.5468593", "0.5464919", "0.5461627", "0.54561377", "0.54535306", "0.54488087", "0.54464513", "0.54437673", "0.5440021", "0.543691", "0.5433233", "0.5430096", "0.541937", "0.54187435", "0.54170156", "0.54163325", "0.5406963", "0.53982073", "0.5388188", "0.53798234", "0.5371209", "0.5367843", "0.53653634", "0.5358385", "0.53531444", "0.53413516", "0.53361785", "0.53346556", "0.5332616", "0.5330153", "0.5322275", "0.532102", "0.5315777", "0.53078586", "0.5296516", "0.5294513", "0.5292167", "0.52835655", "0.52819073", "0.52807844", "0.5280176", "0.52725655", "0.52622193", "0.52603686" ]
0.0
-1
Creates new form FServer
public FServer() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FormaServer() {\n initComponents();\n srediFormu();\n \n }", "public Server createServer(Server server){\n\t\tlogger.info(\"Creating the Server with the given details\");\n\t\tint id = servers.size()+1+1000;\n\t\tlogger.info(\"The Server id is \"+id);\n\t\tserver.setServerId(id);\n\t\tserver.setServerStatus(ServerStatus.BUILDING);\n\t\tServerBuilder serverBuilder = new ServerBuilder(\"\"+id, server);\n\t\tserverBuilder.start();\n\t\tservers.put(id, server);\n\t\treturn server;\n\t}", "public void addServerManually() {\n JTextField address = new JTextField();\n address.setText(client.getIpv4());\n JTextField port = new JTextField();\n port.setText(\"2019\");\n\n JPanel serverPanel = new JPanel();\n serverPanel.add(new JLabel(\"Address:\"));\n serverPanel.add(address);\n serverPanel.add(Box.createHorizontalStrut(15));\n serverPanel.add(new JLabel(\"Port:\"));\n serverPanel.add(port);\n int result = JOptionPane.showConfirmDialog(frame, serverPanel, \"Please enter the address and the port\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) {\n client.searchForServer(address.getText(), Integer.parseInt(port.getText()));\n }\n }", "public ServerDef() {}", "public ServerForm() throws Exception {\n myServer = new Server(2525);\n\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Não foi possível alterar o LookAndFeel: \" + e);\n }\n setResizable(false);\n initComponents();\n }", "public ServerskaForma() {\n initComponents();\n \n \n \n }", "@PostMapping(\"/new\")\n TokenMessage setupServer(@RequestBody Client client) {\n // Only setup an admin account if one doesn't exist\n if (isSetup()) {\n throw new GromitsException(\"Server already setup\", HttpStatus.FORBIDDEN);\n }\n return new TokenMessage(client.getName(), clientService.createAdmin(client));\n }", "public void registerWithServer();", "@Override\n public void create() {\n setScreen(new ServerScreen(\n new RemoteGame(),\n new SocketIoGameServer(HOST, PORT)\n ));\n }", "public void addServer(String nameServer) { \n Server server = new Server(nameServer);\n serversList.add(server);\n }", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "@FXML\n\tpublic void createClient(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString names = txtClientNames.getText();\n\t\tString surnames = txtClientSurnames.getText();\n\t\tString id = txtClientId.getText();\n\t\tString adress = txtClientAdress.getText();\n\t\tString phone = txtClientPhone.getText();\n\t\tString observations = txtClientObservations.getText();\n\n\t\tif (!names.equals(empty) && !surnames.equals(empty) && !id.equals(empty) && !adress.equals(empty)\n\t\t\t\t&& !phone.equals(empty) && !observations.equals(empty)) {\n\t\t\tcreateClient(names, surnames, id, adress, phone, observations, 1);\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n removerButton = new javax.swing.JButton();\n addButton = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n serverList = new javax.swing.JList();\n serverInfoPane = new javax.swing.JPanel();\n jLabel8 = new javax.swing.JLabel();\n server_textField = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n port_formattedText = new javax.swing.JFormattedTextField();\n jLabel2 = new javax.swing.JLabel();\n account_textField = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n user_textField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n email_textField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n queue_textField = new javax.swing.JFormattedTextField();\n javax.swing.JLabel max_cpu_label = new javax.swing.JLabel();\n max_cpu_formattedText = new javax.swing.JFormattedTextField();\n javax.swing.JLabel cpu_label = new javax.swing.JLabel();\n cpu_formattedText = new javax.swing.JFormattedTextField();\n password_checkBox = new javax.swing.JCheckBox();\n closeButton = new javax.swing.JButton();\n autoConfigSerevrButton = new javax.swing.JButton();\n serverInstallInfoButton = new javax.swing.JButton();\n\n FormListener formListener = new FormListener();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"Setup Servers\"); // NOI18N\n setResizable(false);\n addWindowListener(formListener);\n\n removerButton.setText(\"Remove server\"); // NOI18N\n removerButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nRemove selected server.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n removerButton.setName(\"removerButton\"); // NOI18N\n removerButton.addActionListener(formListener);\n\n addButton.setText(\"Add server\"); // NOI18N\n addButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nAdd new server.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n addButton.setName(\"addButton\"); // NOI18N\n addButton.addActionListener(formListener);\n\n jScrollPane1.setName(\"jScrollPane1\"); // NOI18N\n\n serverList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n serverList.setName(\"serverList\"); // NOI18N\n serverList.addListSelectionListener(formListener);\n jScrollPane1.setViewportView(serverList);\n\n serverInfoPane.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n serverInfoPane.setName(\"serverInfoPane\"); // NOI18N\n serverInfoPane.setLayout(new java.awt.GridLayout(17, 1, 0, 1));\n\n jLabel8.setText(\"Server\"); // NOI18N\n jLabel8.setName(\"jLabel8\"); // NOI18N\n serverInfoPane.add(jLabel8);\n\n server_textField.setBackground(new java.awt.Color(192, 192, 192));\n server_textField.setEditable(false);\n server_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nServer hostname.\\n\\n\\n</font></p><html>\"); // NOI18N\n server_textField.setName(\"server_textField\"); // NOI18N\n serverInfoPane.add(server_textField);\n\n jLabel5.setText(\"Port\"); // NOI18N\n jLabel5.setName(\"jLabel5\"); // NOI18N\n serverInfoPane.add(jLabel5);\n\n port_formattedText.setBackground(new java.awt.Color(192, 192, 192));\n port_formattedText.setEditable(false);\n port_formattedText.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"##0\"))));\n port_formattedText.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nServer port.\\n\\n\\n</font></p><html>\"); // NOI18N\n port_formattedText.setName(\"port_formattedText\"); // NOI18N\n port_formattedText.addPropertyChangeListener(formListener);\n serverInfoPane.add(port_formattedText);\n\n jLabel2.setText(\"Remote Processing Account\"); // NOI18N\n jLabel2.setName(\"jLabel2\"); // NOI18N\n serverInfoPane.add(jLabel2);\n\n account_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nAccount on server that is setup to<br>\\nrun Bayesian Analysis Software.\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n account_textField.setName(\"account_textField\"); // NOI18N\n account_textField.addKeyListener(formListener);\n serverInfoPane.add(account_textField);\n\n jLabel7.setText(\"User\"); // NOI18N\n jLabel7.setName(\"jLabel7\"); // NOI18N\n serverInfoPane.add(jLabel7);\n\n user_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nCurrent user account (on local machine).\\n\\n\\n</font></p><html>\\n\"); // NOI18N\n user_textField.setName(\"user_textField\"); // NOI18N\n user_textField.addKeyListener(formListener);\n serverInfoPane.add(user_textField);\n\n jLabel4.setText(\"Email\"); // NOI18N\n jLabel4.setName(\"jLabel4\"); // NOI18N\n serverInfoPane.add(jLabel4);\n\n email_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nEmail account that will be used<br>\\nto send job status notifications.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n email_textField.setInputVerifier(new EmailInputVerifier());\n email_textField.setName(\"email_textField\"); // NOI18N\n email_textField.addPropertyChangeListener(formListener);\n email_textField.addKeyListener(formListener);\n serverInfoPane.add(email_textField);\n\n jLabel6.setText(\"Queue\"); // NOI18N\n jLabel6.setName(\"jLabel6\"); // NOI18N\n serverInfoPane.add(jLabel6);\n\n queue_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nQueue type for scheduling job on server.<br>\\nQueue type varies from server to server. <br>\\nBy defautl queue is set to None.\\n\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n queue_textField.setInputVerifier(new QueueInputVerifier());\n queue_textField.setName(\"queue_textField\"); // NOI18N\n queue_textField.addPropertyChangeListener(formListener);\n queue_textField.addKeyListener(formListener);\n serverInfoPane.add(queue_textField);\n\n max_cpu_label.setText(\"Maximum CPUs\"); // NOI18N\n max_cpu_label.setName(\"max_cpu_label\"); // NOI18N\n serverInfoPane.add(max_cpu_label);\n\n max_cpu_formattedText.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"\"))));\n max_cpu_formattedText.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nNumber of CPUs for current server.<br>\\nPress TAB button after new value is set<br>\\nto save it.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n max_cpu_formattedText.setName(\"max_cpu_formattedText\"); // NOI18N\n max_cpu_formattedText.setValue(1);\n max_cpu_formattedText.addPropertyChangeListener(formListener);\n max_cpu_formattedText.addKeyListener(formListener);\n serverInfoPane.add(max_cpu_formattedText);\n\n cpu_label.setText(\"Use CPUs\"); // NOI18N\n cpu_label.setName(\"cpu_label\"); // NOI18N\n serverInfoPane.add(cpu_label);\n\n cpu_formattedText.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"##0\"))));\n cpu_formattedText.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\n\\nNumber of server CPUs that will be used <br>\\nin Bayesian analysis calculations.<br>\\nPress TAB button after new value is set<br>\\nto save it.\\n\\n\\n</font></p><html>\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n cpu_formattedText.setName(\"cpu_formattedText\"); // NOI18N\n cpu_formattedText.setValue(1);\n cpu_formattedText.addPropertyChangeListener(formListener);\n cpu_formattedText.addKeyListener(formListener);\n serverInfoPane.add(cpu_formattedText);\n\n password_checkBox.setText(\"Password required \"); // NOI18N\n password_checkBox.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nCheckbox that controls whether a password<br>\\nverificaton is required on the server.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n password_checkBox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);\n password_checkBox.setName(\"password_checkBox\"); // NOI18N\n password_checkBox.addActionListener(formListener);\n serverInfoPane.add(password_checkBox);\n\n closeButton.setFont(new java.awt.Font(\"Lucida Grande\", 1, 18));\n closeButton.setText(\"OK\"); // NOI18N\n closeButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\n\\nSave server information <br>\\nand close the window.\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n closeButton.setName(\"closeButton\"); // NOI18N\n closeButton.addActionListener(formListener);\n\n autoConfigSerevrButton.setText(\"Auto Configure Server\"); // NOI18N\n autoConfigSerevrButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nConfigure server in accordance with the server<br>\\ninstallation settings retrieved over the network<br>\\n\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n autoConfigSerevrButton.setName(\"autoConfigSerevrButton\"); // NOI18N\n autoConfigSerevrButton.addActionListener(formListener);\n\n serverInstallInfoButton.setText(\"View Server Installation Info\"); // NOI18N\n serverInstallInfoButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nRetrieve installation information<br>\\nfor currently selected server. <br>\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n serverInstallInfoButton.setName(\"serverInstallInfoButton\"); // NOI18N\n serverInstallInfoButton.addActionListener(formListener);\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(addButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(removerButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE))\n .add(18, 18, 18)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(serverInfoPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 229, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverInstallInfoButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)\n .add(autoConfigSerevrButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)))\n .add(layout.createSequentialGroup()\n .add(394, 394, 394)\n .add(closeButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 113, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n layout.linkSize(new java.awt.Component[] {autoConfigSerevrButton, serverInfoPane, serverInstallInfoButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.linkSize(new java.awt.Component[] {addButton, jScrollPane1, removerButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(serverInfoPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 479, Short.MAX_VALUE)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(addButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(removerButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createSequentialGroup()\n .add(serverInstallInfoButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(autoConfigSerevrButton)))\n .add(17, 17, 17)\n .add(closeButton))\n );\n\n layout.linkSize(new java.awt.Component[] {addButton, removerButton}, org.jdesktop.layout.GroupLayout.VERTICAL);\n\n pack();\n }", "@Override\n\tpublic void create(UserServer obj) {\n\t\tcreateClient(obj);// INSERE USUARIO NA ENTIDADE CLIENT\n\t\ttry {\n\t\t\tfinal ResultSet result = stat.getGeneratedKeys();\n\t\t\twhile (result.next()) {\n\t\t\t\tobj.setId(result.getInt(\"idclient\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcreatePhone(obj);// INSERE PHONE INFORMADO PELO CLIENT CADASTRADO\n\t\tcreateEmail(obj);// INSERE EMAIL INFORMADO PELO CLIENT CADASTRADO\n\t\tencerrarConexao();\n\t}", "public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }", "public void setServer(Server server) {\n\t\t\r\n\t}", "private static void createServer(final IChordNode node, int localPort)\n throws Exception {\n LocateRegistry.createRegistry(localPort);\n Naming.rebind(\n String.format(\"//localhost:%d/%s\", localPort, CHORDNODE),\n node\n );\n System.out.printf(\n \"New server started on localhost:%d with ID %d%n\",\n localPort, node.getID()\n );\n\n // Make nodes leave cleanly if the JVM is terminated\n Runtime.getRuntime().addShutdownHook( new Thread() {\n public void run() {\n try {\n node.leave();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n } );\n\n\n // Continuously print network information, keeping server alive\n while (true) {\n System.out.printf(\"### %4d ####%n\", node.getID());\n System.out.println( node.ringToString() );\n System.out.println();\n Thread.sleep(3000);\n }\n }", "public void conectServer() {\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n portTextField = new javax.swing.JFormattedTextField();\n serverNameTextField = new javax.swing.JFormattedTextField();\n serverLabel = new javax.swing.JLabel();\n serverLabel1 = new javax.swing.JLabel();\n closeButton = new javax.swing.JButton();\n addButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Add New Server\"); // NOI18N\n setName(\"Form\"); // NOI18N\n\n portTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"##0\"))));\n portTextField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);\n portTextField.setName(\"portTextField\"); // NOI18N\n portTextField.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n portTextFieldPropertyChange(evt);\n }\n });\n\n serverNameTextField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);\n serverNameTextField.setName(\"serverNameTextField\"); // NOI18N\n\n serverLabel.setText(\"Server\");\n serverLabel.setName(\"serverLabel\"); // NOI18N\n\n serverLabel1.setText(\"Port\");\n serverLabel1.setName(\"serverLabel1\"); // NOI18N\n\n closeButton.setText(\"Close\");\n closeButton.setName(\"closeButton\"); // NOI18N\n closeButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n closeButtonActionPerformed(evt);\n }\n });\n\n addButton.setText(\"Add\");\n addButton.setName(\"addButton\"); // NOI18N\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addButtonActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(layout.createSequentialGroup()\n .add(closeButton)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(addButton))\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(serverLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(portTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 158, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))\n .add(26, 26, Short.MAX_VALUE))\n );\n\n layout.linkSize(new java.awt.Component[] {serverLabel, serverLabel1}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.linkSize(new java.awt.Component[] {portTextField, serverNameTextField}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(serverNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(portTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverLabel1))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(closeButton)\n .add(addButton))\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "static private Server createServer(String args[]) throws Exception {\n if (args.length < 1) {\n usage();\n }\n\n int port = PORT;\n int backlog = BACKLOG;\n boolean secure = SECURE;\n\n for (int i = 1; i < args.length; i++) {\n if (args[i].equals(\"-port\")) {\n checkArgs(i, args.length);\n port = Integer.valueOf(args[++i]);\n } else if (args[i].equals(\"-backlog\")) {\n checkArgs(i, args.length);\n backlog = Integer.valueOf(args[++i]);\n } else if (args[i].equals(\"-secure\")) {\n secure = true;\n } else {\n usage();\n }\n }\n\n Server server = null;\n\n if (args[0].equals(\"B1\")) {\n server = new B1(port, backlog, secure);\n } else if (args[0].equals(\"BN\")) {\n server = new BN(port, backlog, secure);\n } else if (args[0].equals(\"BP\")) {\n server = new BP(port, backlog, secure);\n } else if (args[0].equals(\"N1\")) {\n server = new N1(port, backlog, secure);\n } else if (args[0].equals(\"N2\")) {\n server = new N2(port, backlog, secure);\n }\n\n return server;\n }", "@SubscribeEvent\n public void onServerStarting(FMLServerStartingEvent event) {\n // do something when the server starts\n Server server = new Server(event.getServer());\n }", "FORM createFORM();", "@Override\n public void onClick(View view) {\n createServer();\n Snackbar.make(view, \"Adding server done\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "public ServerFactory(ServerModelFactory serverModelFactory) throws RemoteException {\n UnicastRemoteObject.exportObject(this, 0);\n this.serverModelFactory = serverModelFactory;\n lock = new ReentrantLock();\n }", "@Override\n public void addServer(String address, String port, String name) {\n model.addElement(\"Server name: #\" + name + \"# Server address: #\" + address + \"# Server port: #\" + port + \"#\");\n }", "public void create(){}", "public Server() {}", "public void create(HandlerContext context, Management request, Management response) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public Server(int port, String pickrequest) {\n\t\tString[] request = new String[3];\n\t\tif(pickrequest.equals(fcfs){\n\t\t\t\n\t\t}\n\t\tchannel = new TCPChannel(port);\n\t\tchannel.setMessageListener(this);\n\t\t\n\t\t\n\t}", "protected void databaseInsertServer() {\n\t\ttry {\r\n\t\t\t Socket server=new Socket(ipAddress,portNumer);\r\n\t //Socket server=new Socket(\"localhost\",8800);\r\n\t BufferedReader sin=new BufferedReader(new InputStreamReader(server.getInputStream()));\r\n\t PrintStream sout=new PrintStream(server.getOutputStream());\r\n\t BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));\r\n\t \r\n\t String sendMessage =requestMessage+'-'+','+carType+','+balancePost+','+paymentType+\r\n\t \t\t','+phoneno.getText(); \r\n\r\n\t sout.println(sendMessage);\r\n\t \r\n\t String s1=sin.readLine(); \r\n\t String[] splitResult=s1.split(\",\");\r\n\t \r\n\t //System.out.println(\"Return Message:\"+s1);\r\n\t if(splitResult[0].equals(\"Insert Done\")) {\r\n\t \tJOptionPane.showMessageDialog(null,\"New VIP User Is Registered with RFID No: \"+splitResult[1]);\r\n\t }\r\n\t else if(splitResult[0].equals(\"Insert Error\")) {\r\n\t \tJOptionPane.showMessageDialog(null,\"Registration Cannot be done;Try Again\");\r\n\t }\r\n\t /*\r\n\t if(s1.equals(\"Aleadt\")) {\r\n\t \tSystem.out.println(\"\");\r\n\t \t\r\n\t }\r\n\t else {\r\n\t \tSystem.out.println(\"Insert is not done\");\r\n\t }*/\r\n\t // cardno.setText(null);\r\n\t \r\n\t server.close();\r\n\t sin.close();\r\n\t sout.close();\r\n\t stdin.close();\r\n\t } catch (UnknownHostException e) {\r\n\t // TODO Auto-generated catch block\r\n\t e.printStackTrace();\r\n\t } catch (IOException e) {\r\n\t // TODO Auto-generated catch block\r\n\t e.printStackTrace();\r\n\t }\r\n\t}", "@Override\n\tpublic void addServer(String arg0) throws IOException {\n\n\t}", "public void markSrvPortCreate() throws JNCException {\n markLeafCreate(\"srvPort\");\n }", "private void createServerSelectScreen() {\n\t\tserverSelectGroup = new VerticalGroup();\n\t\tserverSelectGroup.setVisible(false);\n\t\t\n\t\tserverSelectGroup.setSize(WIDTH/2, HEIGHT/2);\n\t\tserverSelectGroup.setPosition(WIDTH/2 - serverSelectGroup.getWidth()/2, HEIGHT/2 - serverSelectGroup.getHeight()/2);\n\t\t\n\t\tTextButtonStyle smallStyle = new TextButtonStyle();\n\t\tsmallStyle.font = fontMedium;\n\t\t\n\t\tserverList = new TextButton(\"Server\", smallStyle);\n\t\tserverList.addListener(new InputListener(){\n\t\t\tpublic boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\n\t\t\t\tif(networkManager != null)\n\t\t\t\t\tnetworkManager.connectToServer();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tpublic void touchUp(InputEvent event, float x, float y, int pointer, int button) {\n\t\t\t\tserverSelectGroup.setVisible(false);\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tserverSelectGroup.addActor(serverList);\n\t\tstage.addActor(serverSelectGroup);\n\t}", "public Team create(TeamDTO teamForm);", "public fileServer() {\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createAndShowGUI() {\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n super.windowClosing(e);\n System.out.println(\"closing server...\");\n }\n });\n this.addComponentsToPane(this.getContentPane());\n this.pack();\n this.centreFrameInScreen();\n this.setVisible(true);\n }", "public Server() {\n initComponents();\n }", "public Server() {\n initComponents();\n }", "@NotNull\n public AsynchResult<Server> addServer(AddServerRequestV1 request) {\n // TODO \n // We need first to probe the server to find out some server properties to decide what kind of client to use.\n var client = new HuaweiServerHardwareClient(request.address, request.username, request.password);\n var basicInfo = client.getServerBasicInfo();\n var currentServer = serverRepository.findFirstByAssetInfoSerialNumber(basicInfo.assetInfo.serialNumber);\n if (currentServer != null) {\n throw new ResourceAlreadyExistException();\n }\n var initializedServer = Server.initialize(basicInfo);\n initializedServer = serverRepository.save(initializedServer);\n var context = new AddServerContext();\n return context.run();\n }", "private void sendNameToServer() {\n\n\t\tString textToServer = nameField.getText();\n\n\t\t// Then, we send the input to the server.\n\n\t\tgreetingService.greetServer(nameField.getValue(),\n\t\t\t\tnew AsyncCallback<String>() {\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tresultField.setValue(caught.getMessage());\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\tresultField.setValue(result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public boolean addFileServer(FileServer fileserver) {\n\t\tboolean flag=false;\r\n\t\tfileserver.setId(UUID.randomUUID().toString().toString().replaceAll(\"-\",\r\n\t\t\t\t\"\"));\r\n\t\ttry {\r\n\t\t\tgetHibernateTemplate().save(fileserver);\r\n\t\t\tflag=true;\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "@Override\n\tpublic Boolean validate(CiMiniServerForm f) {\n\t\treturn null;\n\t}", "public static void setServer()\n\t{\n\t\t\n\t\t// also test the second constructor of business plan\n\t\t\n\t\t// creates 2 admin lists and users lists for the depts\n\t\tArrayList<User> usersList1 = new ArrayList<User>();\n\t\tArrayList<User> usersList2 = new ArrayList<User>();\n\t\t\n\t\tArrayList<User> adminList1 = new ArrayList<User>();\n\t\tArrayList<User> adminList2 = new ArrayList<User>();\n\t\t\n\t\t\n\t\t// creates the users and adds to lists\n\t\tUser user1 = new User(\"user1\", \"a\", \"1\", \"CSC\", false);\n\t\tUser user2 = new User(\"user2\", \"b\", \"2\", \"CSC\", false);\n\t\tUser user3 = new User(\"user3\", \"c\", \"3\", \"CSC\", false);\n\t\tusersList1.add(user1);\n\t\tusersList1.add(user2);\n\t\tusersList1.add(user3);\n\t\tUser user4 = new User(\"user4\", \"d\", \"4\", \"English\", false);\n\t\tUser user5 = new User(\"user5\", \"e\", \"5\", \"English\", false);\n\t\tUser user6 = new User(\"user6\", \"f\", \"6\", \"English\", false);\n\t\tusersList2.add(user4);\n\t\tusersList2.add(user5);\n\t\tusersList2.add(user6);\n\t\t\n\t\t// creats the admins and adds to list\n\t\tUser admin1 = new User(\"admin1\", \"a\", \"1\", \"CSC\", true);\n\t\tUser admin2 = new User(\"admin2\", \"b\", \"2\", \"English\", true);\n\t\tadminList1.add(admin1);\n\t\tadminList2.add(admin2);\n\t\t\n\t\tDepartment CSC = new Department();\n\t\tCSC.setDepartmentName(\"CSC\");\n\t\tCSC.setAdmin(adminList1);\n\t\tCSC.setUsers(usersList1);\n\t\tDepartment English = new Department(\"English\", adminList2, usersList2);\n\t\tEnglish.setDepartmentName(\"English\");\n\t\tEnglish.setAdmin(adminList2);\n\t\tEnglish.setUsers(usersList2);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\n\t\t\n\t\tdeptNames.add(\"CSC\");\n\t\tdeptNames.add(\"English\");\n\t\t\n\t\t\n\t\tserv.save(CSC);\n\t\tserv.save(English);\n\t}", "private void setupServerInfo() {\n\t\tlogger.trace(\"setupServerInfo() is called\");\n\t\t\n\t\t Object[] message = {\n\t\t \"Server Port:\", kkServerPortField,\n\t\t };\n\n\t\t int option = JOptionPane.showConfirmDialog(null, message, \"Setup Server\", JOptionPane.OK_CANCEL_OPTION);\n\t\t if (option == JOptionPane.OK_OPTION) {\t\t \n\t\t\t String portStr = kkServerPortField.getText().trim();\n\t\t\t if(Utility.isNumeric(portStr)){\n\t\t\t\t int port = Integer.valueOf(portStr);\n\t\t\t\t kkServerPort = (port > 0 && port < 65536?port:kkServerPort);\n\t\t\t }\n\t\t }\n\t\t kkServerPortField.setText(String.valueOf(kkServerPort));\n\t}", "private void createServerSocket()\r\n {\r\n\t\tDebug.assert(port != 0, \"(Server/105)\");\r\n try {\r\n serverSocket = new ServerSocket(port);\r\n serverSocket.setSoTimeout(TIMEOUT);\r\n\t }\r\n\t catch (IOException e)\r\n\t \t{\r\n log(\"Could not create ServerSocket on port \" + port);\r\n\t \tDebug.printStackTrace(e);\r\n System.exit(-1);\r\n\t }\r\n }", "public void create() {\n\t\t\n\t}", "public ServerWindow(Server server) {\n initComponents();\n this.server = server;\n this.runServer();\n }", "public void addServer(String nameServer, ArrayList<Client> clients) { \n Server server = new Server(nameServer,clients);\n serversList.add(server);\n }", "public Server() {\n\t\tserverMessageArea.setEditable(true);\n\t\tserverFrame.getContentPane().add(new JScrollPane(serverMessageArea), \"Center\");\n\t\tserverFrame.pack();\n\t\t\n\t\t// Restore contents of the previous sessions\n\t\ttry {\n\t\tFile file = new File(\"ServerDB.txt\"); \n\t\t BufferedReader br = new BufferedReader(new FileReader(file)); \n\t\t String st;\n\t\t while ((st = br.readLine()) != null) {\n\t\t System.out.println(st);\n\t\t serverMessageArea.append(st+\"\\n\");\n\t\t }\n\t\t}\n\t\tcatch(Exception exp) {\n\t\t\tSystem.out.println(exp);\n\t\t}\n\t\tserverMessageArea.append(\"\\n\"+LocalDateTime.now()+\"\\nChat Server is running\\n\");\n\t\twriteFile(LocalDateTime.now()+\"\\nChat Server is running\\n\");\n\t}", "public FormPortlet( )\n {\n }", "private void doCreateNewPartner() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"***Hors Management System:: System Administration:: Create new partner\");\n Partner partner = new Partner();\n System.out.print(\"Enter partner username:\");\n partner.setName(sc.nextLine().trim());\n System.out.print(\"Enter partner password;\");\n partner.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Partner>> constraintViolations = validator.validate(partner);\n\n if (constraintViolations.isEmpty()) {\n partner = partnerControllerRemote.createNewPartner(partner);\n System.out.println(\"New partner created successfully\");\n } else {\n showInputDataValidationErrorsForPartner(constraintViolations);\n }\n\n }", "public Server processAction(Long serverId, ApiV1ServerActionDTO action) {\n\n Optional<Server> optionalServer = serverRepository.findById(serverId);\n\n Server server = optionalServer.orElse(null);\n\n if ( server == null ) {\n log.error(\"Server not found\");\n return null;\n }\n\n if (action.getAction().equals(\"CreationRequest\")) {\n if ( server.getCreationRequest() == null ) {\n server.setCreationRequest();\n server = serverRepository.save(server);\n }\n\n } else if (action.getAction().equals(\"CreationReady\") && action.getIpv4() != null) {\n\n if ( server.isBuilding() ) {\n server.setCreationCompleted();\n server.setIpv4(action.getIpv4());\n server.setId_external(action.getId_external());\n server = serverRepository.save(server);\n\n\n // if it is the first server in the location, just make sure that we have\n // the domain record created and that it is pointing to the correct server\n DomainRecord locationDns = digitalOceanGateway.find(server.getSupplierLocation().getLocation());\n if (locationDns == null) {\n digitalOceanGateway.create(server.getSupplierLocation().getLocation(), server);\n } else {\n digitalOceanGateway.update(server.getSupplierLocation().getLocation(), server);\n }\n\n // a user requested the creation of the server. We need to configure the system\n // so this user can start using it.\n if (server.getUser().getId() != -1) {\n\n // notify the user who has requested the server\n Email serverBuilt = Email.builder()\n .with(CoreUtils.getRemoteIp(), CoreUtils.getCookieId().orElse(\"\"))\n .fromSupport()\n .to(server.getUser().getEmail())\n .subject(\"Your VPN location is now ready to use\")\n .withTextBody(\"Thanks for using TheVPNCompany. You have requested to use the location \" + server.getSupplierLocation().getLocation().getName() +\n \" and we have build a new server just for you.\")\n .build();\n\n mailUtil.sendEmail(serverBuilt);\n\n // change the user location\n UserLocation userLocation = userLocationRepository.findByUser(server.getUser()).orElseThrow();\n userLocation.setLocation(server.getSupplierLocation().getLocation());\n userLocationRepository.save(userLocation);\n\n // update DNS\n digitalOceanGateway.updateCNAME(userLocation);\n }\n }\n\n\n\n } else if (action.getAction().equals(\"CreationFailed\")) {\n\n server.setCreationFailed();\n server = serverRepository.save(server);\n\n Email errorEmail = Email.builder()\n .with(CoreUtils.getRemoteIp(), CoreUtils.getCookieId().orElse(\"\"))\n .fromSupport()\n .to(Email.Account.TECH)\n .subject(CoreUtils.getEnvironemnt() + \" - TheVPNCompany Error While Creating Server \" + server.getId())\n .withTextBody(\"An error has happened while creating the server \" + server.getId())\n .build();\n\n mailUtil.sendEmail(errorEmail);\n\n }\n\n return server;\n\n }", "@Override\n void create(Cliente cliente);", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "@POST\t\n\t@Path(\"/\")\n\t@Consumes(\"application/json\")\t\n\tpublic List<Site> createSite(Site newSite){\n\t\tSystem.out.println(\"help\");\n\t\treturn siteDaoObj.createSite(newSite);\t\t\n\t}", "private void save(ActionEvent e){\r\n // Make sure all required fields are filled out before saving\r\n if (formIsValid()){\r\n // Check if client currently exists. If so, modify. Otherwise create new entry.\r\n if (existingClient){\r\n // Modify the existing currentClient holder -- Change the variable to global currentClient cache holder\r\n currClient.setName(NAME_FIELD.getText());\r\n currClient.setAddress1(ADDRESS_1_FIELD.getText());\r\n currClient.setAddress2(ADDRESS_2_FIELD.getText());\r\n currClient.setCity(CITY_FIELD.getText());\r\n currClient.setZip(ZIP_FIELD.getText());\r\n currClient.setCountry(COUNTRY_FIELD.getText());\r\n currClient.setPhone(PHONE_FIELD.getText());\r\n // Update client in database\r\n Client.modifyClient(currClient, currClient.getClientID());\r\n }\r\n // Create new client entry\r\n else { \r\n Client c = new Client (NAME_FIELD.getText(),ADDRESS_1_FIELD.getText(),\r\n ADDRESS_2_FIELD.getText(),CITY_FIELD.getText(),\r\n ZIP_FIELD.getText(),COUNTRY_FIELD.getText(),PHONE_FIELD.getText());\r\n Client.addNewClient(c);\r\n }\r\n\r\n existingClient = false; // reset existing client flag\r\n clearFields(); // remove data from fields\r\n // Return to Appt Mgmt Screen if we came from there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n }\r\n // If forms are not complete throw an alert\r\n else {\r\n AlertBox.display(\"Invalid Submission\", \"Form is missing required information or has invalid input.\"\r\n + \" The following information is required:\\n\"\r\n + \"Name\\nAddress 1\\nCity, State, Country, Zipcode\\nPhoneNumber\"\r\n + \"\\nPlease complete form with valid input and submit again.\");\r\n }\r\n }", "@RequestMapping(value = \"/save\", method = RequestMethod.POST)\n\tpublic String submitCreateOfficeForm(\n\t\t\t@ModelAttribute(MODEL_ATTIRUTE_TypeLocalFondPage) TypeLocalFondPage typeLocalFondPage,\n\t\t\tBindingResult bindingResult, RedirectAttributes attributes,\n\t\t\tModel model) {\n\t\tLOGGER.debug(\"Create Office form was submitted with information: \"\n\t\t\t\t+ typeLocalFondPage);\n\n\t\tSystem.out.println(bindingResult.toString());\n\t\tSystem.out.println(typeLocalFondPage);\n\t\tSystem.out.println(typeLocalFondPage.getNotaireFk());\n\t\tif (bindingResult.hasErrors()) {\n\t\t\tif (notaireService.findAll() != null) {\n\t\t\t\tmodel.addAttribute(MODEL_ATTIRUTE_LIST_Notaire,\n\t\t\t\t\t\tnotaireService.findAll());\n\t\t\t}\n\t\t\treturn TypeLocalFondPage_ADD_FORM_VIEW;\n\t\t}\n\n\t\t// addFeedbackMessage(attributes,\n\t\t// FEEDBACK_MESSAGE_KEY_TypeFamilleCourrierLocal_CREATED,\n\t\t// typeLocalFondPage.getNom());\n\t\ttypeLocalFondPageService.create(typeLocalFondPage);\n\n\t\treturn createRedirectViewPath(TypeLocalFondPage_LIST);\n\t}", "public void setServer(boolean isServer) { this.isServer = isServer; }", "abstract ManagedChannel createChannel(List<ServerInfo> servers);", "FuelingStation createFuelingStation();", "public CreateServerDialog(java.awt.Frame parent, boolean modal) {\r\n super(parent, modal);\r\n initComponents();\r\n }", "private ServerSocket createServerSocket() throws IOException {\n ServerSocket serverSocket = new ServerSocket(Constants.SERVER_PORT);\n System.out.printf(\"Server for chatting started at %d\\n\", Constants.SERVER_PORT);\n return serverSocket;\n }", "private void startServer() {\n mBluetoothGattServer = mBluetoothManager.openGattServer(this, mGattServerCallback);\n if (mBluetoothGattServer == null) {\n Log.w(TAG, \"Unable to create GATT server\");\n return;\n }\n\n mBluetoothGattServer.addService(TimeProfile.createTimeService());\n\n // Initialize the local UI\n updateLocalUi(System.currentTimeMillis());\n mBluetoothGattServer.addService(SecurityProfile.createSecurityService());\n //mBluetoothGattServer.addService(ConfigurationProfile.createConfigurationService());\n\n }", "public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }", "protected void createContents() {\n\n\t\tfinal FileServeApplicationWindow appWindow = this;\n\n\t\tthis.shlFileServe = new Shell();\n\t\tthis.shlFileServe.setSize(450, 300);\n\t\tthis.shlFileServe.setText(\"File Serve - Server\");\n\t\tthis.shlFileServe.setLayout(new BorderLayout(0, 0));\n\n\t\tthis.composite = new Composite(this.shlFileServe, SWT.NONE);\n\t\tthis.composite.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tthis.composite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.composite.setLayout(new FormLayout());\n\n\t\tthis.lblServerTcpPort = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerTcpPort = new FormData();\n\t\tfd_lblServerTcpPort.top = new FormAttachment(0, 10);\n\t\tfd_lblServerTcpPort.left = new FormAttachment(0, 10);\n\t\tthis.lblServerTcpPort.setLayoutData(fd_lblServerTcpPort);\n\t\tthis.lblServerTcpPort.setText(\"Server TCP Port:\");\n\n\t\tthis.serverTCPPortField = new Text(this.composite, SWT.BORDER);\n\t\tthis.serverTCPPortField.setTextLimit(5);\n\t\tthis.serverTCPPortField.addVerifyListener(new VerifyListener() {\n\t\t\t@Override\n\t\t\tpublic void verifyText(VerifyEvent e) {\n\t\t\t\te.doit = true;\n\t\t\t\tfor(int i = 0; i < e.text.length(); i++) {\n\n\t\t\t\t\tchar c = e.text.charAt(i);\n\n\t\t\t\t\tboolean b = false;\n\n\t\t\t\t\tif(c >= '0' && c <= '9') {b = true;}\n\t\t\t\t\telse if(c == SWT.BS) {b = true;}\n\t\t\t\t\telse if(c == SWT.DEL) {b = true;}\n\n\t\t\t\t\tif(b == false) {\n\t\t\t\t\t\te.doit = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tFormData fd_serverTCPPortField = new FormData();\n\t\tfd_serverTCPPortField.top = new FormAttachment(0, 7);\n\t\tfd_serverTCPPortField.right = new FormAttachment(100, -54);\n\t\tfd_serverTCPPortField.left = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tthis.serverTCPPortField.setLayoutData(fd_serverTCPPortField);\n\n\t\tthis.btnStartServer = new Button(this.composite, SWT.NONE);\n\t\tFormData fd_btnStartServer = new FormData();\n\t\tfd_btnStartServer.bottom = new FormAttachment(100, -10);\n\t\tfd_btnStartServer.right = new FormAttachment(100, -10);\n\t\tthis.btnStartServer.setLayoutData(fd_btnStartServer);\n\t\tthis.btnStartServer.setText(\"Start Server\");\n\n\t\tthis.lblServerStatus = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerStatus = new FormData();\n\t\tfd_lblServerStatus.right = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_lblServerStatus.top = new FormAttachment(this.btnStartServer, 5, SWT.TOP);\n\t\tfd_lblServerStatus.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblServerStatus.setLayoutData(fd_lblServerStatus);\n\t\tthis.lblServerStatus.setText(\"Server Status: Stopped\");\n\n\t\tthis.text = new Text(this.composite, SWT.BORDER);\n\t\tFormData fd_text = new FormData();\n\t\tfd_text.top = new FormAttachment(this.serverTCPPortField, 6);\n\t\tthis.text.setLayoutData(fd_text);\n\n\t\tthis.lblHighestDirectory = new Label(this.composite, SWT.NONE);\n\t\tfd_text.left = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tFormData fd_lblHighestDirectory = new FormData();\n\t\tfd_lblHighestDirectory.top = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tfd_lblHighestDirectory.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblHighestDirectory.setLayoutData(fd_lblHighestDirectory);\n\t\tthis.lblHighestDirectory.setText(\"Highest Directory:\");\n\n\t\tthis.button = new Button(this.composite, SWT.NONE);\n\n\t\tfd_text.right = new FormAttachment(100, -54);\n\t\tFormData fd_button = new FormData();\n\t\tfd_button.left = new FormAttachment(this.text, 6);\n\t\tthis.button.setLayoutData(fd_button);\n\t\tthis.button.setText(\"...\");\n\n\t\tthis.grpConnectionInformation = new Group(this.composite, SWT.NONE);\n\t\tfd_button.bottom = new FormAttachment(this.grpConnectionInformation, -1);\n\t\tthis.grpConnectionInformation.setText(\"Connection Information:\");\n\t\tthis.grpConnectionInformation.setLayout(new BorderLayout(0, 0));\n\t\tFormData fd_grpConnectionInformation = new FormData();\n\t\tfd_grpConnectionInformation.bottom = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_grpConnectionInformation.right = new FormAttachment(this.btnStartServer, 0, SWT.RIGHT);\n\t\tfd_grpConnectionInformation.top = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tfd_grpConnectionInformation.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.grpConnectionInformation.setLayoutData(fd_grpConnectionInformation);\n\n\t\tthis.scrolledComposite = new ScrolledComposite(this.grpConnectionInformation, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tthis.scrolledComposite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.scrolledComposite.setExpandHorizontal(true);\n\t\tthis.scrolledComposite.setExpandVertical(true);\n\n\t\tthis.table = new Table(this.scrolledComposite, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tthis.table.setLinesVisible(true);\n\t\tthis.table.setHeaderVisible(true);\n\t\tthis.scrolledComposite.setContent(this.table);\n\t\tthis.scrolledComposite.setMinSize(this.table.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public void setServer(int server) {\n this.server = server;\n }", "public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ServerA(){}", "public static void createAFluidRelayServer(com.azure.resourcemanager.fluidrelay.FluidRelayManager manager) {\n manager\n .fluidRelayServers()\n .define(\"myFluidRelayServer\")\n .withRegion(\"west-us\")\n .withExistingResourceGroup(\"myResourceGroup\")\n .withTags(mapOf(\"Category\", \"sales\"))\n .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))\n .withStoragesku(StorageSku.BASIC)\n .create();\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "private void configureServerInstance() {\n final String myUrl = \"http://68.71.213.88/pepinstances/json\";\n final HttpClient client = HttpClientBuilder.create().build();\n final HttpPost httpPost = new HttpPost(myUrl);\n\n httpPost.addHeader(\"Connection\", \"keep-alive\");\n httpPost.addHeader(\"X-Conversation-Id\", \"BeepBeep123456\");\n httpPost.addHeader(\"Content-Type\", \"application/json\");\n httpPost.addHeader(\"X-API-Version\", \"1\");\n httpPost.addHeader(\"Accept\", \"application/json;apiversion=1\");\n httpPost.addHeader(\"Authorization\", \"BEARER \" + token);\n httpPost.addHeader(\"X-Disney-Internal-PoolOverride-WDPROAPI\",\n \"XXXXXXXXXXXXXXXXXXXXXXXXX\");\n\n final String bodyRequest = \"\";\n HttpEntity entity;\n try {\n entity = new ByteArrayEntity(bodyRequest.getBytes(\"UTF-8\"));\n httpPost.setEntity(entity);\n\n final HttpResponse response = client.execute(httpPost);\n final HttpEntity eResponse = response.getEntity();\n final String responseBody = EntityUtils.toString(eResponse);\n final JSONObject lampStack = new JSONObject(responseBody)\n .getJSONObject(\"LAMPSTACK\");\n if (lampStack.getString(\"LIVE INSTANCE\").equals(\"A\")) {\n setServerInstance(\"A\");\n } else if (lampStack.getString(\"LIVE INSTANCE\").equals(\"B\")) {\n setServerInstance(\"B\");\n } else {\n setServerInstance(\"B\");\n }\n\n } catch (final Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }", "public void addServer(AbstractServer server) {\n // Iterate through all types of CorfuMsgType, registering the handler\n server.getHandler().getHandledTypes()\n .forEach(x -> {\n handlerMap.put(x, server);\n log.trace(\"Registered {} to handle messages of type {}\", server, x);\n });\n }", "@FXML\n private void CreateLobbySubmit(ActionEvent actionEvent) {\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n generateToken();\n\n //while(true){\n try {\n if (!fireStoreController.checkExistence(token)) {}//break;\n } catch (ExecutionException | InterruptedException e) {\n e.printStackTrace();\n }\n generateToken();\n //}\n\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n name = CreateLobbyViewNameTextField.getText();\n try {\n playerController.setPlayer(name);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n fireStoreController.createLobby(token);\n\n\n //Open the lobby view\n goToLobby(actionEvent);\n }", "@Override\r\n\t\t\tpublic void run()\r\n\t\t\t{\n\t\t\t\tString path = \"D:\\\\TUM\\\\3rd Semester\\\\3. Lab Course - Cloud DB [IN0012, IN2106, IN4163]\\\\LatestVersion\\\\gr6\\\\path\";\r\n\t\t\t\tKVServer newServer = new KVServer(\"newNode\", 50001, 30000, 3, \"FIFO\", path, 0,1,1);\r\n\t\t\t}", "@Override\n\tpublic IChatServer createNewRoomServer(IChatroom chatroom) throws RemoteException {\n\t\tChatServer chatServer = new ChatServer(this, chatroom);\n\t\tusr2MdlAdpt.createMiniMVC(chatServer);\n\t\tfor (IChatServer that : chatroom.getChatServers()) {\n\t\t\tthat.joinChatroom(chatServer);\n\t\t\tchatroom.addChatServer(that);\n\t\t}\n\t\taddRoom(chatroom);\n\t\tchatroom.addChatServer(chatServer);\n\t\treturn chatServer;\n\t}", "@Override\n @POST\n @Path(\"/networks\")\n public Response createNetwork() throws Exception {\n URI resourceUri = new URI(\"/1\");\n return Response.created(resourceUri).build();\n }", "private void initiateServerInstance(Socket newSocket){\n KVCommunicationModule com = createCommunicationModule(newSocket);\n KVServerInstance instance = createServerInstance(com, master);\n aliveInstances.add(instance);\n Thread aliveinstancethread = new Thread(instance);\n aliveinstancethread.start();\n aliveinstancethreads.add(aliveinstancethread);\n }", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }", "public void setServerName(String serverName){\n this.serverName = serverName;\n }", "@SuppressWarnings(\"OverridableMethodCallInConstructor\")\n public ServerFrame() {\n initComponents();\n init();\n connection();\n }", "public Server(int port, mainViewController viewController, LogViewController consoleViewController){\n isRunningOnCLI = false;\n this.viewController = viewController;\n this.port = port;\n this.consoleViewController = consoleViewController;\n viewController.serverStarting();\n log = new LoggingSystem(this.getClass().getCanonicalName(),consoleViewController);\n log.infoMessage(\"New server instance.\");\n try{\n this.serverSocket = new ServerSocket(port);\n //this.http = new PersonServlet();\n log.infoMessage(\"main.Server successfully initialised.\");\n clients = Collections.synchronizedList(new ArrayList<>());\n ServerOn = true;\n log.infoMessage(\"Connecting to datastore...\");\n //mainStore = new DataStore();\n jettyServer = new org.eclipse.jetty.server.Server(8080);\n jettyContextHandler = new ServletContextHandler(jettyServer, \"/\");\n jettyContextHandler.addServlet(servlets.PersonServlet.class, \"/person/*\");\n jettyContextHandler.addServlet(servlets.LoginServlet.class, \"/login/*\");\n jettyContextHandler.addServlet(servlets.HomeServlet.class, \"/home/*\");\n jettyContextHandler.addServlet(servlets.DashboardServlet.class, \"/dashboard/*\");\n jettyContextHandler.addServlet(servlets.UserServlet.class, \"/user/*\");\n jettyContextHandler.addServlet(servlets.JobServlet.class, \"/job/*\");\n jettyContextHandler.addServlet(servlets.AssetServlet.class, \"/assets/*\");\n jettyContextHandler.addServlet(servlets.UtilityServlet.class, \"/utilities/*\");\n jettyContextHandler.addServlet(servlets.EventServlet.class, \"/events/*\");\n //this.run();\n } catch (IOException e) {\n viewController.showAlert(\"Error initialising server\", e.getMessage());\n viewController.serverStopped();\n log.errorMessage(e.getMessage());\n }\n }", "private void writeMenu(MessageEvent e) {\n\t\tresponseContent.setLength(0);\r\n\r\n\t\t// create Pseudo Menu\r\n\t\tresponseContent.append(\"<html>\");\r\n\t\tresponseContent.append(\"<head>\");\r\n\t\tresponseContent.append(\"<title>Netty Test Form</title>\\r\\n\");\r\n\t\tresponseContent.append(\"</head>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<body bgcolor=white><style>td{font-size: 12pt;}</style>\");\r\n\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent.append(\"<tr>\");\r\n\t\tresponseContent.append(\"<td>\");\r\n\t\tresponseContent.append(\"<h1>Netty Test Form</h1>\");\r\n\t\tresponseContent.append(\"Choose one FORM\");\r\n\t\tresponseContent.append(\"</td>\");\r\n\t\tresponseContent.append(\"</tr>\");\r\n\t\tresponseContent.append(\"</table>\\r\\n\");\r\n\r\n\t\t// GET\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>GET FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent.append(\"<FORM ACTION=\\\"/formget\\\" METHOD=\\\"GET\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"GET\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\t// POST\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>POST FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent.append(\"<FORM ACTION=\\\"/formpost\\\" METHOD=\\\"POST\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"POST\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with file (only file name will be transmitted): <br> \"\r\n\t\t\t\t\t\t+ \"<input type=file name=\\\"myfile\\\">\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\t// POST with enctype=\"multipart/form-data\"\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>POST MULTIPART FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<FORM ACTION=\\\"/formpostmultipart\\\" ENCTYPE=\\\"multipart/form-data\\\" METHOD=\\\"POST\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"POST\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with file: <br> <input type=file name=\\\"myfile\\\">\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\tresponseContent.append(\"</body>\");\r\n\t\tresponseContent.append(\"</html>\");\r\n\r\n\t\tChannelBuffer buf = ChannelBuffers.copiedBuffer(\r\n\t\t\t\tresponseContent.toString(), CharsetUtil.UTF_8);\r\n\t\t// Build the response object.\r\n\t\tHttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1,\r\n\t\t\t\tHttpResponseStatus.OK);\r\n\t\tresponse.setContent(buf);\r\n\t\tresponse.setHeader(HttpHeaders.Names.CONTENT_TYPE,\r\n\t\t\t\t\"text/html; charset=UTF-8\");\r\n\t\tresponse.setHeader(HttpHeaders.Names.CONTENT_LENGTH,\r\n\t\t\t\tString.valueOf(buf.readableBytes()));\r\n\t\t// Write the response.\r\n\t\te.getChannel().write(response);\r\n\t}", "public Server() {\n\t\tthis.currentMode = Mode.TEST; // TODO: implement\n\t}", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }", "@RequestMapping(value=\"/fpost/new\",method = RequestMethod.POST)\r\n\tpublic ResponseEntity<Fpost> addNewFpost(@RequestBody Fpost fpost) {\r\n\t\tSystem.out.println(\"Adding new fpost\");\r\n\t\t\t\r\n\t\t\tboolean b =fpostDAO.add(fpost);\r\n\t\t\tif(b) System.out.println(\"fpost added Successfully\");\r\n\t\t\telse System.out.println(\"fpost NOT added\");\r\n\t\t\t\r\n\t\treturn new ResponseEntity<Fpost>(fpost, HttpStatus.OK);\r\n\t}", "public Server(){\n\t\t//-- Crear datos default\n\t\tSport s = new Sport(\"Soccer\",\"soccer.png\");\n\t\tSport b = new Sport(\"Basketball\",\"basketball.png\");\n\t\tTeam t1 = s.addTeam(\"Tigres\");\n\t\tTeam t2 = s.addTeam(\"Rayados\");\n\t\ts.addGame(t1,t2);\n\t\t\n\t\tdeportes.add(s);\n\t\tdeportes.add(b);\n\t}", "@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public void saveAndCreateNew() throws Exception {\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tgetControl(\"saveAndCreateNew\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t}", "public void setServer(Server server) {\n this.server = server;\n }", "public static void main(String[] args) {\n\t\tMyServerFrame msf=new MyServerFrame();\n\t\t\n\t}", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "@Override\n @POST\n @Path(\"/servers\")\n @Consumes(\"application/json\")\n public Response registerServer(String requestBody) throws Exception {\n if (log.isTraceEnabled()) {\n log.trace(\"registerServer() started. Data: \" + requestBody);\n }\n\n Server server;\n try {\n JSONObject json = new JSONObject(requestBody);\n String serverURI = json.getString(\"serverURI\");\n Pattern uriPattern = Pattern.compile(\n String.format(\"^/providers/%d/servers/(\\\\d+)$\", provider.getProviderId()));\n Matcher m = uriPattern.matcher(serverURI);\n if (!m.find()) {\n throw new Exception(\"Invalid server URI: \" + serverURI);\n }\n int serverId = Integer.parseInt(m.group(1));\n server = ServerDAO.findById(provider, serverId);\n if (server == null) {\n throw new Exception(String.format(\"Server '%s' not found.\", serverURI));\n }\n }\n catch (Exception e) {\n throw new WebApplicationException(\n Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build());\n }\n\n EntityManager em = PersistenceUtils.getInstance().getEntityManager();\n\n try {\n if (!cluster.getServerList().contains(server)) {\n em.getTransaction().begin();\n server.getClusterList().add(cluster);\n cluster.getServerList().add(server);\n server = em.merge(server);\n cluster = em.merge(cluster);\n em.getTransaction().commit();\n }\n // no problem if server is already registered\n\n URI resourceUri = new URI(String.format(\"/%d\", server.getServerId()));\n log.trace(\"registerServer() finished successfully.\");\n return Response.created(resourceUri).build();\n }\n finally {\n PersistenceUtils.getInstance().closeEntityManager(em);\n }\n }", "public KVServerInstance createServerInstance(KVCommunicationModule com, KVServer master){\n KVServerInstance newInstance = new KVServerInstance(com,master);\n newInstance.changeLogLevel(kv_out.getOutputLevel(),kv_out.getLogLevel());\n return newInstance;\n }", "public static void main(String[] args) {\n\t\ttry { NetworkServerControl server = new NetworkServerControl(InetAddress.getByName(\"localhost\"),1527);\n\t\tserver.start(null);\n\t\tSystem.out.println(\"DB Server Started!\");\n\t\t//server.shutdown();\n\t\t//cn = DriverManager.getConnection(dbURL);\n\t\t} catch(Exception e) {System.out.println(\"Cannot Start DB Server!\"); }\n\t\t\n\t\tfinal JettyServer jettyServer = new JettyServer();\n\t\tString jetty_home = System.getProperty(\"jetty.home\",\".\");\n Server server = new Server(8080);\n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath(\"/\");\n //webapp.setWar(jetty_home+\"/target/vrscloud-1.war\");\n webapp.setWar(\"ROOT.war\");\n server.setHandler(webapp);\n // server.start();\t\n\t\t\n\t\t\n jettyServer.setHandler(webapp);\t\n\t\t\n\t\tRunnable runner = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew ServerRunner(jettyServer);\n\t\t\t}\n\t\t};\n\t\tEventQueue.invokeLater(runner);\n\t}" ]
[ "0.65079445", "0.6252382", "0.6058536", "0.5895915", "0.570224", "0.57017875", "0.56390744", "0.5624969", "0.55524683", "0.5464535", "0.5432163", "0.53924924", "0.5369015", "0.53545177", "0.5284453", "0.52795404", "0.52762854", "0.52684736", "0.5249842", "0.52494293", "0.523452", "0.5224729", "0.5214623", "0.5212501", "0.5207894", "0.5185877", "0.51803404", "0.5174857", "0.51747984", "0.51727444", "0.5171984", "0.5165673", "0.5165379", "0.5151687", "0.51508677", "0.51432455", "0.5139356", "0.5136349", "0.5136349", "0.5116885", "0.5106938", "0.5103144", "0.51027983", "0.509179", "0.5087889", "0.5082423", "0.50818443", "0.5075442", "0.5074869", "0.5074274", "0.50679874", "0.50673205", "0.5060539", "0.5057314", "0.5050547", "0.50483155", "0.50462765", "0.5044928", "0.5039653", "0.5037858", "0.5036316", "0.5033633", "0.50319695", "0.50315964", "0.5026329", "0.5025804", "0.5024373", "0.50209975", "0.5016209", "0.5014317", "0.5010692", "0.5010117", "0.5008259", "0.5006575", "0.50053525", "0.5004955", "0.5004247", "0.50040084", "0.50024945", "0.49997315", "0.49904552", "0.4985549", "0.4981599", "0.4981313", "0.49772376", "0.4975982", "0.49734852", "0.49723718", "0.4966094", "0.49610606", "0.49608436", "0.49593487", "0.49541253", "0.49540728", "0.49472302", "0.49458182", "0.49449912", "0.49435255", "0.49426025", "0.49411404" ]
0.5982151
3
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jBtnStart = new javax.swing.JButton(); jBtnStop = new javax.swing.JButton(); jPanelUsers = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTableUsers = new javax.swing.JTable(); jScrollPane2 = new javax.swing.JScrollPane(); jTextAreaStatus = new javax.swing.JTextArea(); jMenuBar1 = new javax.swing.JMenuBar(); jMenuConfig = new javax.swing.JMenu(); jMenuItemDatabase = new javax.swing.JMenuItem(); jMenuItemPort = new javax.swing.JMenuItem(); jMenuUser = new javax.swing.JMenu(); jMenuItemUserNew = new javax.swing.JMenuItem(); jMenuItemUserEdit = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jBtnStart.setText("Start"); jBtnStop.setText("Stop"); jPanelUsers.setBorder(javax.swing.BorderFactory.createTitledBorder("Logged in users")); jTableUsers.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(jTableUsers); javax.swing.GroupLayout jPanelUsersLayout = new javax.swing.GroupLayout(jPanelUsers); jPanelUsers.setLayout(jPanelUsersLayout); jPanelUsersLayout.setHorizontalGroup( jPanelUsersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelUsersLayout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 674, Short.MAX_VALUE) .addContainerGap()) ); jPanelUsersLayout.setVerticalGroup( jPanelUsersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); jTextAreaStatus.setColumns(20); jTextAreaStatus.setRows(5); jScrollPane2.setViewportView(jTextAreaStatus); jMenuConfig.setText("Config"); jMenuItemDatabase.setText("Database"); jMenuConfig.add(jMenuItemDatabase); jMenuItemPort.setText("Port"); jMenuConfig.add(jMenuItemPort); jMenuBar1.add(jMenuConfig); jMenuUser.setText("User"); jMenuItemUserNew.setText("New"); jMenuUser.add(jMenuItemUserNew); jMenuItemUserEdit.setText("Edit"); jMenuUser.add(jMenuItemUserEdit); jMenuBar1.add(jMenuUser); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane2) .addGroup(layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jBtnStop, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jBtnStart, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanelUsers, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jBtnStart) .addComponent(jBtnStop)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelUsers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public vpemesanan1() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public CovidGUI(){\n initComponents();\n }" ]
[ "0.73197734", "0.72908777", "0.72908777", "0.72908777", "0.72870827", "0.7248368", "0.7213462", "0.7208004", "0.7195763", "0.7189973", "0.7184436", "0.7159332", "0.71478266", "0.709268", "0.7080727", "0.7057287", "0.6986775", "0.6977119", "0.69554067", "0.69548035", "0.6945748", "0.69436246", "0.6936225", "0.69309264", "0.6927764", "0.6925464", "0.69240505", "0.6911828", "0.69114214", "0.6893614", "0.68917346", "0.6891525", "0.6891501", "0.6889125", "0.68829834", "0.6882533", "0.68808794", "0.687905", "0.687687", "0.68740726", "0.68708014", "0.68595254", "0.68561274", "0.68560076", "0.6854643", "0.6854604", "0.6853724", "0.685311", "0.685311", "0.6844816", "0.6836794", "0.6835743", "0.68294543", "0.6828841", "0.682637", "0.68245006", "0.6823792", "0.68175477", "0.6817179", "0.6811031", "0.68096155", "0.6809008", "0.68087083", "0.68081945", "0.6801884", "0.6795609", "0.6793828", "0.67930275", "0.67915165", "0.6789997", "0.6788734", "0.6788487", "0.67816335", "0.67663425", "0.6765744", "0.67648494", "0.6757314", "0.6755897", "0.67526966", "0.6750367", "0.67429197", "0.67399955", "0.6736908", "0.6736084", "0.6734342", "0.6726562", "0.67264515", "0.67205596", "0.6716381", "0.67154187", "0.67150515", "0.6709329", "0.6708348", "0.67050624", "0.67021835", "0.6700595", "0.6699073", "0.6698866", "0.66942847", "0.6690904", "0.66897583" ]
0.0
-1
End of variables declaration//GENEND:variables
public javax.swing.JMenuItem getjMenuItemDatabase() { return jMenuItemDatabase; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo21779D() {\n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21780E() {\n }", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6944a() {\n }", "public static void listing5_14() {\n }", "public void mo1405e() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "void mo57277b();", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21784I() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void yy() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "static void feladat4() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.58814824", "0.5854075", "0.5851759", "0.58514243", "0.58418584", "0.58395296", "0.5835063", "0.582234", "0.58090156", "0.5802706", "0.5793836", "0.57862717", "0.5784062", "0.5783567", "0.5782131", "0.57758564", "0.5762871", "0.5759349", "0.5745087", "0.57427835", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.57326084", "0.57301426", "0.57266665", "0.57229686", "0.57175463", "0.5705802", "0.5698347", "0.5697827", "0.569054", "0.5689405", "0.5686434", "0.56738997", "0.5662217", "0.56531453", "0.5645255", "0.5644223", "0.5642628", "0.5642476", "0.5640595", "0.56317437", "0.56294966", "0.56289655", "0.56220204", "0.56180173", "0.56134313", "0.5611337", "0.56112075", "0.56058615", "0.5604383", "0.5602629", "0.56002104", "0.5591573", "0.55856615", "0.5576992", "0.55707216", "0.5569681", "0.55570376", "0.55531484", "0.5551123", "0.5550893", "0.55482954", "0.5547471", "0.55469507", "0.5545719", "0.5543553", "0.55424106", "0.5542057", "0.55410767", "0.5537739", "0.55269134", "0.55236584", "0.55170715", "0.55035424", "0.55020875" ]
0.0
-1
Initailizer for a TimestampOperatorNode.
public void init( Object date, Object time) { leftOperand = (ValueNode) date; rightOperand = (ValueNode) time; operator = "timestamp"; methodName = "getTimestamp"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TimestampOperatorNode(ValueNode date,\n ValueNode time,\n ContextManager cm)\n {\n super(cm);\n leftOperand = date;\n rightOperand = time;\n operator = \"timestamp\";\n methodName = \"getTimestamp\";\n }", "public Timestamp() {}", "private TimestampUtils(){}", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "public Annotations.Builder setInitTimestamp(final ZonedDateTime value) {\n _initTimestamp = value;\n return this;\n }", "@Override\n\tpublic void visit(TimestampValue arg0) {\n\n\t}", "@Override\n\tpublic void visit(TimestampValue arg0) {\n\t\t\n\t}", "public Timestamp() {\n makeNow();\n }", "public DefaultTimestampFieldComponentFactory() {\r\n\t\tsuper();\r\n\t}", "public TimeBasedRollingPolicy() {\r\n super();\r\n }", "public void opInitFrom(LogicalOp logicalOperator) {\n \twindowAttribute = ((Bucket) logicalOperator).getWindowAttr();\n \twindowType = ((Bucket) logicalOperator).getWindowType();\t\t\n \trange = ((Bucket) logicalOperator).getWindowRange();\n \tslide = ((Bucket) logicalOperator).getWindowSlide();\n \twidName = ((Bucket) logicalOperator).getWid();\n \tstart = ((Bucket) logicalOperator).getStarttime();\n \tae = new AtomicEvaluator (windowAttribute.getName());\n \t\n }", "@Override\n protected void initialize() {\n startT = Timer.getFPGATimestamp();\n }", "public void setTimestamp() {\n timestamp = System.nanoTime();\n }", "public ValueNode getClone() throws StandardException {\n TimestampOperatorNode newTS = (TimestampOperatorNode) getNodeFactory().getNode(\n C_NodeTypes.TIMESTAMP_OPERATOR_NODE,\n leftOperand,\n rightOperand,\n getContextManager());\n\n newTS.copyFields(this);\n return newTS;\n }", "public PriorityScheduler() {\n }", "public ExecutionTimestamp(String name, String sessionID, Date timestamp, TimestampType type) {\n\t\tthis.name = name;\n\t\tthis.sessionID = sessionID;\n\t\tthis.timestamp = timestamp;\n\t\tthis.type = type;\n\t}", "public void initialize (org.apache.spark.streaming.Time time) { throw new RuntimeException(); }", "String getTimestampFunction();", "public PriorityScheduler() {\n\t}", "public TimeStamp(Element timestampElement) throws Exception {\r\n this(timestampElement, true);\r\n }", "public TOpLogs() {\n this(DSL.name(\"t_op_logs\"), null);\n }", "public TransactionTimestamp() {\n\t\tlatestTimestamp = new AtomicLong(0);\n\t}", "public TimeMap() {\n\n }", "public void setValidTo (Timestamp ValidTo);", "public abstract long startTimestamp();", "public MonModuleInfo init(MNode Node, String param) {\n logger.log(Level.INFO, \"Timer Task Scheduled \");\n this.Node = Node;\n return info;\n }", "protected abstract void scheduler_init();", "public TimeConstraint() {\n\t\t// Start of user code constructor for TimeConstraint)\n\t\tsuper();\n\t\t// End of user code\n\t}", "public ALSSLRTAStarNode(Node node, int timeStamp) {\n this.node = node;\n this.timeStamp = timeStamp;\n }", "public void init() {\n\ttsp.init();\n }", "public MetalNode(int date1){\n date = date1;\n }", "public TimeStamp(){\n\t\tdateTime = LocalDateTime.now();\n\t}", "private Builder(com.alibaba.dts.formats.avro.Timestamp other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.timestamp)) {\n this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.millis)) {\n this.millis = data().deepCopy(fields()[1].schema(), other.millis);\n fieldSetFlags()[1] = true;\n }\n }", "protected Temporal(final Node n) throws RIFCSException {\n super(n, Constants.ELEMENT_TEMPORAL);\n initStructures();\n }", "public void init()\r\n {\r\n m_active = false;\r\n m_entryTimes = new HashMap<String, Long>();\r\n m_tsm = BotAction.getBotAction().getTSM();\r\n m_tsm.setOperatorLevel(ER_LEVEL);\r\n registerSettings();\r\n m_tsm.addTSChangeListener(this);\r\n m_botAction.setPlayerPositionUpdating(500);\r\n }", "public CustomDateSerializer() {\n this(null);\n }", "private void addGeneratedTimestamp() {\n\t\tif (getConfig().skipGeneratedTimestamps()) {\n\t\t\treturn;\n\t\t}\n\t\tString value = Processor.class.getName();\n\t\tString date = new SimpleDateFormat(\"dd MMM yyyy hh:mm\").format(new Date());\n\t\tthis.pathBindingClass.addImports(Generated.class);\n\t\tthis.pathBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t\tthis.rootBindingClass.addImports(Generated.class);\n\t\tthis.rootBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t}", "public DateCheckTag() { }", "public void setOperatorTime(Date operatorTime) {\n this.operatorTime = operatorTime;\n }", "@PostConstruct\n public void init() {\n prevBatchTime = transients.now();\n }", "public OperatorNode(final Operator operator,\n final int pos) {\n super(pos);\n this.operator = operator;\n }", "public TimeSeriesTally() {\n\tsuper();\n\tfPrevTime = 0.0;\n }", "public abstract long getStartTimestamp();", "public OperatorNode(OperatorTable opers) {\n this.opers = opers;\n }", "@Override\r\n\tpublic synchronized void initialize(OperatorContext context) throws Exception {\r\n\t\tsuper.initialize(context);\r\n\t\t/*\r\n\t\t * Set appropriate variables if the optional error output port is\r\n\t\t * specified. Also set errorOutputPort to the output port at index 0\r\n\t\t */\r\n\t\tif (context.getNumberOfStreamingOutputs() == 2) {\r\n\t\t\thasErrorPort = true;\r\n\t\t\terrorOutputPort = getOutput(1);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif (checkConnection) {\r\n\t\t\tstartCheckConnection(context);\r\n\t\t}\r\n\r\n\t\tif (idleSessionTimeOutMinute > 0) {\r\n\t\t\tstartidleSessionTimeOutThread(context);\r\n\t\t}\r\n\t\t\r\n\t\t// set the data output port\r\n\t\tdataOutputPort = getOutput(0);\r\n\r\n\t\t// Initiate parameter sqlStatusAttr\r\n\t\tinitSqlStatusAttr();\r\n\r\n\t\t// Initiate PreparedStatement\r\n\t\tinitPreparedStatement();\r\n\r\n\t\t// initialize metrics\r\n\t\tinitMetrics(context);\r\n\t}", "protected AddTranscriptNodeModel() {\r\n this(1,2);\r\n }", "public DefaultTimestampFieldComponentFactory(boolean dateEnabled, boolean timeEnabled, Inifile ini) {\r\n\t\tsuper();\r\n\t\tthis.dateEnabled = dateEnabled;\r\n\t\tthis.ini = ini;\r\n\t\tthis.timeEnabled = timeEnabled;\r\n\t}", "abstract Long getStartTimestamp();", "public TemporalStateNode(){ \n\t\t\tchilds=new HashMap<String,TemporalStateNode>();\n\t\t\t//transitions=new HashMap<StateNode,Transition>();\n\t\t\t//transitions=new HashSet<Transition>();\n\t\t\tstates=new ArrayList<TemporalState>();\n\t\t\t//state=new State();\n\t\t\t//state=null;\n\t\t}", "protected void init()\n {\n Timestamp now = new Timestamp(System.currentTimeMillis());\n timestampCreated = now;\n timestampModified = now;\n createdByAgent = AppContextMgr.getInstance() == null? null : (AppContextMgr.getInstance().hasContext() ? Agent.getUserAgent() : null);\n modifiedByAgent = null;\n }", "public interface Timestampable {\r\n \r\n /**\r\n * Property which represents createdDate.\r\n */\r\n static final String PROP_CREATED_DATE = \"createdDate\";\r\n \r\n /**\r\n * Property which represents modifiedDate.\r\n */\r\n static final String PROP_MODIFIED_DATE = \"modifiedDate\";\r\n \r\n\r\n \r\n Date getCreatedDate();\r\n \r\n void setCreatedDate(Date createdDate);\r\n \r\n Date getModifiedDate();\r\n \r\n void setModifiedDate(Date modifiedDate);\r\n\r\n}", "private void addAnalysisTimestamp()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_timestamp\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n start.addAttribute(\"id\", \"1\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n if (mimicXpress)\r\n {\r\n start = new SimpleStartElement(\"xpressratio_timestamp\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n add(start);\r\n\r\n end = new SimpleEndElement(\"xpressratio_timestamp\");\r\n add(end);\r\n\r\n addNewline();\r\n }\r\n\r\n end = new SimpleEndElement(\"analysis_timestamp\");\r\n add(end);\r\n }", "public ChainOperator(){\n\n }", "public CronJobTrigger() {\n init();\n }", "public DateAxis() { this(null); }", "public void setTimestamp(Integer timestamp) {\n this.timestamp = timestamp;\n }", "public void setTimestamp(Date timestamp) {\r\n this.timestamp = timestamp;\r\n }", "protected Time() {\n\t}", "public Date getOperatorTime() {\n return operatorTime;\n }", "public void setTimestamp(Timestamp timestamp) {\n\t\tthis.timestamp = timestamp;\n\t}", "public TimestampDto(boolean confirm_status, String address, long timestamp, String transaction)\n {\n this.confirm_status = confirm_status;\n this.timestamp = timestamp;\n this.address = address;\n this.transaction = transaction;\n }", "net.opengis.gml.x32.TimeInstantPropertyType addNewBegin();", "public TRIP_Sensor () {\n super();\n }", "public interface Timestamper {\n\n /*\n45: * Connects to the TSA and requests a timestamp.\n46: *\n47: * @param tsQuery The timestamp query.\n48: * @return The result of the timestamp query.\n49: * @throws IOException The exception is thrown if a problem occurs while\n50: * communicating with the TSA.\n51: */\n public TSResponse generateTimestamp(TSRequest tsQuery)\n throws IOException;\n }", "public OrderByNode() {\n super();\n }", "public Scheduler()\r\n {\r\n town = new Graph<String>();\r\n }", "public Time_table() {\n initComponents();\n }", "public TimeSignatureRetriever ()\r\n {\r\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public void setTimestamp(Date timestamp) {\n this.timestamp = timestamp;\n }", "public void setDateTrx (Timestamp DateTrx);", "public void setDateTrx (Timestamp DateTrx);", "public abstract Timestamp getDate();", "public void setDateStart (Timestamp DateStart);", "public Long getTimestampStart();", "public static void init() \r\n {\r\n currentTime = getTime(); \r\n lastTime = getTime(); \r\n }", "@Override\n protected void initialize() {\n m_oldTime = Timer.getFPGATimestamp();\n m_oldError= m_desiredDistance;\n }", "@Override\n public void initialize() {\n time = 0;\n //noinspection ConstantConditions\n this.runningTasks.addAll(getInitialNode().getTasks());\n for (Node node : nodes) {\n node.initialize();\n }\n }", "@Override\n\tpublic void initDate() {\n\n\t}", "public Scheduler()\n {\n this.id = \"\"+ hashCode();\n register();\n }", "@Override\n\tpublic void visit(DateTimeLiteralExpression arg0) {\n\t\t\n\t}", "public Geotemporal() {\n }", "public Timestamp getDateStart();", "public TimeTravel() {\r\n\t\t}", "public Event(Long timestamp) {\r\n \tthis.timestamp = timestamp;\r\n }", "@Override\n public void ptt(int value, int timestamp) {\n }", "public ClockTime(Timestamp d) {\n super(Property.CLOCKTIME_PROPERTY);\n calValue = Calendar.getInstance();\n calValue.setTimeInMillis(d.getTime());\n normalize();\n }", "@Test\n public void testDefaultTemporalAttributes() {\n GradoopId edgeId = GradoopId.get();\n GradoopId sourceId = GradoopId.get();\n GradoopId targetId = GradoopId.get();\n String label = \"x\";\n\n TemporalEdge temporalEdge = factory.initEdge(edgeId, label, sourceId, targetId, null, null,\n null, null);\n\n assertEquals(TemporalElement.DEFAULT_TIME_FROM, temporalEdge.getValidFrom());\n assertEquals(TemporalElement.DEFAULT_TIME_TO, temporalEdge.getValidTo());\n }", "public void setDateOrdered (Timestamp DateOrdered);", "public static ExecutionTimestamp beginTimestamp(String name) {\n\t\treturn new ExecutionTimestamp(name, UUIDGen.getCustomUUID(), new Date(), TimestampType.Start);\n\t}", "public TimeSeriesPoint setTimestamp(OffsetDateTime timestamp) {\n this.timestamp = timestamp;\n return this;\n }", "public HashPrefixTree(HPTKeyComparator<K> comparator) {\n this(comparator, (int)System.currentTimeMillis());\n }", "@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }", "public void setValidFrom (Timestamp ValidFrom);", "private DateTimeAdjusters() {\n\n }", "@Override\n\tpublic void visit(TimeKeyExpression arg0) {\n\t\t\n\t}", "default Stream<Pair<T, Long>> withTimestamp() {\n return withTimestamp(null);\n }", "@Override\n protected void doInit() {\n super.doInit();\n this.startTime = (String) this.getRequest().getAttributes().get(\"startTime\");\n this.endTime = (String) this.getRequest().getAttributes().get(\"endTime\");\n this.interval = (String) this.getRequest().getAttributes().get(\"samplingInterval\");\n }", "public Visit() {\n\t\t//dateTime = LocalDateTime.now();\n\t}", "public PubDateFilter() {\r\n this(System.currentTimeMillis());\r\n }" ]
[ "0.6506133", "0.62890583", "0.60473204", "0.56823343", "0.5608165", "0.55728906", "0.5565516", "0.553304", "0.5446869", "0.5327038", "0.52565044", "0.52443445", "0.5216648", "0.5180396", "0.51667464", "0.5151367", "0.51256466", "0.5121638", "0.5114044", "0.5069941", "0.5022772", "0.4968484", "0.49678978", "0.4946632", "0.49179465", "0.49064386", "0.49062055", "0.4899239", "0.48856276", "0.48737848", "0.48391193", "0.48269835", "0.4819574", "0.47745937", "0.47642317", "0.47591445", "0.46993616", "0.46952283", "0.4685985", "0.46773195", "0.46674544", "0.46556455", "0.46460304", "0.4634644", "0.4633317", "0.4622143", "0.46201694", "0.4619249", "0.4611955", "0.4611476", "0.46064705", "0.460496", "0.45965627", "0.45942405", "0.4584559", "0.45778805", "0.45744628", "0.45675495", "0.45587698", "0.45569608", "0.4554887", "0.4547493", "0.4544569", "0.45382988", "0.45381373", "0.453786", "0.4535323", "0.45310473", "0.45308807", "0.45286137", "0.4526484", "0.4526484", "0.45246977", "0.45242187", "0.4524202", "0.45228973", "0.45220572", "0.45189992", "0.45171103", "0.4516332", "0.45127508", "0.45107955", "0.45102566", "0.4505513", "0.44952738", "0.44949389", "0.4481958", "0.44769034", "0.44681135", "0.4467706", "0.4466375", "0.4463841", "0.44569856", "0.44433564", "0.44414383", "0.44378394", "0.44335577", "0.44268832", "0.44254965", "0.44246995" ]
0.65944254
0
Bind this expression. This means binding the subexpressions, as well as figuring out what the return type is for this expression.
@Override public ValueNode bindExpression( FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregateVector) throws StandardException { leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector); rightOperand = rightOperand.bindExpression(fromList, subqueryList, aggregateVector); //Set the type if there is a parameter involved here if (leftOperand.requiresTypeFromContext()) { leftOperand.setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.DATE)); } //Set the type if there is a parameter involved here if (rightOperand.requiresTypeFromContext()) { rightOperand.setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.TIME)); } TypeId leftTypeId = leftOperand.getTypeId(); TypeId rightTypeId = rightOperand.getTypeId(); if( !(leftOperand.requiresTypeFromContext() || leftTypeId.isStringTypeId() || leftTypeId.getJDBCTypeId() == Types.DATE)) throw StandardException.newException(SQLState.LANG_BINARY_OPERATOR_NOT_SUPPORTED, operator, leftTypeId.getSQLTypeName(), rightTypeId.getSQLTypeName()); if( !(rightOperand.requiresTypeFromContext() || rightTypeId.isStringTypeId() || rightTypeId.getJDBCTypeId() == Types.TIME)) throw StandardException.newException(SQLState.LANG_BINARY_OPERATOR_NOT_SUPPORTED, operator, leftTypeId.getSQLTypeName(), rightTypeId.getSQLTypeName()); setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.TIMESTAMP)); return genSQLJavaSQLTree(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression getBindingExpression();", "@Override\n\tpublic void visit(NumericBind arg0) {\n\t\t\n\t}", "public Term bind(Term[] binding)\n {\n return this;\n }", "public Exp createBind(Expression exp, Variable var){\r\n if (var.getVariableList() != null){\r\n // bind (sql() as ())\r\n return createASTBind(exp, var);\r\n }\r\n else {\r\n return Binding.create(exp, var);\r\n }\r\n }", "@Override\n\tpublic void bind() {\n\t\t\n\t}", "CloseableIteration<BindingSet, QueryEvaluationException> evaluate(TupleExpr expr, BindingSet bindings) {\n BindingSetPipeIterator root = new BindingSetPipeIterator();\n evaluateTupleExpr(root.pipe, expr, bindings);\n return root;\n }", "public IBinder asBinder() {\n return this;\n }", "public IBinder asBinder() {\n return this;\n }", "@Override\n protected DagNode evaluate(DagNode parent, Bindings bindings) {\n // type acts as storage for the status\n DagEdge bound = bindings.getBinding(_varName, getType());\n if (bound == null) {\n if (getType() == Bindings.LOCAL) {\n // first occurence of this var, bind the variable name\n // to the given node. This is on the application side, where new bindings\n // are only relevant in expandVars, which is why the DagEdge is not\n // important, but the node, to establish coreferences.\n bound = new DagEdge((short) -1, parent);\n bindings.bind(_varName, bound, getType());\n } else {\n logger.warn(\"Unknown binding during application of rule: \" + this);\n return parent;\n }\n }\n // Avoid unwanted coreferences for atomic nodes\n if (bound.getValue().newEdgesAreEmpty()) {\n return bound.getValue().cloneFS();\n }\n return bound.getValue();\n }", "private void addGetChildBindings() {\n\t\tthis.pathBindingClass.addImports(Binding.class, List.class);\n\t\tGMethod children = this.pathBindingClass.getMethod(\"getChildBindings\").returnType(\"List<Binding<?>>\")\n\t\t\t\t.addAnnotation(\"@Override\");\n\t\tchildren.body.line(\"List<Binding<?>> bindings = new java.util.ArrayList<Binding<?>>();\");\n\t\tfor (String foundSubBinding : this.foundSubBindings) {\n\t\t\tchildren.body.line(\"bindings.add(this.{}());\", foundSubBinding);\n\t\t}\n\t\tchildren.body.line(\"return bindings;\");\n\t}", "public CFExp substitute(Map<String,CFExp> bindings){\n\t\treturn this;\r\n\t}", "public void bindArguments() {\n\n\t\tif (this.arguments != null) {\n\t\t\t// by default arguments in abstract/native methods are considered to be used (no complaint is expected)\n\t\t\tif (this.binding == null) {\n\t\t\t\tfor (int i = 0, length = this.arguments.length; i < length; i++) {\n\t\t\t\t\tthis.arguments[i].bind(this.scope, null, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tboolean used = this.binding.isAbstract() || this.binding.isNative();\n\t\t\tfor (int i = 0, length = this.arguments.length; i < length; i++) {\n\t\t\t\tArgument argument = this.arguments[i];\n\t\t\t\targument.bind(this.scope, this.binding.parameters[i], used);\n\t\t\t\tif (argument.annotations != null) {\n\t\t\t\t\tthis.binding.tagBits |= TagBits.HasParameterAnnotations;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected abstract void bind();", "protected abstract void bind();", "@Override\n public ExpressionToStringContext withBindings(Map<String, String> bindings) {\n SerializationContext serializationContext = new SerializationContext(getFunctions(), bindings, typeContext(), serializedFunctions());\n return new ExpressionToStringContext(serializationContext, wrappedToStringContext, path, parent);\n }", "public void yAddBind(String bind_name, ObservableValue<? extends Number> bind);", "@Override\n ValueNode bindExpression(\n FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)\n\t\t\tthrows StandardException\n\t{\n\t\tleftOperand = leftOperand.bindExpression(fromList, subqueryList, \n aggregates);\n\t\trightOperand = rightOperand.bindExpression(fromList, subqueryList, \n aggregates);\n\n\t\t//Set the type if there is a parameter involved here \n\t\tif (leftOperand.requiresTypeFromContext()) {\n\t\t\tleftOperand.setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.DATE));\n\t\t}\n\t\t//Set the type if there is a parameter involved here \n\t\tif (rightOperand.requiresTypeFromContext()) {\n\t\t\trightOperand.setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.TIME));\n\t\t}\n\n\t\tTypeId leftTypeId = leftOperand.getTypeId();\n TypeId rightTypeId = rightOperand.getTypeId();\n if( !(leftOperand.requiresTypeFromContext() || leftTypeId.isStringTypeId() || leftTypeId.getJDBCTypeId() == Types.DATE))\n throw StandardException.newException(SQLState.LANG_BINARY_OPERATOR_NOT_SUPPORTED, \n operator, leftTypeId.getSQLTypeName(), rightTypeId.getSQLTypeName());\n if( !(rightOperand.requiresTypeFromContext() || rightTypeId.isStringTypeId() || rightTypeId.getJDBCTypeId() == Types.TIME))\n throw StandardException.newException(SQLState.LANG_BINARY_OPERATOR_NOT_SUPPORTED, \n operator, leftTypeId.getSQLTypeName(), rightTypeId.getSQLTypeName());\n setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.TIMESTAMP));\n\t\treturn genSQLJavaSQLTree();\n\t}", "List<Exp> varBind() {\n List<Exp> lBind = new ArrayList<Exp>();\n for (int i = 0; i < size(); i++) {\n Exp f = get(i);\n if ((f.type == VALUES) || (f.isFilter() && f.size() > 0)) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND) {\n if (bind.isBindCst()) {\n // ?x = cst\n lBind.add(bind);\n } else {\n // filter has BIND\n // TODO: when there is a UNION, variables of BIND may not be all bound \n // so we cannot bind here\n //add(i, bind);\n //i++;\n }\n }\n }\n }\n return lBind;\n }", "JCExpression TODO(JFXTree tree) {\n return TODO(\"BIND functionality: \" + tree.getClass().getSimpleName());\n }", "public Exp bind(Node qnode, Node node) {\n Exp bind = create(NODE, qnode);\n Exp value = create(NODE, node);\n bind.add(value);\n Exp and = this;\n if (this.type() != AND) {\n and = create(AND, this);\n }\n and.add(0, bind);\n return and;\n }", "protected void bind(EvaluationContext context) {\n this.context = context;\n }", "default Function1<T, Function1<U, K>> curry() {\n return this::bind1;\n }", "@Override\n public R visit(Bind n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n n.expression.accept(this, argu);\n n.nodeToken2.accept(this, argu);\n n.var.accept(this, argu);\n n.nodeToken3.accept(this, argu);\n return _ret;\n }", "private Expr expression() {\n return assignment();\n }", "private static FunExpSem bind(ValueSymbol[] symbols, ExpSem e)\n {\n int[] slots = Translator.toSlots(symbols);\n String[] names = Translator.toNames(symbols);\n if (e instanceof ExpSem.Single) \n {\n ExpSem.Single e0 = (ExpSem.Single)e;\n return (FunExpSem.Single)(Value[] v)-> (ExpSem.Single)(Context c)->\n {\n Context c0 = c.set(slots, v, names);\n return e0.apply(c0);\n };\n }\n else\n {\n ExpSem.Multiple e0 = (ExpSem.Multiple)e;\n return (FunExpSem.Multiple)(Value[] v)-> (ExpSem.Multiple)(Context c)->\n {\n Context c0 = c.set(slots, v, names);\n return e0.apply(c0);\n };\n }\n }", "<R> Monad<R> bind(IF1<T, ? extends Monad<R>> f);", "public static MemberAssignment bind(Method method, Expression expression) { throw Extensions.todo(); }", "@Override\n\tpublic BindingResult<Object> bind(ConfijNode config) {\n\t\tList<BindingResult<?>> bindingResultChildren = new ArrayList<>();\n\t\t// TODO: add config to allow null values in array\n\t\tList<ConfijNode> childNodes = CollectionUtil.childrenAsContinuousList(config);\n\t\tObject result = Array.newInstance(componentType.getErasedType(), childNodes.size());\n\t\tint i = 0;\n\t\tfor (ConfijNode childNode : childNodes) {\n\t\t\tBindingResult<?> item = componentDescription.bind(childNode);\n\t\t\tArray.set(result, i++, item.getValue());\n\t\t\tbindingResultChildren.add(item);\n\t\t}\n\t\treturn BindingResult.of(result, config, bindingResultChildren);\n\t}", "public interface Binding {\n\n /**\n * Get the declared type of the variable\n * @return the declared type\n */\n\n public SequenceType getRequiredType();\n\n /**\n * Evaluate the variable\n * @param context the XPath dynamic evaluation context\n * @return the result of evaluating the variable\n */\n\n public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException;\n\n /**\n * Indicate whether the binding is local or global. A global binding is one that has a fixed\n * value for the life of a query or transformation; any other binding is local.\n * @return true if the binding is global\n */\n\n public boolean isGlobal();\n\n /**\n * If this is a local variable held on the local stack frame, return the corresponding slot number.\n * In other cases, return -1.\n * @return the slot number on the local stack frame\n */\n\n public int getLocalSlotNumber();\n\n /**\n * Get the name of the variable\n * @return the name of the variable, as a structured QName\n */\n\n public StructuredQName getVariableQName();\n\n}", "public static MemberAssignment bind(Member member, Expression right) { throw Extensions.todo(); }", "@Override\n\tpublic ValueNode bindExpression(FromList fromList,\n SubqueryList subqueryList,\n List<AggregateNode> aggregateVector) throws StandardException {\n\t\tColumnDescriptor\tcd;\n\t\tTableDescriptor\t\ttd;\n\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\tSanityManager.ASSERT(fromList.size() != 0,\n\t\t\t\t\"fromList expected to be non-empty\");\n\t\t\tif (! (fromList.elementAt(0) instanceof FromBaseTable))\n\t\t\t{\n\t\t\t\tSanityManager.THROWASSERT(\n\t\t\t\t\t\"fromList.elementAt(0) expected to be instanceof FromBaseTable, not \" +\n\t\t\t\t\tfromList.elementAt(0).getClass().getName());\n\t\t\t}\n\n\t\t}\n\t\t// Get the TableDescriptor for the target table\n\t\ttd = ((FromBaseTable) fromList.elementAt(0)).getTableDescriptor();\n\n\t\t// Get the ColumnDescriptor for the column\n\t\tcd = td.getColumnDescriptor(columnName);\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\tSanityManager.ASSERT(cd != null,\n\t\t\t\t\"cd expected to be non-null\");\n\t\t}\n\n\t\t/* If we have the default text, then parse and bind it and\n\t\t * return the tree.\n\t\t */\n\t\tDefaultInfoImpl defaultInfo = (DefaultInfoImpl) cd.getDefaultInfo();\n\t\tif (defaultInfo != null)\n\t\t{\n\t\t\tString\t\tdefaultText = defaultInfo.getDefaultText();\n\t\t\tValueNode\tdefaultTree = parseDefault(defaultText, getLanguageConnectionContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t getCompilerContext());\n\n\t\t\t/* Query is dependent on the DefaultDescriptor */\n\t\t\tDefaultDescriptor defaultDescriptor = cd.getDefaultDescriptor(\n\t\t\t\t\t\t\t\t\t\t\t\t\tgetDataDictionary());\n\t\t\tgetCompilerContext().createDependency(defaultDescriptor);\n\n\t\t\treturn defaultTree.bindExpression(\n\t\t\t\t\t\t\t\t\tfromList, \n\t\t\t\t\t\t\t\t\tsubqueryList,\n\t\t\t\t\t\t\t\t\taggregateVector);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Default is null\n\t\t\tValueNode nullNode = (ValueNode) getNodeFactory().getNode(\n\t\t\t\t\t\t\t\t\t\tC_NodeTypes.UNTYPED_NULL_CONSTANT_NODE,\n\t\t\t\t\t\t\t\t\t\tgetContextManager());\n\t\t\treturn nullNode;\n\t\t}\n\t}", "public abstract TypeBindings bindingsForBeanType();", "public Bindings evaluate(Map symbolTable)\n\tthrows RslEvaluationException {\n\tif (symbolTable == null) {\n\t throw new IllegalArgumentException(\"Symbol table must be initialized.\");\n\t}\n\tList newValues = new LinkedList();\n\tIterator iter = values.iterator();\n\tObject vl;\n\tBinding binding;\n\twhile (iter.hasNext()) {\n\t vl = iter.next();\n\t if (vl instanceof Binding) {\n\t\tbinding = ((Binding)vl).evaluate(symbolTable);\n\n\t\t// update symbol table\n\t\tsymbolTable.put(binding.getName(),\n\t\t\t\tbinding.getValue().getValue());\n\n\t\tnewValues.add(binding);\n\t } else {\n\t\t// error: only binding objects should be in the list\n\t\tthrow new RuntimeException(\"Invalid object in binding\");\n\t }\n\t}\n\n\tBindings bind = new Bindings(getAttribute());\n\tbind.setValues(newValues);\n\treturn bind;\n }", "void setBind() {\n for (int i = 1; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND\n // no bind (?x = ?y) in case of JOIN\n && (!Query.testJoin || bind.isBindCst())) {\n int j = i - 1;\n while (j > 0 && get(j).isFilter()) {\n j--;\n }\n if (j >= 0) {\n Exp g = get(j);\n if ((g.isEdge() || g.isPath())\n && (bind.isBindCst() ? g.bind(bind.first().getNode()) : true)) {\n bind.status(true);\n g.setBind(bind);\n }\n }\n }\n }\n }\n }", "public ArrayList<Binding> unifies(AST ast, ArrayList<Binding> bindings){\n ArrayList<Binding> full_bindings = new ArrayList<Binding>();\n ArrayList<Binding> left_bindings = left.unifies(ast, bindings); \n //go through rhs and try to generate the new bindings\n for(Binding b : left_bindings){\n //pass in the binding\n //System.out.println(b.toString());\n //System.out.println(right.formatString());\n AST newQuery = right.apply(b);\n //System.out.println(newQuery.toString());\n\n ArrayList<Binding> resultBindings = null;\n if(newQuery instanceof Conjunct || newQuery instanceof Disjunct){\n resultBindings = Database.getInstance().query(newQuery, true);\n } else {\n resultBindings = Database.getInstance().query(newQuery);\n }\n \n for(Binding r : resultBindings)\n {\n //System.out.println(\"Mergings Bindings:\");\n //System.out.println(b.toString());\n //System.out.println(\"-and-\");\n //System.out.println(r.toString());\n //System.out.println(\">>\");\n //System.out.println(b.merge(r).toString() + \"\\n\");\n full_bindings.add(b.merge(r));\n }\n }\n return full_bindings;\n }", "public void bind() {\n }", "public MapExecutionScope bind(Type type, Object binding) {\n return bind(Key.get(type), binding);\n }", "protected void bind(PreparedStatement preparedStatement, ParameterBinding[] bindings)\n throws SQLException, Exception {\n // bind parameters\n if (bindings.length > 0) {\n int len = bindings.length;\n for (int i = 0; i < len; i++) {\n adapter.bindParameter(\n preparedStatement,\n bindings[i].getValue(),\n i + 1,\n bindings[i].getJdbcType(),\n bindings[i].getPrecision());\n }\n }\n }", "@Override\n\tpublic void bindParameters() {\n\n\t}", "T bindTo(Object instance);", "public Expression substitute(Expression _e1, Expression _e2) {\n\t\t//Util.dump(toString());\n\t\tfor (int i = 0; i < quantificators.length; i++) {\n\t\t\t/*Expression boundExpr = quantificators[i].getBoundVar();\n\t\t\tif (_e.equals(boundExpr)) {\n\t\t\t\treturn this;\n\t\t\t}*/\n\t\t\tquantificators[i].substitute(_e1, _e2);\n\t\t}\n\t\tExpression[] subformula = getSubExpressions();\n\t\tsubformula[0] = subformula[0].substitute(_e1,_e2);\n\t\treturn this;\n\t}", "@Override\n public void accept(final Bindings arg0, final Throwable arg1) {\n \n }", "public void bindThrownExceptions() {\n\n\t\tif (this.thrownExceptions != null\n\t\t\t&& this.binding != null\n\t\t\t&& this.binding.thrownExceptions != null) {\n\t\t\tint thrownExceptionLength = this.thrownExceptions.length;\n\t\t\tint length = this.binding.thrownExceptions.length;\n\t\t\tif (length == thrownExceptionLength) {\n\t\t\t\tfor (int i = 0; i < length; i++) {\n\t\t\t\t\tthis.thrownExceptions[i].resolvedType = this.binding.thrownExceptions[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tint bindingIndex = 0;\n\t\t\t\tfor (int i = 0; i < thrownExceptionLength && bindingIndex < length; i++) {\n\t\t\t\t\tTypeReference thrownException = this.thrownExceptions[i];\n\t\t\t\t\tReferenceBinding thrownExceptionBinding = this.binding.thrownExceptions[bindingIndex];\n\t\t\t\t\tchar[][] bindingCompoundName = thrownExceptionBinding.compoundName;\n\t\t\t\t\tif (bindingCompoundName == null) continue; // skip problem case\n\t\t\t\t\tif (thrownException instanceof SingleTypeReference) {\n\t\t\t\t\t\t// single type reference\n\t\t\t\t\t\tint lengthName = bindingCompoundName.length;\n\t\t\t\t\t\tchar[] thrownExceptionTypeName = thrownException.getTypeName()[0];\n\t\t\t\t\t\tif (CharOperation.equals(thrownExceptionTypeName, bindingCompoundName[lengthName - 1])) {\n\t\t\t\t\t\t\tthrownException.resolvedType = thrownExceptionBinding;\n\t\t\t\t\t\t\tbindingIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// qualified type reference\n\t\t\t\t\t\tif (CharOperation.equals(thrownException.getTypeName(), bindingCompoundName)) {\n\t\t\t\t\t\t\tthrownException.resolvedType = thrownExceptionBinding;\n\t\t\t\t\t\t\tbindingIndex++;\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public interface YCoolBindings {\n /**\n * The porpouse of this method is to store any bind, because depending on\n * the circunstances it can be caught by garbadge collector.\n * @param bind_name Binding name\n * @param bind Bind itself\n */\n public void yAddBind(String bind_name, ObservableValue<? extends Number> bind);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the X location of the object, in\n * other words, whenever the X location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the X location but the opposite is not true).\n */\n public DoubleBinding yTranslateXbind(double pivo);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the Y location of the object, in\n * other words, whenever the Y location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the Y location but the opposite is not true).\n */\n public DoubleBinding yTranslateYbind(double pivo);\n\n /**\n * Links the X position of the object with an observable value, so whenever\n * it changes, the object's X position will change too.\n *\n * @param bind_name The name for this link.\n * @param X The observable value to link the object's X position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateX(String bind_name, ObservableValue<? extends Number> X, double pivo);\n\n /**\n * Links the Y position of the object with an observable value, so whenever\n * it changes, the object's Y position will change too.\n *\n * @param bind_name The name for this link.\n * @param Y The observable value to link the object's Y position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateY(String bind_name, ObservableValue<? extends Number> Y, double pivo);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n * @return A DoubleBinding that is linked to the width of the object, in\n * other words, whenever the width of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the width but\n * the opposite is not true).\n */\n public DoubleBinding yWidthBind(boolean stroke_included);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n * @return A DoubleBinding that is linked to the height of the object, in\n * other words, whenever the height of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the height but\n * the opposite is not true).\n */\n public DoubleBinding yHeightBind(boolean stroke_included);\n\n /**\n * Links the width of the object with an observable value, so whenever it\n * changes, the object's width will change too.\n *\n * @param bind_name The name for this link.\n * @param width The observable value to link the object's width.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n */\n public void yBindWidth(String bind_name, ObservableValue<? extends Number> width, boolean stroke_included);\n\n /**\n * Links the height of the object with an observable value, so whenever it\n * changes, the object's height will change too.\n *\n * @param bind_name The name for this link.\n * @param height The observable value to link the object's height.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n */\n public void yBindHeight(String bind_name, ObservableValue<? extends Number> height, boolean stroke_included);\n\n /**\n * Breaks any bind created previously based on the name of the bind.\n * @param bind_name Name of the bind to be broken.\n */\n public void yUnbind(String bind_name);\n}", "public final BindingResult getBindingResult() {\n return bindingResult;\n }", "default Function1<U, K> bind1(T newFirstArgument) {\n return u -> Function2.this.apply(newFirstArgument, u);\n }", "public BindElements getBindAccess() {\n\t\treturn pBind;\n\t}", "public static MemberMemberBinding memberBind(Member member, Iterable<MemberBinding> bindings) { throw Extensions.todo(); }", "public int bind(IModel model, Map<String, Object> variableBindings,\n boolean isIterative) throws CannotMatchException;", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Binding p, A arg)\n {\n\n p.variableexpr_.accept(new VariableExprVisitor<R,A>(), arg);\n p.expression_.accept(new ExpressionVisitor<R,A>(), arg);\n p.program_.accept(new ProgramVisitor<R,A>(), arg);\n\n return null;\n }", "private void bindValues(){\r\n\t\tif (contenuEquation.isDisposed())return;\r\n\t\tif(equation == null)return;\r\n\t\t//the DatabindingContext object will manage the databindings\r\n\t\t//In this first part I monitor the the equation expression and check its\r\n\t\t//conformity to the correct syntaxe of an equation.\r\n\t\tDataBindingContext ctx = new DataBindingContext();\r\n\r\n\r\n\t\tIObservableValue contenuEqnWidget = WidgetProperties.text(SWT.Modify).observe(contenuEquation);\r\n\t\tIObservableValue contenuEqnValue = BeanProperties.value(Equation.class, \"contenuEqn\").observe(equation);\r\n\r\n\t\t//Defining the update strategy\r\n\t\tUpdateValueStrategy strategy = new UpdateValueStrategy();\r\n\r\n\t\t//Defining the Update Strategy that the field validator should use, this validation is passed before the value can be set.\r\n\t\tstrategy.setBeforeSetValidator(value->{\r\n\t\t\tString eqnString = String.valueOf(value);\r\n\t\t\ttry {\r\n\t\t\t\tnew VerificationSyntaxeEquation(eqnString);\r\n\t\t\t\tExtractionParametre.listEquationParameters(eqnString);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tif(!btnTerminer.isDisposed()) btnTerminer.setEnabled(false);\r\n\t\t\t\tif (e instanceof ErreurDeSyntaxe){\t\t\t\t\t\t\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t\telse if (e instanceof EquationVide) {\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t\telse if (e instanceof InvalidParameter) {\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tif(!btnTerminer.isDisposed()) btnTerminer.setEnabled(true);\r\n\t\t\tsetStatus(ValidationStatus.ok());\r\n\t\t\treturn ValidationStatus.ok();\r\n\t\t});\r\n\t\t//Binding the control and the data with the update strategy to use\t\t\r\n\t\tBinding bindValue = ctx.bindValue(contenuEqnWidget, contenuEqnValue,strategy,null);\r\n\r\n\t\t//Adding some decoration to indicate to the user the validation status of\r\n\t\t//of the currently typed equation expression\r\n\t\tControlDecorationSupport.create(bindValue, SWT.TOP|SWT.RIGHT);\r\n\t\tUpdateValueStrategy convertAndUpdate = new UpdateValueStrategy();\r\n\r\n\t\tconvertAndUpdate.setBeforeSetValidator(value->{\t\t\t\t\r\n\t\t\tboolean val = (Boolean)value;\t\t\t\r\n\r\n\t\t\tif ( val) {\r\n\t\t\t\tif(!parametreDeSortieCombo.isDisposed())\r\n\t\t\t\t\tif(getStatus().equals(ValidationStatus.ok())){\r\n\t\t\t\t\t\tparametreDeSortieCombo.setEnabled(true);\r\n\r\n\t\t\t\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\t\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\t\t\t\tparametreDeSortieCombo.update();\r\n\r\n\t\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t\tif (val == false) {\r\n\t\t\t\tif(!parametreDeSortieCombo.isDisposed()){\r\n\r\n\t\t\t\t\tparametreDeSortieCombo.setEnabled(false);\r\n\t\t\t\t\tparametreDeSortieCombo.setItems(new String[]{});\r\n\t\t\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\t\t\tparametreDeSortieCombo.update();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ValidationStatus.ok();\r\n\r\n\t\t});\t\t\r\n\r\n\t\tIObservableValue contrainteWidget = WidgetProperties.selection().observe(contrainteButton);\r\n\t\tIObservableValue contrainteValue = BeanProperties.value(Equation.class, \"isConstraint\").observe(equation);\r\n\t\tctx.bindValue(contrainteWidget, contrainteValue);\r\n\r\n\r\n\t\tIObservableValue orientationWidget = WidgetProperties.selection().observe(orientationButton);\r\n\t\tIObservableValue orientationValue = BeanProperties.value(Equation.class, \"isOriented\").observe(equation);\r\n\r\n\t\tctx.bindValue(orientationWidget, orientationValue, convertAndUpdate, null);\r\n\r\n\t\tIObservableValue parametreDeSortieWidget = WidgetProperties.selection().observe(parametreDeSortieCombo);\r\n\t\tIObservableValue parametreDeSortieValue = BeanProperties.value(Equation.class, \"parametreDeSortie.nomP\").observe(equation);\r\n\t\tUpdateValueStrategy updateParametreDeSortie = new UpdateValueStrategy();\r\n\r\n\t\tupdateParametreDeSortie.setAfterGetValidator(updateOutput->{\r\n\t\t\t//System.out.println(updateOutput);\r\n\t\t\tParametre parametre = equation.getParametreByName((String)updateOutput);\r\n\t\t\tif (parametre == null) {\r\n\t\t\t\treturn ValidationStatus.error(\"Parameter not found.\");\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tparametre.setTypeP(TypeParametre.OUTPUT);\r\n\t\t\t\tparametre.setSousTypeP(SousTypeParametre.OUTPUT);\r\n\t\t\t\tequation.setParametreDeSortie(parametre);\r\n\t\t\t} catch (MainApplicationException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t//\tSystem.err.println(parametre);\r\n\t\t\treturn ValidationStatus.ok();\r\n\r\n\t\t});\r\n\t\tctx.bindValue(parametreDeSortieWidget, parametreDeSortieValue, updateParametreDeSortie, null);\r\n\r\n\t\tIObservableValue proprieteEqnWidget = WidgetProperties.text(SWT.Modify).observe(properties);\r\n\t\tIObservableValue proprieteEqnValue = BeanProperties.value(Equation.class, \"proprieteEqn\").observe(equation);\r\n\r\n\t\tctx.bindValue(proprieteEqnWidget, proprieteEqnValue);\r\n\r\n\t\tIObservableValue descEqnWidget = WidgetProperties.text(SWT.Modify).observe(description);\r\n\t\tIObservableValue descEqnEqnValue = BeanProperties.value(Equation.class, \"descEqn\").observe(equation);\r\n\r\n\t\tctx.bindValue(descEqnWidget, descEqnEqnValue);\r\n\r\n\r\n\r\n\t\t//In this second part I aim to monitor the the equation expression and check its parameter names'\r\n\t\t//conformity to the correct syntaxe of a parameter name before showing it in the combobox.\r\n\r\n\t}", "@Override\n\tpublic ValueList caseATypeBind(ATypeBind bind, ObjectContext ctxt)\n\t\t\tthrows AnalysisException\n\t{\n\t\treturn new ValueList();\n\t}", "void bind(final Value val, final QueryContext qc) throws QueryException {\n if(external && !compiled) {\n value = declType == null || declType.instance(val) ? val :\n declType.cast(val, true, qc, sc, info);\n expr = value;\n }\n }", "public abstract double compute(BindRecord neoBindRecord, BindRecord selfBindRecord);", "public Formula bind(final String expression, final JsonObject tpl) {\n this.playbook = Playbook.open(expression).bind(tpl);\n return this;\n }", "public Object bind(LigoObject ligoObject) {\n\t\tif (annotation.mode()!=DEFAULT)\n\t\t\tbinder().setMode(annotation.mode());\n\t\t\n\t\tList<? extends LigoData> data = environment().expressionResolver().resolve(boundName(),ligoObject);\n\t\treturn binder().bind(data);\n\t\n\t}", "public static MemberMemberBinding memberBind(Method method, Iterable<MemberBinding> bindings) { throw Extensions.todo(); }", "public T expr(final Expression expression) {\r\n\t\tif (expression.values() == null)\r\n\t\t\treturn expr(expression.expression());\r\n\t\treturn expr(expression.expression(), expression.values()\r\n\t\t\t\t.toArray());\r\n\t}", "public static DynamicExpression dynamic(CallSiteBinder binder, Class type, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public abstract int getBindingVariable();", "public Expr getAppliedExpression()\n {\n if (is(Trait.NEEDS_APPLIED)) {\n final Expr applied = Parser.applyUnappliedBindings(expression, analysis, unappliedInputs);\n Parser.validateExpr(applied, applied.analyzeInputs());\n return applied;\n }\n return getExpression();\n }", "@Override\n\tpublic abstract Binding matches(ASTNode compareToNode) throws AspectException;", "public abstract BoundType b();", "@Override\n\tpublic void bindData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic ViewBinder getViewBinder() {\n\t\t\treturn super.getViewBinder();\r\n\t\t}", "@FunctionalInterface\n\tpublic interface Expression<V> {\n\t\tV getExpressionResult(Program p);\n\t}", "@Override\n\tpublic boolean visit(ThisExpression node) {\n\t\tITypeBinding b = node.resolveTypeBinding();\n\t\tif (b != null) {\n\t\t\tb = b.getTypeDeclaration();\n\t\t\tif (b.isLocal() || b.getQualifiedName().isEmpty())\n\t\t\t\treturn false;\n\t\t\tthis.partialTokens.append(\" \" + getName(b) + \" \");\n\t\t\tthis.fullTokens.append(\" \" + getQualifiedName(b) + \" \");\n\t\t} else {\n\t\t\tthis.partialTokens.append(\" this \");\n\t\t\tthis.fullTokens.append(\" this \");\n\t\t}\n\t\treturn false;\n\t}", "Expression getRValue();", "protected abstract void bindingView();", "default Function1<T, R> curry(U parameter) {\n return bind2(parameter);\n }", "private Expression toExpression() {\n Expression lhs = null, rhs = null;\n if (base instanceof DerefSymbol) {\n lhs = ((DerefSymbol)base).toExpression();\n } else if (base instanceof AccessSymbol) {\n lhs = ((AccessSymbol)base).toExpression();\n } else if (base instanceof Identifier) {\n lhs = new Identifier(base);\n } else {\n PrintTools.printlnStatus(0,\n \"[WARNING] Unexpected access expression type\");\n return null;\n }\n rhs = new Identifier(member);\n return new AccessExpression(lhs, AccessOperator.MEMBER_ACCESS, rhs);\n }", "@Override\n\tpublic View bindView() {\n\t\treturn null;\n\t}", "@Override\n\tpublic ValueList caseASetBind(ASetBind bind, ObjectContext ctxt)\n\t\t\tthrows AnalysisException\n\t{\n\t\treturn af.createPExpAssistant().getValues(bind.getSet(), ctxt);\n\t}", "@Override\r\n public CompoundExpression linkExpression(CarbonScope scope) {\n CompoundExpression newExpression = new CompoundExpression(scope);\r\n for (StatementNode statement : statements) {\r\n if (statement.getRhs().isPresent()) {\r\n CarbonExpression rhs = statement.getRhs().get().linkExpression(scope);\r\n if (statement.getLhsType().isPresent()) {\r\n CarbonInterface lhsInterface = statement.getLhsType().get().linkInterface(scope);\r\n if (!rhs.getInterface().isSubtypeOf(lhsInterface)) {\r\n throw new TypeException(rhs.getShortString() + \" is not a subtype of \" + lhsInterface.getShortString());\r\n }\r\n }\r\n\r\n newExpression.addMember(statement.getLabel(), rhs);\r\n } else {\r\n CarbonInterface carbonInterface = statement.getLhsType()\r\n .map(tn -> tn.linkInterface(scope))\r\n .orElseGet(() -> scope.getMember(statement.getLabel())\r\n .filter(e -> e instanceof CarbonInterface)\r\n .map(e -> (CarbonInterface) e)\r\n .orElseThrow(() -> new TypeException(statement.getLabel() + \" is not an interface in scope \" + scope.getShortString())));\r\n newExpression.addParameter(statement.getLabel(), carbonInterface);\r\n }\r\n\r\n }\r\n\r\n return newExpression;\r\n }", "Binding<T> fixed();", "@Override\n\tpublic Object get(String name, Scriptable start) {\n\t\tObject result = super.get(name, start);\n\t\tif(result == NOT_FOUND && unwrap().appliedBindings.size() > 0) {\n\t\t\tfor(XBLBinding binding : unwrap().appliedBindings) {\n\t\t\t\t// Check fields:\n\t\t\t\tXBLField field = binding.getField(name);\n\t\t\t\tif(field != null && field.getInitializer() != null) {\n\t\t\t\t\tFunction init = asFunction(field.getInitializer());\n\t\t\t\t\tfield.setInitializer(init);\n\t\t\t\t\tresult = init.call(Context.getCurrentContext(), getParentScope(), this, new Object[]{});\n\t\t\t\t\tput(name, this, result);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Check property getters:\n\t\t\t\tXBLProperty prop = binding.getProperty(name);\n\t\t\t\tif(prop != null && prop.getGetter() != null) {\n\t\t\t\t\tFunction getter = asFunction(prop.getGetter());\n\t\t\t\t\tprop.setGetter(getter);\n\t\t\t\t\tresult = getter.call(Context.getCurrentContext(), getParentScope(), this, new Object[]{});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Check methods:\n\t\t\t\tXBLMethod method = binding.getMethod(name);\n\t\t\t\tif(method != null && method.getBody() != null) {\n\t\t\t\t\tresult = asFunction(method.getBody());\n\t\t\t\t\tmethod.setBody(result);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn convertReturnValue(result);\n\t}", "public void Apply(SB_Entity p,SB_ExecutionFrame contextFrame, SB_ExecutionFrame newFrame, SB_Logger logger) \r\n\t\tthrows SB_Exception\r\n\t{\n\t\tSB_Variable classVar = contextFrame.GetVariable(_varName);\r\n\t\tSB_Variable value = evaluateExpression(p, contextFrame, classVar.getType());\r\n\t\t\r\n\t\tif(value == null)\r\n\t\treturn;\r\n\t\t\r\n\t\tif(SIM_Constants.DEBUG_INFO_ON)\r\n\t\t\tlogger.log(\"[\" + p.toString() + \",STK \" + contextFrame.GetStackDepth()\r\n\t\t\t+ \"] BINDING:\\tbinding behavior param \" + _varName + \".\" + _varMember + \" <- \" + _expressStr\r\n\t\t\t+ \" = \" + value.toString(),SB_Logger.BINDING);\r\n\t\t\r\n\t\tSetVariable(newFrame, value);\r\n\t}", "public boolean bind() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tBindResult bindResult = this.c.bind(this.bindDN, this.password);\r\n\t\t} catch (LDAPException e1) {\r\n\t\t\tSystem.out.println(\"Failed to bind to directory.\");\r\n\t\t\te1.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public XPathExpression getUnderlyingExpression() {\n return exp;\n }", "@Override\n public InfGraph bind( Graph data ) throws ReasonerException {\n RETERuleInfGraph graph = new RETERuleInfGraph(this, rules, schemaGraph, data);\n return graph;\n }", "protected abstract void bindAttributes();", "public static DynamicExpression dynamic(CallSiteBinder binder, Class type, Expression[] expression) { throw Extensions.todo(); }", "public abstract Operand<T> result();", "public void resolveTwoWayBindings()\n {\n // If there are any two-way bindings, only partially built, now is the time\n // to finish them.\n completeTwoWayBindings();\n \n Map<String, BindingExpression> destinationMap = new HashMap<String, BindingExpression>();\n\n for (BindingExpression bindingExpression : bindingExpressions)\n {\n // Note that this just strips the parens on the edges of the expression.\n // It's possible the expression was an inline expression which got parsed to\n // something like '(a.text) + \".\" + (b.text)'. Since this would never be part of a two-way bind\n // it probably doesn't matter that when the parens are stripped it ends up\n // as 'a.text) + \".\" + (b.text'.\n String sourceExpression = TextGen.stripParens(bindingExpression.getSourceExpression());\n \n String destinationPath = bindingExpression.getDestinationPath(false);\n BindingExpression match = destinationMap.get(sourceExpression);\n\n if ((match != null) && destinationPath.equals(TextGen.stripParens(match.getSourceExpression())))\n {\n bindingExpression.setTwoWayCounterpart(match);\n }\n else\n {\n destinationMap.put(destinationPath, bindingExpression);\n } \n }\n }", "public SyntaxElement bind(\r\n List<ElementReference> templateParameters, \r\n List<ElementReference> templateArguments) {\r\n SyntaxElement self = this.getSelf();\r\n SyntaxElement boundElement = null;\r\n try {\r\n boundElement = self.getClass().newInstance();\r\n } catch (Exception e) {\r\n System.out.println(\"Error binding \" + \r\n self.getClass().getSimpleName() + \": \" + e);\r\n return null;\r\n }\r\n boundElement.getImpl().bindTo(self, templateParameters, templateArguments);\r\n return boundElement;\r\n }", "public static DynamicExpression dynamic(CallSiteBinder binder, Class type, Expression expression0, Expression expression1, Expression expression2, Expression expression3) { throw Extensions.todo(); }", "public VariableBinding formVarbind(MetaData mdata) {\n VariableBinding vbind = null;\n if (mdata.m_oidValue != null) {\n vbind = new VariableBinding(new OID(mdata.m_oid), castOidType(mdata.m_oidType, mdata.m_oidValue));\n }\n return vbind;\n }", "public Object clone()\n {\n return new ReturnStatement((Expression) expression.clone(), -1, -1);\n }", "default Function1<U, R> bind1(T firstParameter) {\n return (u) -> apply(firstParameter, u);\n }", "Binding<T> unqualified();", "public static DynamicExpression dynamic(CallSiteBinder binder, Class type, Expression expression) { throw Extensions.todo(); }", "private void registerBindings(){\t\t\n\t}", "private void registerBindings(){\t\t\n\t}", "@Override\n\tAlgebraicExpression clone();", "@Override\n public Expression simplify() {\n Expression right = getExpRight().simplify();\n Expression left = getExpLeft().simplify();\n //check if you can simplify more\n Num zero = new Num(0), one = new Num(1);\n //check if the left expression equals to zero\n if (zero.isEqual(left)) {\n return zero;\n }\n //check if the right expression equals to zero\n if (zero.isEqual(right)) {\n return zero;\n }\n //check if the left expression equals to one\n if (one.isEqual(left)) {\n return right;\n }\n //check if the right expression equals to one\n if (one.isEqual(right)) {\n return left;\n }\n try {\n //check if the expression is a number\n double value = evaluate();\n return new Num(value);\n } catch (Exception e) {\n return new Mult(left, right);\n }\n }", "public static DynamicExpression dynamic(CallSiteBinder binary, Class type, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "default Function1<T, K> bind2(U newSecondArgument) {\n return t -> Function2.this.apply(t, newSecondArgument);\n }", "public Expression simplify() {\r\n return this;\r\n }", "Expression getExpression();", "Expression getExpression();" ]
[ "0.5936719", "0.5786402", "0.56880796", "0.5545068", "0.5518501", "0.54713356", "0.5333818", "0.5333818", "0.52954715", "0.52812034", "0.522248", "0.52223897", "0.51793385", "0.51793385", "0.516556", "0.51042986", "0.50977606", "0.5086701", "0.5064046", "0.5058481", "0.50492364", "0.50453603", "0.50194055", "0.5011806", "0.48979682", "0.48846322", "0.48667076", "0.48509714", "0.48504946", "0.4835506", "0.47954223", "0.4777546", "0.47765574", "0.47750875", "0.47711387", "0.47341433", "0.47080502", "0.4698583", "0.46739772", "0.46672645", "0.46606058", "0.46431342", "0.46321332", "0.4624702", "0.46102828", "0.4593575", "0.4584602", "0.4581906", "0.4578478", "0.45621556", "0.4559409", "0.4525649", "0.44862065", "0.44734538", "0.4473389", "0.44587782", "0.4454274", "0.44382748", "0.4435504", "0.4433687", "0.4431244", "0.44310445", "0.4423106", "0.4420541", "0.44086352", "0.44034615", "0.4401662", "0.43999133", "0.43956035", "0.43905386", "0.43839318", "0.43801814", "0.436849", "0.4365461", "0.43586588", "0.43506774", "0.43464425", "0.43461546", "0.43429884", "0.4341457", "0.43398827", "0.4331246", "0.43200144", "0.4311822", "0.43039408", "0.42985958", "0.42928165", "0.42896497", "0.42858958", "0.42656904", "0.4263955", "0.42391956", "0.42391956", "0.4232636", "0.42325607", "0.42173806", "0.42111793", "0.42069578", "0.42055658", "0.42055658" ]
0.49047858
24
end of bindExpression Do code generation for this binary operator.
public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException { acb.pushDataValueFactory(mb); leftOperand.generateExpression(acb, mb); mb.cast( ClassName.DataValueDescriptor); rightOperand.generateExpression(acb, mb); mb.cast( ClassName.DataValueDescriptor); mb.callMethod( VMOpcode.INVOKEINTERFACE, null, methodName, ClassName.DateTimeDataValue, 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void visit(BinaryExpression binaryExpression) {\n\r\n\t}", "private CodeFragment generateBinOPinstruction(String op, String type, CodeFragment exprL, CodeFragment exprR) {\n CodeFragment result = new CodeFragment();\n result.addCode(exprL);\n result.addCode(exprR);\n result.setRegister(this.generateNewRegister(false));\n\n result.addCode(String.format(\"%s = %s %s %s, %s\\n\", result.getRegister(), op, type,\n exprL.getRegister(), exprR.getRegister()));\n\n return result;\n }", "@Override\n\tpublic List<Component> caseExprBinary(ExprBinary expr) {\n\t\tint sizeInBits = assignTarget.getVariable().getType().getSizeInBits();\n\t\t// Get the Variables\n\t\tVar e1 = ((ExprVar) expr.getE1()).getUse().getVariable();\n\t\tVar e2 = ((ExprVar) expr.getE2()).getUse().getVariable();\n\t\tList<Var> inVars = new ArrayList<Var>();\n\t\tinVars.add(e1);\n\t\tinVars.add(e2);\n\t\t// Component component = null;\n\t\tif (expr.getOp() == OpBinary.BITAND) {\n\t\t\tcurrentComponent = new AndOp();\n\t\t} else if (expr.getOp() == OpBinary.BITOR) {\n\t\t\tcurrentComponent = new OrOp();\n\t\t} else if (expr.getOp() == OpBinary.BITXOR) {\n\t\t\tcurrentComponent = new XorOp();\n\t\t} else if (expr.getOp() == OpBinary.DIV) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.DIV_INT) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.EQ) {\n\t\t\tcurrentComponent = new EqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.GE) {\n\t\t\tcurrentComponent = new GreaterThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.GT) {\n\t\t\tcurrentComponent = new GreaterThanOp();\n\t\t} else if (expr.getOp() == OpBinary.LE) {\n\t\t\tcurrentComponent = new LessThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_AND) {\n\t\t\tcurrentComponent = new And(2);\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_OR) {\n\t\t\tcurrentComponent = new Or(2);\n\t\t} else if (expr.getOp() == OpBinary.LT) {\n\t\t\tcurrentComponent = new LessThanOp();\n\t\t} else if (expr.getOp() == OpBinary.MINUS) {\n\t\t\tcurrentComponent = new SubtractOp();\n\t\t} else if (expr.getOp() == OpBinary.MOD) {\n\t\t\tcurrentComponent = new ModuloOp();\n\t\t} else if (expr.getOp() == OpBinary.NE) {\n\t\t\tcurrentComponent = new NotEqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.PLUS) {\n\t\t\tcurrentComponent = new AddOp();\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_LEFT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new LeftShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_RIGHT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new RightShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.TIMES) {\n\t\t\tcurrentComponent = new MultiplyOp(expr.getType().getSizeInBits());\n\t\t}\n\t\t// currentComponent.setNonRemovable();\n\t\tPortUtil.mapInDataPorts(currentComponent, inVars, portDependency,\n\t\t\t\tportGroupDependency);\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic Ast binaryOp(BinaryOp ast, Void arg) {\n\t\t\t\tsuper.binaryOp(ast, arg);\n\n\t\t\t\ttry {\n\t\t\t\t\tExpr left = ast.left();\n\t\t\t\t\tExpr right = ast.right();\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase B_TIMES:\n\t\t\t\t\t\tintValue = asInt(left) * asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_DIV:\n\t\t\t\t\t\tintValue = asInt(left) / asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MOD:\n\t\t\t\t\t\tintValue = asInt(left) % asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_PLUS:\n\t\t\t\t\t\tintValue = asInt(left) + asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MINUS:\n\t\t\t\t\t\tintValue = asInt(left) - asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_AND:\n\t\t\t\t\t\tboolValue = asBool(left) && asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_OR:\n\t\t\t\t\t\tboolValue = asBool(left) || asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) < asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) <= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) > asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) >= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_NOT_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tif (boolValue != null)\n\t\t\t\t\t\t\tboolValue = !boolValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException exc) {\n\t\t\t\t\t// non-constant operands: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t} catch (ArithmeticException exc) {\n\t\t\t\t\t// division by zero etc: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "public Code visitOperatorNode(ExpNode.OperatorNode node) {\n beginGen(\"Operator\");\n Code code;\n ExpNode args = node.getArg();\n switch (node.getOp()) {\n case ADD_OP:\n code = args.genCode(this);\n code.generateOp(Operation.ADD);\n break;\n case SUB_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n code.generateOp(Operation.ADD);\n break;\n case MUL_OP:\n code = args.genCode(this);\n code.generateOp(Operation.MPY);\n break;\n case DIV_OP:\n code = args.genCode(this);\n code.generateOp(Operation.DIV);\n break;\n case EQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n break;\n case LESS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESS);\n break;\n case NEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n code.genBoolNot();\n break;\n case LEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESSEQ);\n break;\n case GREATER_OP:\n /* Generate argument values in reverse order and use LESS */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESS);\n break;\n case GEQUALS_OP:\n /* Generate argument values in reverse order and use LESSEQ */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESSEQ);\n break;\n case NEG_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n break;\n default:\n errors.fatal(\"PL0 Internal error: Unknown operator\",\n node.getLocation());\n code = null;\n }\n endGen(\"Operator\");\n return code;\n }", "@Override\n\tpublic void VisitBinaryNode(BinaryOperatorNode Node) {\n\n\t}", "public Operator operator() {\n\treturn this.op;\n }", "public Binary operator(Operator op) {\n\tBinary_c n = (Binary_c) copy();\n\tn.op = op;\n\treturn n;\n }", "@Override\n public void function() {\n App.memory.setMemory(op2, Memory.convertBSToBoolArr(Memory.length32(Integer.toBinaryString(\n op1 * Integer.parseInt(App.memory.getMemory(op2, 1 << 2 + 2 + 1), 2)))));\n }", "private static OperatorBuilder binary(String symbol, DoubleBinaryOperator binaryOp, Type type) {\n if (binaryOp == null) {\n throw new IllegalArgumentException(\"operator argument must not be null\");\n }\n if (type.arity() != 2) {\n throw new IllegalArgumentException(\"type argument must be INFIXL, INFIXN, or INFIXR\");\n }\n // XXX ensure valid symbol\n return new OperatorBuilder(null, binaryOp, symbol, 10, type);\n }", "@Override\r\n\tpublic Object visitBinaryExpression(BinaryExpression binaryExpression,\r\n\t\t\tObject arg) throws Exception {\r\n\t\tString expr0Type = (String) binaryExpression.expression0.visit(this,arg);\r\n\t\tString expr1Type = (String) binaryExpression.expression1.visit(this,arg);\r\n\t\tKind op = binaryExpression.op.kind;\r\n\t\tcheck(expr0Type.equals(expr1Type), \"uncompatible bianry expression\", binaryExpression);\r\n\t\tswitch(op) {\r\n\t\tcase PLUS:\r\n\t\t\tcheck(expr0Type.equals(intType) || expr0Type == stringType, \"operator \" + op.toString() + \" is not defined for \" + expr0Type, binaryExpression);\r\n\t\t\tbreak;\r\n\t\tcase MINUS:\tcase TIMES:\tcase DIV:\t\t\t\r\n\t\t\tcheck(expr0Type.equals(intType), \"operator \" + op.toString() + \" is not defined for \" + expr0Type, binaryExpression);\r\n\t\t\tbreak;\r\n\t\tcase EQUAL:\tcase NOTEQUAL:\r\n\t\t\tif (expr0Type.equals(booleanType) || expr0Type.equals(intType) ||expr0Type.equals(stringType)) {\r\n\t\t\t\tbinaryExpression.setType(booleanType);\r\n\t\t\t\treturn booleanType;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new TypeCheckException(\"operator \" + op.toString() + \" is not defined for \" + expr0Type, binaryExpression);\r\n\t\t\t}\t\r\n\t\tcase LT: case GT: case LE: case GE:\r\n\t\t\tif (expr0Type.equals(booleanType) || expr0Type.equals(intType)) {\r\n\t\t\t\tbinaryExpression.setType(booleanType);\r\n\t\t\t\treturn booleanType;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new TypeCheckException(\"operator \" + op.toString() + \" is not defined for \" + expr0Type, binaryExpression);\r\n\t\t\t}\t\t\r\n\t\tcase LSHIFT: case RSHIFT:\r\n\t\t\tcheck(expr0Type.equals(intType), \"operator \" + op.toString() + \" is not defined for \" + expr0Type, binaryExpression);\r\n\t\t\tbreak;\r\n\t\tcase BAR: case AND:\r\n\t\t\tcheck(expr0Type.equals(booleanType), \"operator \" + op.toString() + \" is not defined for \" + expr0Type, binaryExpression);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new TypeCheckException(\"operator \" + op.toString() + \" is not defined for \" + expr0Type, binaryExpression);\r\n\t\t} \t\r\n\t\tbinaryExpression.setType(expr0Type);\r\n\t\treturn expr0Type;\r\n\t}", "public interface BinaryOperatorCriteriaExpression<T> extends CriteriaExpression<T> {\n\t/**\n\t * Get the right-hand operand.\n\t *\n\t * @return The right-hand operand.\n\t */\n\tCriteriaExpression<?> getRightHandOperand();\n\n\t/**\n\t * Get the left-hand operand.\n\t *\n\t * @return The left-hand operand.\n\t */\n\tCriteriaExpression<?> getLeftHandOperand();\n}", "@Override\n\tpublic void VisitUnaryNode(UnaryOperatorNode Node) {\n\n\t}", "private void processOperator() {\r\n\t\tif (expression[currentIndex] == '*') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.AND_STRING);\r\n\t\t} else if (expression[currentIndex] == '+') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.OR_STRING);\r\n\t\t} else if (expression[currentIndex] == '!') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.NOT_STRING);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.XOR_STRING);\r\n\t\t\t// xor operator has 2 characters more than any other operator.\r\n\t\t\tcurrentIndex += 2;\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}", "@Override\n\tpublic Object visit(ASTLogical node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "@Override\n\tprotected void addRequestedOperators() {\n\t}", "@Override\npublic final void accept(TreeVisitor visitor) {\n visitor.visitWord(OpCodes.OR_NAME);\n if (ops != null) {\n for (int i = 0; i < ops.length; i++) {\n ops[i].accept(visitor);\n }\n } else {\n visitor.visitConstant(null, \"?\");\n }\n visitor.visitEnd();\n }", "private String bindNull() {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IS\";\n } else if (operator.equals(\"!=\")) {\n op = \"IS NOT\";\n } else {\n op = operator;\n }\n if (column != null && skipNulls) {\n return \"1 = 1\";\n } else {\n return cond(column, op, \"NULL\");\n }\n }", "@Override\n\tpublic void visit(OrExpression arg0) {\n\t\t\n\t}", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "public Operator operator() {\n return _operator != null ? _operator : Operator.OR;\n }", "@Override\n public Node visit(BinaryExpression nd, Void v) {\n if (\"??\".equals(nd.getOperator())) return nd;\n return nd.getLeft().accept(this, v);\n }", "private DoubleBinaryOperator chooseOperator() {\n\t\tswitch(name) {\n\t\tcase \"+\":\n\t\t\treturn ADD;\n\t\t\t\n\t\tcase \"-\":\n\t\t\treturn SUB;\n\t\t\t\n\t\tcase \"*\":\n\t\t\treturn MULTIPLY;\n\t\t\t\n\t\tcase \"/\":\n\t\t\treturn DIVIDE;\n\t\t\t\n\t\tcase \"x^n\":\n\t\t\treturn POW;\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Invalid binary operator\");\n\t\t}\n\t}", "public void appendOperator(String operator){\n if(validateExp(currentExp)){\n currentExp+=operator;\n calculationResult.onExpressionChange(currentExp,true);\n count++;\n }\n }", "public final SymbolNode getOperator() { return this.operator; }", "@Override\n\tpublic void visit(OrExpression arg0) {\n\n\t}", "void setPendingBinaryOperation(DoubleBinaryOperator op);", "public final AstValidator.bin_expr_return bin_expr() throws RecognitionException {\n AstValidator.bin_expr_return retval = new AstValidator.bin_expr_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree BIN_EXPR268=null;\n AstValidator.cond_return cond269 =null;\n\n AstValidator.expr_return expr270 =null;\n\n AstValidator.expr_return expr271 =null;\n\n\n CommonTree BIN_EXPR268_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:458:10: ( ^( BIN_EXPR cond expr expr ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:458:12: ^( BIN_EXPR cond expr expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n BIN_EXPR268=(CommonTree)match(input,BIN_EXPR,FOLLOW_BIN_EXPR_in_bin_expr2295); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n BIN_EXPR268_tree = (CommonTree)adaptor.dupNode(BIN_EXPR268);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(BIN_EXPR268_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cond_in_bin_expr2297);\n cond269=cond();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cond269.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_bin_expr2299);\n expr270=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr270.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_bin_expr2301);\n expr271=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr271.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public String operator() {\n return this.operator;\n }", "public void setOperator(String incomingOperator)\r\n {\r\n \r\n operator = incomingOperator;\r\n \r\n }", "private Expr or() { // This uses the same recursive matching structure as other binary operators.\n Expr expr = and(); // OR takes precedence over AND.\n while(match(OR)) {\n Token operator = previous();\n Expr right = and();\n expr = new Expr.Logical(expr, operator, right);\n }\n return expr;\n }", "public void visit(BinConditionalExpression x){\n }", "DoubleBinaryOperator getPendingBinaryOperation();", "com.google.protobuf.ByteString getOperatorBytes();", "public void toGrammar() {\n System.out.println(\"<binary_expression> -> <arithmeitc_expression> <arithmetic_op> <arithmetic_expression>\");\n left.toGrammar();\n operator.toGrammar();\n right.toGrammar();\n prefix();\n }", "Operator operator();", "public void visit(Operator operator);", "public BinaryExpression(IExpression left, IExpression right, IOperation op) {\r\n\t\tthis.op = op; // passes the reference op parameter to the associated\r\n\t\t\t\t\t\t// field.\r\n\t\tthis.left = left; // passes the reference of the left parameter to the\r\n\t\t\t\t\t\t\t// associated field.\r\n\t\tthis.right = right; // passes the reference of the right parameter to\r\n\t\t\t\t\t\t\t// the associated field.\r\n\t}", "@Override\n public boolean visit(JsBinaryOperation x, JsContext<JsExpression> ctx) {\n return !x.getOperator().isAssignment()\n || !(x.getArg1() instanceof JsStringLiteral);\n }", "@Override\n public NodeType ExecuteOperation()\n {\n //if the first child is an operator\n if(this.childNodes[0].isOperator==true)\n {\n BasicOperator basicOperator=(BasicOperator)this.childNodes[0]; \n if(basicOperator.operands==1)\n {\n UnaryOperator unaryOperator=(UnaryOperator)childNodes[0];\n return unaryOperator.PerformOperation(childNodes[1]);\n }\n else if(basicOperator.operands==2)\n {\n BinaryOperator binaryOperator=(BinaryOperator)childNodes[0];\n return binaryOperator.PerformOperation(childNodes[1], childNodes[2]);\n }\n else if(basicOperator.operands==3)\n {\n TernaryOperator ternaryOperator=(TernaryOperator)childNodes[0];\n return ternaryOperator.PerformOperation(childNodes[1], childNodes[2], childNodes[3]);\n }\n }\n //if not an operator\n else\n {\n return this.childNodes[0].ExecuteOperation();\n }\n return null;\n }", "protected boolean visitBinaryOperation(QuasiOptimizedExpression optimizedExpression,\n BinaryOperation binaryOperation) {\n\n RelationalOperator relationalOperator = map(binaryOperation);\n if (relationalOperator == null) {\n return false;\n }\n\n String theExpression = null;\n\n //a.b > 10\n Object theLiteral = extractLiteral(binaryOperation.getRight());\n if (theLiteral == AstNodeType.other) {\n //10 <= a.b\n theLiteral = extractLiteral(binaryOperation.getLeft());\n\n //10 == 10 will never reach here because MVEL optimizes it immediately to a literal.\n if (theLiteral == AstNodeType.other) {\n return false;\n }\n else {\n theExpression = decompile(binaryOperation.getRight());\n\n relationalOperator = relationalOperator.inverse();\n }\n }\n else {\n theExpression = decompile(binaryOperation.getLeft());\n }\n\n OptimizedComponent oc = new OptimizedComponent(theExpression, relationalOperator, theLiteral);\n optimizedExpression.addExpressionComponent(oc);\n\n return true;\n }", "public LogicalOperator() {\n this.logical = Logical.And;\n }", "public static BinaryExpression makeBinary(ExpressionType binaryType, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n public Expression visit(LogicalOpNode node) {\n\n Label trueLabel = new Label ();\n Label falseLabel = new Label ();\n Label endLabel = new Label ();\n\n process(node, trueLabel, falseLabel);\n\n cat.footoredo.mx.entity.Variable variable = tmpVariable(node.getType());\n\n label (trueLabel);\n assign (node.getLocation(), ref(variable), new Integer(Type.INT8, 1));\n jump (endLabel);\n\n label (falseLabel);\n assign (node.getLocation(), ref(variable), new Integer(Type.INT8, 0));\n jump (endLabel);\n\n label (endLabel);\n\n return isStatement() ? null : ref (variable);\n }", "public IMutateExprTree getBaseOp() \r\n\t{\r\n\t\treturn baseOp;\r\n\t}", "public String toString() {\n return operator + \"(\" + argument + \")\";\n }", "@Override\n\tpublic void outAOpExpr(AOpExpr node) {\n\t\tExpressionType expType = (ExpressionType) nodeTypes.get(node.getOp()); \n\t\tType left = nodeTypes.get(node.getLeft()); \n\t\tswitch (expType){\n\t\t\tcase DIV :\n\t\t\t\tcreateBinArithmetic(\"/\"); \n\t\t\t\tbreak; \n\t\t\tcase MINUS: \n\t\t\t\tcreateBinArithmetic(\"-\"); \n\t\t\t\tbreak; \n\t\t\tcase MOD: \n\t\t\t\tcreateBinArithmetic(\"%\"); \n\t\t\t\tbreak;\n\t\t\tcase MUL:\n\t\t\t\tcreateBinArithmetic(\"*\"); \n\t\t\t\tbreak; \n\t\t\tcase ADD : \n\t\t\t\tif ( left != Type.STRING_TYPE ){\n\t\t\t\t\tcreateBinArithmetic(\"+\"); \n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AINVERSE : \n\t\t\t\til.append(new INEG()); \n\t\t\t\tbreak;\n\t\t\t\t//TODO comparison \n\t\t\tcase LOWEREQ:\n\t\t\t\tcreateCmpOp(Constants.IF_ICMPGT);\n\t\t\t\tbreak; \n\t\t\tcase LOWER :\n\t\t\t\tcreateCmpOp(Constants.IF_ICMPGE); \n\t\t\t\tbreak; \n\t\t\tcase BIGGEREQ:\n\t\t\t\tcreateCmpOp(Constants.IF_ICMPLT);\n\t\t\t\tbreak; \n\t\t\tcase BIGGER : \n\t\t\t\tcreateCmpOp(Constants.IF_ICMPLE); \n\t\t\t\tbreak; \n\t\t\tcase EQ :\n\t\t\t\tif (left == Type.BOOLEAN_TYPE || left == Type.INTEGER_TYPE)\n\t\t\t\t\tcreateCmpOp(Constants.IF_ICMPNE);\n\t\t\t\telse\n\t\t\t\t\tcreateCmpOp(Constants.IF_ACMPNE); \n\t\t\t\tbreak;\n\t\t\tcase NEQ :\n\t\t\t\tif (left == Type.BOOLEAN_TYPE || left == Type.INTEGER_TYPE)\n\t\t\t\t\tcreateCmpOp(Constants.IF_ICMPEQ);\n\t\t\t\telse\n\t\t\t\t\tcreateCmpOp(Constants.IF_ACMPEQ); \n\t\t\t\tbreak; \n\t\t\tcase NOT : \n\t\t\t\tcreateCmpOp(Constants.IFNE); \n\t\t\t\tbreak;\n\t\t}\n\t}", "CriteriaExpression<?> getRightHandOperand();", "public static BinaryExpression makeBinary(ExpressionType binaryType, Expression expression0, Expression expression1, boolean liftToNull, Method method) { throw Extensions.todo(); }", "static boolean binaryOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"binaryOperator\")) return false;\n boolean r;\n r = multiplicativeOperator(b, l + 1);\n if (!r) r = additiveOperator(b, l + 1);\n if (!r) r = shiftOperator(b, l + 1);\n if (!r) r = relationalOperator(b, l + 1);\n if (!r) r = consumeToken(b, EQ_EQ);\n if (!r) r = bitwiseOperator(b, l + 1);\n return r;\n }", "public Element compileExpression() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tboolean op;\n\t\tboolean oper = false;\n\t\tString command = \"\";\n\t\tElement expressionParent = document.createElement(\"expression\");\n\n\t\t// if the term-op-term-op cycle breaks, that means its the end of the expression\n\t\tdo {\n\n\t\t\t// At least one term\n\t\t\texpressionParent.appendChild(compileTerm());\n\t\t\t\n\t\t\t//If an operand has been encountered, then can write the command as it is postfix\n\t\t\tif (oper) {\n\t\t\t\twriter.writeCommand(command);\n\t\t\t}\n\t\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\t\tclone.advance();\n\t\t\ttoken = clone.presentToken;\n\n\t\t\t// zero or more ops\n\t\t\tif (token.matches(\"\\\\+|-|\\\\*|/|\\\\&|\\\\||<|=|>|~\")) {\n\t\t\t\toper = true;\n\n\t\t\t\tswitch (token) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tcommand = \"add\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tcommand = \"sub\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tcommand = \"call Math.multiply 2\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tcommand = \"call Math.divide 2\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"<\":\n\t\t\t\t\tcommand = \"lt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \">\":\n\t\t\t\t\tcommand = \"gt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"=\":\n\t\t\t\t\tcommand = \"eq\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"&\":\n\t\t\t\t\tcommand = \"and\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"|\":\n\t\t\t\t\tcommand = \"or\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\texpressionParent.appendChild(ele);\n\t\t\t\tjTokenizer.advance();\n\t\t\t\top = true;\n\t\t\t} else {\n\t\t\t\top = false;\n\t\t\t}\n\t\t} while (op);\n\n\t\treturn expressionParent;\n\t}", "JCExpression TODO(JFXTree tree) {\n return TODO(\"BIND functionality: \" + tree.getClass().getSimpleName());\n }", "public Command createOperationCommand(int operator, Operand operand1, Operand operand2);", "public BindingOperation getBindingOp() {\n return bindingOp;\n }", "public String operator( String op);", "private OpBinary getOpBinary(int opType) {\n switch(opType) {\n case napLexer.ADD: return OpBinary.ADD;\n case napLexer.SUB: return OpBinary.SUB;\n case napLexer.MUL: return OpBinary.MUL;\n case napLexer.DIV: return OpBinary.DIV;\n case napLexer.MOD: return OpBinary.MOD;\n case napLexer.AND: return OpBinary.AND;\n case napLexer.OR: return OpBinary.OR;\n case napLexer.NEQ: return OpBinary.NEQ;\n case napLexer.LT: return OpBinary.LT;\n case napLexer.LE: return OpBinary.LE;\n case napLexer.GT: return OpBinary.GT;\n case napLexer.GE: return OpBinary.GE;\n default: return OpBinary.EQ;\n }\n }", "LogicExpression getExpr();", "public Operator getOperator() {\n return this.operator;\n }", "@Override\n\tpublic Void visit(ClauseOperator clause, Void ctx) {\n\t\treturn null;\n\t}", "private StringBuilder getOperand() {\r\n\t\tif (\"\".equals(operator)) {\r\n\t\t\treturn firstNumber;\r\n\t\t} else {\r\n\t\t\treturn secondNumber;\r\n\t\t}\r\n\t}", "String getOr_op();", "public void emitWithOperand(OpCode opcode, int operandAddress){\n\t\t\n\t}", "@Override void apply(Env env) {\n Frame fr0 = null, fr1 = null;\n double d0=0, d1=0;\n String s0=null, s1=null;\n\n // Must pop ONLY twice off the stack\n int left_type = env.peekType();\n Object left = env.peek();\n int right_type = env.peekTypeAt(-1);\n Object right = env.peekAt(-1);\n\n // Cast the LHS of the op\n switch(left_type) {\n case Env.NUM: d0 = ((ValNum)left)._d; break;\n case Env.ARY: fr0 = ((ValFrame)left)._fr; break;\n case Env.STR: s0 = ((ValStr)left)._s; break;\n default: throw H2O.unimpl(\"Got unusable type: \" + left_type + \" in binary operator \" + opStr());\n }\n\n // Cast the RHS of the op\n switch(right_type) {\n case Env.NUM: d1 = ((ValNum)right)._d; break;\n case Env.ARY: fr1 = ((ValFrame)right)._fr; break;\n case Env.STR: s1 = ((ValStr)right)._s; break;\n default: throw H2O.unimpl(\"Got unusable type: \" + right_type + \" in binary operator \" + opStr());\n }\n\n // If both are doubles on the stack\n if( (fr0==null && fr1==null) && (s0==null && s1==null) ) { env.poppush(2, new ValNum(op(d0, d1))); return; }\n\n // One or both of the items on top of stack are Strings and neither are frames\n if( fr0==null && fr1==null) {\n env.pop(); env.pop();\n // s0 == null -> op(d0, s1)\n if (s0 == null) {\n // cast result of op if doing comparison, else combine the Strings if defined for op\n if (opStr().equals(\"==\") || opStr().equals(\"!=\")) env.push(new ValNum(Double.valueOf(op(d0,s1))));\n else env.push(new ValStr(op(d0,s1)));\n }\n // s1 == null -> op(s0, d1)\n else if (s1 == null) {\n // cast result of op if doing comparison, else combine the Strings if defined for op\n if (opStr().equals(\"==\") || opStr().equals(\"!=\")) env.push(new ValNum(Double.valueOf(op(s0,d1))));\n else env.push(new ValStr(op(s0,d1)));\n // s0 != null, s1 != null\n } else env.push(new ValStr(op(s0,s1)));\n return;\n }\n\n if( fr0!=null ) {\n if( fr0.numCols()==1 && fr0.numRows()==1 ) {\n Vec v = fr0.anyVec();\n if( v.isEnum() ) s0 = v.domain()[(int)v.at(0)];\n else d0 = v.at(0);\n fr0=null;\n }\n }\n\n if( fr1!=null ) {\n if( fr1.numCols()==1 && fr1.numRows()==1 ) {\n Vec v = fr1.anyVec();\n if( v.isEnum() ) s1 = v.domain()[(int)v.at(0)];\n else d1 = v.at(0);\n fr1=null;\n }\n }\n\n // both were 1x1 frames on the stack...\n if( fr0==null && fr1==null ) {\n if( s0==null && s1==null ) env.poppush(2, new ValNum(op(d0, d1)));\n if( s0!=null && s1==null ) env.poppush(2, new ValNum(Double.valueOf(op(s0, d1))));\n if( s0==null && s1!=null ) env.poppush(2, new ValNum(Double.valueOf(op(d0, s1))));\n if( s0!=null && s1!=null ) env.poppush(2, new ValNum(Double.valueOf(op(s0, s1))));\n return;\n }\n\n final boolean lf = fr0 != null;\n final boolean rf = fr1 != null;\n final double df0 = d0, df1 = d1;\n final String sf0 = s0, sf1 = s1;\n Frame fr; // Do-All frame\n int ncols = 0; // Result column count\n if( fr0 !=null ) { // Left?\n ncols = fr0.numCols();\n if( fr1 != null ) {\n if( fr0.numCols() != fr1.numCols() ||\n fr0.numRows() != fr1.numRows() )\n throw new IllegalArgumentException(\"Arrays must be same size: LHS FRAME NUM ROWS/COLS: \"+fr0.numRows()+\"/\"+fr0.numCols() +\" vs RHS FRAME NUM ROWS/COLS: \"+fr1.numRows()+\"/\"+fr1.numCols());\n fr = new Frame(fr0).add(fr1);\n } else {\n fr = new Frame(fr0);\n }\n } else {\n ncols = fr1.numCols();\n fr = new Frame(fr1);\n }\n final ASTBinOp bin = this; // Final 'this' so can use in closure\n\n // Run an arbitrary binary op on one or two frames & scalars\n Frame fr2 = new MRTask() {\n @Override public void map( Chunk chks[], NewChunk nchks[] ) {\n for( int i=0; i<nchks.length; i++ ) {\n NewChunk n =nchks[i];\n int rlen = chks[0]._len;\n Chunk c0 = chks[i];\n if( (!c0.vec().isEnum() &&\n !(lf && rf && chks[i+nchks.length].vec().isEnum())) ||\n bin instanceof ASTEQ ||\n bin instanceof ASTNE ) {\n\n // Loop over rows\n for( int ro=0; ro<rlen; ro++ ) {\n double lv=0; double rv=0; String l=null; String r=null;\n\n // Initialize the lhs value\n if (lf) {\n if(chks[i].vec().isUUID() || (chks[i].isNA(ro) && !bin.opStr().equals(\"|\"))) { n.addNum(Double.NaN); continue; }\n if (chks[i].vec().isEnum()) l = chks[i].vec().domain()[(int)chks[i].atd(ro)];\n else lv = chks[i].atd(ro);\n } else if (sf0 == null) {\n if (Double.isNaN(df0) && !bin.opStr().equals(\"|\")) { n.addNum(Double.NaN); continue; }\n lv = df0; l = null;\n } else {\n l = sf0;\n }\n\n // Initialize the rhs value\n if (rf) {\n if(chks[i+(lf ? nchks.length:0)].vec().isUUID() || chks[i].isNA(ro) && !bin.opStr().equals(\"|\")) { n.addNum(Double.NaN); continue; }\n if (chks[i].vec().isEnum()) r = chks[i].vec().domain()[(int)chks[i].atd(ro)];\n else rv = chks[i+(lf ? nchks.length:0)].atd(ro);\n } else if (sf1 == null) {\n if (Double.isNaN(df1) && !bin.opStr().equals(\"|\")) { n.addNum(Double.NaN); continue; }\n rv = df1; r= null;\n } else {\n r = sf1;\n }\n\n // Append the value to the chunk after applying op(lhs,rhs)\n if (l == null && r == null)\n n.addNum(bin.op(lv, rv));\n else if (l == null) n.addNum(Double.valueOf(bin.op(lv,r)));\n else if (r == null) n.addNum(Double.valueOf(bin.op(l,rv)));\n else n.addNum(Double.valueOf(bin.op(l,r)));\n }\n } else {\n for( int r=0; r<rlen; r++ ) n.addNA();\n }\n }\n }\n }.doAll(ncols,fr).outputFrame(null, (lf ? fr0 : fr1)._names,null);\n env.poppush(2, new ValFrame(fr2));\n }", "@Override\n\tpublic void visit(NumericBind arg0) {\n\t\t\n\t}", "@Override\n\tpublic Object visit(ASTRelational node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "Unary operator(Operator o);", "public boolean rightDistributive( Operator op){\n\t return false;\n }", "public Object visitLogicalOrExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a | (Long) b;\n }\n else {\n return parens(a) + \" || \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.orWith(b);\n \n return bdd;\n }\n }", "public static BinaryExpression makeBinary(ExpressionType binaryType, Expression expression0, Expression expression1, boolean liftToNull, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "void gen() {\n X86.Operand mleft = src1.gen_source_operand(false,tempReg1); \r\n X86.Operand mright = src2.gen_source_operand(true,tempReg2); \r\n X86.emit2(\"cmp\" + X86.Size.Q,mright,mleft);\r\n X86.emit0(\"j\" + op.X86_name() + \" F\" + funcNumber + \"_\" + lab.name);\r\n }", "public final Constant binary_expr() throws RecognitionException {\r\n Constant expr = null;\r\n\r\n\r\n Token BINARY_OP104=null;\r\n Type et1 =null;\r\n\r\n Type vt1 =null;\r\n\r\n Constant ex1 =null;\r\n\r\n Type et2 =null;\r\n\r\n Type vt2 =null;\r\n\r\n Constant ex2 =null;\r\n\r\n\r\n\r\n String op;\r\n String nuw = null;\r\n String nsw = null;\r\n String exact = null;\r\n Type type1 = null;\r\n Constant expr1;\r\n Type type2 = null;\r\n Constant expr2;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:622:5: ( BINARY_OP ( 'nuw' )? ( 'nsw' )? ( 'exact' )? '(' ( (et1= element_type ) | (vt1= vector_type ) ) ex1= expression ',' ( (et2= element_type ) | (vt2= vector_type ) ) ex2= expression ')' )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:622:7: BINARY_OP ( 'nuw' )? ( 'nsw' )? ( 'exact' )? '(' ( (et1= element_type ) | (vt1= vector_type ) ) ex1= expression ',' ( (et2= element_type ) | (vt2= vector_type ) ) ex2= expression ')'\r\n {\r\n BINARY_OP104=(Token)match(input,BINARY_OP,FOLLOW_BINARY_OP_in_binary_expr3338); \r\n\r\n op = (BINARY_OP104!=null?BINARY_OP104.getText():null);\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:623:7: ( 'nuw' )?\r\n int alt79=2;\r\n int LA79_0 = input.LA(1);\r\n\r\n if ( (LA79_0==76) ) {\r\n alt79=1;\r\n }\r\n switch (alt79) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:623:8: 'nuw'\r\n {\r\n match(input,76,FOLLOW_76_in_binary_expr3349); \r\n\r\n nuw = \"nuw\";\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:624:7: ( 'nsw' )?\r\n int alt80=2;\r\n int LA80_0 = input.LA(1);\r\n\r\n if ( (LA80_0==75) ) {\r\n alt80=1;\r\n }\r\n switch (alt80) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:624:8: 'nsw'\r\n {\r\n match(input,75,FOLLOW_75_in_binary_expr3363); \r\n\r\n nsw = \"nsw\";\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:625:7: ( 'exact' )?\r\n int alt81=2;\r\n int LA81_0 = input.LA(1);\r\n\r\n if ( (LA81_0==62) ) {\r\n alt81=1;\r\n }\r\n switch (alt81) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:625:8: 'exact'\r\n {\r\n match(input,62,FOLLOW_62_in_binary_expr3377); \r\n\r\n exact = \"exact\";\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input,41,FOLLOW_41_in_binary_expr3390); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:627:7: ( (et1= element_type ) | (vt1= vector_type ) )\r\n int alt82=2;\r\n int LA82_0 = input.LA(1);\r\n\r\n if ( (LA82_0==BOOLEAN_TYPE||LA82_0==FLOATING_POINT_TYPE||LA82_0==INTEGER_TYPE||LA82_0==LOCAL_VARIABLE) ) {\r\n alt82=1;\r\n }\r\n else if ( (LA82_0==46) ) {\r\n alt82=2;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 82, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt82) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:627:8: (et1= element_type )\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:627:8: (et1= element_type )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:627:9: et1= element_type\r\n {\r\n pushFollow(FOLLOW_element_type_in_binary_expr3405);\r\n et1=element_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n type1 = et1;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:627:51: (vt1= vector_type )\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:627:51: (vt1= vector_type )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:627:52: vt1= vector_type\r\n {\r\n pushFollow(FOLLOW_vector_type_in_binary_expr3416);\r\n vt1=vector_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n\r\n type1 = vt1;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_binary_expr3434);\r\n ex1=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n expr1 = ex1;\r\n\r\n match(input,44,FOLLOW_44_in_binary_expr3437); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:629:7: ( (et2= element_type ) | (vt2= vector_type ) )\r\n int alt83=2;\r\n int LA83_0 = input.LA(1);\r\n\r\n if ( (LA83_0==BOOLEAN_TYPE||LA83_0==FLOATING_POINT_TYPE||LA83_0==INTEGER_TYPE||LA83_0==LOCAL_VARIABLE) ) {\r\n alt83=1;\r\n }\r\n else if ( (LA83_0==46) ) {\r\n alt83=2;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 83, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt83) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:629:8: (et2= element_type )\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:629:8: (et2= element_type )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:629:9: et2= element_type\r\n {\r\n pushFollow(FOLLOW_element_type_in_binary_expr3452);\r\n et2=element_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n type2 = et2;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:629:51: (vt2= vector_type )\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:629:51: (vt2= vector_type )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:629:52: vt2= vector_type\r\n {\r\n pushFollow(FOLLOW_vector_type_in_binary_expr3463);\r\n vt2=vector_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n\r\n type2 = vt2;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_binary_expr3481);\r\n ex2=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n expr2 = ex2;\r\n\r\n match(input,42,FOLLOW_42_in_binary_expr3492); \r\n\r\n }\r\n\r\n\r\n expr = valueFactory.createBinaryExpression(op, nuw, nsw, exact, type1, expr1, type2, expr2);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return expr;\r\n }", "protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }", "java.lang.String getOperator();", "void visitOperatorImpl(OperatorImpl operator);", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "public Object visitBitwiseOrExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a | (Long) b;\n }\n else {\n result = parens(a) + \" | \" + parens(b);\n }\n \n return result;\n }", "public Binary createBinary(Position pos, Expr left, polyglot.ast.Binary.Operator op, Expr right) {\n try {\n return (Binary) xnf.Binary(pos, left, op, right).typeCheck(this);\n } catch (SemanticException e) { \n throw new InternalCompilerError(\"Attempting to synthesize a Binary that cannot be typed\", pos, e);\n }\n }", "public String visit(BinOp n, Object argu)\r\n\t {\r\n switch(n.f0.f0.which)\r\n\t {\r\n\t case 0:return \"slt\";\r\n\t case 1:return \"add\";\r\n\t case 2:return \"sub\";\r\n\t case 3:return \"mul\";\r\n\t default:break;\r\n\t }\r\n return null;\r\n\t }", "private boolean canGenericOperatorsBeRewrite(Expression virtExpr){\r\n\r\n\t for(GenericNames name : GenericNames.values()){\r\n\t\tif(!name.equals(GenericNames.ON_NEW_NAME))\r\n\t\t if(!this.canOperatorBeRewrittenForExpression(name, virtExpr))\r\n\t\t\treturn false;\r\n\t }\r\n\t\treturn true;\r\n\t}", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "public Operator getOp() {\n return op;\n }", "public void execute() {\n\t\t// XOR GATE OP\n\t\txor.a.set(a.get());\n\t\txor.b.set(b.get());\n\t\txor.execute();\n\t\tsum.set(xor.out.get());\n\n\t\t// AND GATE OP\n\t\tand.a.set(a.get());\n\t\tand.b.set(b.get());\n\t\tand.execute();\n\t\tcarry.set(and.out.get());\n\n\t}", "public final Instruction binary_op() throws RecognitionException {\r\n Instruction inst = null;\r\n\r\n\r\n Token BINARY_OP47=null;\r\n Constant e1 =null;\r\n\r\n Constant e2 =null;\r\n\r\n Constant variable46 =null;\r\n\r\n Type element_type48 =null;\r\n\r\n\r\n\r\n Constant dest;\r\n int opcode=InstType.binaryInst;\r\n String op;\r\n String nuw = null;\r\n String nsw = null;\r\n String exact = null;\r\n List<Constant> operands= new ArrayList<Constant>();\r\n List<Type> types = new ArrayList<Type>();\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:266:5: ( variable '=' BINARY_OP ( 'nuw' )? ( 'nsw' )? ( 'exact' )? ( element_type | vector_type ) e1= expression ',' e2= expression )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:267:7: variable '=' BINARY_OP ( 'nuw' )? ( 'nsw' )? ( 'exact' )? ( element_type | vector_type ) e1= expression ',' e2= expression\r\n {\r\n pushFollow(FOLLOW_variable_in_binary_op1442);\r\n variable46=variable();\r\n\r\n state._fsp--;\r\n\r\n\r\n dest = variable46;\r\n\r\n match(input,47,FOLLOW_47_in_binary_op1452); \r\n\r\n BINARY_OP47=(Token)match(input,BINARY_OP,FOLLOW_BINARY_OP_in_binary_op1454); \r\n\r\n op = (BINARY_OP47!=null?BINARY_OP47.getText():null);\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:269:7: ( 'nuw' )?\r\n int alt38=2;\r\n int LA38_0 = input.LA(1);\r\n\r\n if ( (LA38_0==76) ) {\r\n alt38=1;\r\n }\r\n switch (alt38) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:269:8: 'nuw'\r\n {\r\n match(input,76,FOLLOW_76_in_binary_op1465); \r\n\r\n nuw = \"nuw\";\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:269:31: ( 'nsw' )?\r\n int alt39=2;\r\n int LA39_0 = input.LA(1);\r\n\r\n if ( (LA39_0==75) ) {\r\n alt39=1;\r\n }\r\n switch (alt39) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:269:32: 'nsw'\r\n {\r\n match(input,75,FOLLOW_75_in_binary_op1472); \r\n\r\n nsw = \"nsw\";\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:269:55: ( 'exact' )?\r\n int alt40=2;\r\n int LA40_0 = input.LA(1);\r\n\r\n if ( (LA40_0==62) ) {\r\n alt40=1;\r\n }\r\n switch (alt40) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:269:56: 'exact'\r\n {\r\n match(input,62,FOLLOW_62_in_binary_op1479); \r\n\r\n exact = \"exact\";\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:270:7: ( element_type | vector_type )\r\n int alt41=2;\r\n int LA41_0 = input.LA(1);\r\n\r\n if ( (LA41_0==BOOLEAN_TYPE||LA41_0==FLOATING_POINT_TYPE||LA41_0==INTEGER_TYPE||LA41_0==LOCAL_VARIABLE) ) {\r\n alt41=1;\r\n }\r\n else if ( (LA41_0==46) ) {\r\n alt41=2;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 41, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt41) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:270:8: element_type\r\n {\r\n pushFollow(FOLLOW_element_type_in_binary_op1493);\r\n element_type48=element_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(element_type48);\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:270:55: vector_type\r\n {\r\n pushFollow(FOLLOW_vector_type_in_binary_op1498);\r\n vector_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(element_type48);\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_binary_op1514);\r\n e1=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n operands.add(e1);\r\n\r\n match(input,44,FOLLOW_44_in_binary_op1517); \r\n\r\n pushFollow(FOLLOW_expression_in_binary_op1523);\r\n e2=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n operands.add(e2);\r\n\r\n }\r\n\r\n\r\n inst = instFactory.createBinaryInst(dest, opcode, operands, types, op, nuw, nsw, exact);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return inst;\r\n }", "ExpOperand createExpOperand();", "public String getOperator()\r\n {\r\n return operator;\r\n }", "public void setOperator(String operator) {\n this.operator = operator;\n }", "@Override\r\n\tpublic double eval() {\r\n\t\tresult = op.apply(arg.eval());\r\n\t\treturn result;\r\n\t}", "ASTBinOp parse_impl(Exec E) {\n AST l = E.parse();\n AST r = E.parse();\n E.eatEnd(); // eat ending ')'\n ASTBinOp res = (ASTBinOp) clone();\n res._asts = new AST[]{l,r};\n return res;\n }", "public final Operator operator() {\n return operator;\n }", "public interface Operator {\n /**\n * String literal to enter operator\n * @return\n */\n String getKey();\n\n void execute(EvaluatedParameters evaluatedParameters) throws ProcessorException;\n}", "public final EObject ruleXOrOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_2=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4432:28: ( ( () (otherlv_1= 'xor' | otherlv_2= '^' ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4433:1: ( () (otherlv_1= 'xor' | otherlv_2= '^' ) )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4433:1: ( () (otherlv_1= 'xor' | otherlv_2= '^' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4433:2: () (otherlv_1= 'xor' | otherlv_2= '^' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4433:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4434:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getXOrOperatorAccess().getXOrOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4439:2: (otherlv_1= 'xor' | otherlv_2= '^' )\r\n int alt52=2;\r\n int LA52_0 = input.LA(1);\r\n\r\n if ( (LA52_0==49) ) {\r\n alt52=1;\r\n }\r\n else if ( (LA52_0==50) ) {\r\n alt52=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 52, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt52) {\r\n case 1 :\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4439:4: otherlv_1= 'xor'\r\n {\r\n otherlv_1=(Token)match(input,49,FOLLOW_49_in_ruleXOrOperator9638); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getXOrOperatorAccess().getXorKeyword_1_0());\r\n \r\n }\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4444:7: otherlv_2= '^'\r\n {\r\n otherlv_2=(Token)match(input,50,FOLLOW_50_in_ruleXOrOperator9656); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_2, grammarAccess.getXOrOperatorAccess().getCircumflexAccentKeyword_1_1());\r\n \r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "OpFunctionArgOperand createOpFunctionArgOperand();", "private void executeBinaryExpression(Tree tree) {\n ProgramState.Pop unstackBinary = programState.unstackValue(2);\n programState = unstackBinary.state;\n SymbolicValue symbolicValue = constraintManager.createSymbolicValue(tree);\n symbolicValue.computedFrom(unstackBinary.values);\n programState = programState.stackValue(symbolicValue);\n }", "public void emit(OpCode opcode){\n\t\t\n\t}", "public Object lambda10() {\n return Scheme.applyToArgs.apply2(this.sk, AddOp.$Pl.apply2(this.i, pregexp.Lit8));\n }", "@Override\r\n\tpublic void visit(UnaryExpression unaryExpression) {\n\r\n\t}", "public String getOperator() {\n return operator;\n }", "@Override\n public String visit(BinOp n) {\n /*\n * MOVE t2 MINUS t0 t1\n * sub $t2, $t0, $t1\n *\n * MOVE t1 t0 1\n * sub $t1, $t0, 1\n */\n String _ret = null;\n String op = this.op[n.f0.f0.which];\n String r1 = this.moveReg;\n this.moveReg = null; // 用完即删\n String r2 = this.reg[n.f1.f0.which];\n String simpleExp = n.f2.accept(this); // 返回若为 Reg,已经自带 '$'\n Global.outputString += op + \" $\" + r1 + \", $\" + r2 + \", \" + simpleExp\n + '\\n';\n return _ret;\n }", "public void visit(Operand operand);", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "String getOperator();" ]
[ "0.6320584", "0.6086504", "0.6065615", "0.6058255", "0.6042578", "0.59139043", "0.5905789", "0.5892243", "0.58298975", "0.5796934", "0.5794267", "0.57787037", "0.57780975", "0.575556", "0.57186556", "0.5705575", "0.5657079", "0.56313026", "0.56243867", "0.5618511", "0.56144875", "0.5602995", "0.5559065", "0.5558128", "0.55456966", "0.5545302", "0.5535795", "0.55311346", "0.55066615", "0.55039525", "0.5497043", "0.54684055", "0.546318", "0.54516995", "0.5438861", "0.54369533", "0.54363114", "0.54195106", "0.54159427", "0.54024714", "0.53979576", "0.5390558", "0.5389862", "0.5382326", "0.5370631", "0.537015", "0.5365503", "0.53648275", "0.5361618", "0.53577805", "0.5346699", "0.53449076", "0.53370243", "0.5336829", "0.53367805", "0.5330691", "0.5329474", "0.53210086", "0.53150374", "0.53053385", "0.5303539", "0.5302125", "0.5300079", "0.5293978", "0.52918667", "0.52876824", "0.5287397", "0.5284273", "0.528341", "0.52805823", "0.5275577", "0.5270738", "0.52700216", "0.52685034", "0.5267503", "0.5262727", "0.52563673", "0.5252068", "0.52501714", "0.5245403", "0.5242916", "0.5241938", "0.5241302", "0.5240931", "0.522553", "0.52248126", "0.52238995", "0.521881", "0.52152187", "0.5214733", "0.52063507", "0.5205005", "0.5202901", "0.5199931", "0.51925254", "0.5192514", "0.519148", "0.5188166", "0.51876336", "0.5180869", "0.51755023" ]
0.0
-1
end of generateExpression Return whether or not this expression tree is cloneable.
public boolean isCloneable() { return leftOperand.isCloneable() && rightOperand.isCloneable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tAlgebraicExpression clone();", "public Object clone() throws CloneNotSupportedException {\r\n\t\t// Shallow clone\r\n\t\tExpression v = (Expression) super.clone();\r\n\t\tv.eval_stack = null;\r\n\t\t// v.text = new StringBuffer(new String(text));\r\n\t\tint size = elements.size();\r\n\t\tArrayList cloned_elements = new ArrayList(size);\r\n\t\tv.elements = cloned_elements;\r\n\r\n\t\treturn v;\r\n\t}", "public void changeIsClone()\r\n\t{\r\n\t\tisClone = !isClone;\r\n\t}", "public Expression deepCopy()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}", "public boolean isCloneSupported() {\r\n return true;\r\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone()\n {\n return new ReturnStatement((Expression) expression.clone(), -1, -1);\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public java.lang.Boolean getCloneFromSnapshotSupported() {\r\n return cloneFromSnapshotSupported;\r\n }", "public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}", "public QueryNode cloneTree() throws CloneNotSupportedException;", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public abstract Object clone() ;", "public abstract Object clone();", "@Override\n\tpublic boolean isExpression() {\n\t\treturn heldObj.isExpression();\n\t}", "public Object clone() {\n AggregateSymbol copy = new AggregateSymbol(getName(), getAggregateFunction(), isDistinct(), LanguageObject.Util.deepClone(getArgs()));\n if (orderBy != null) {\n copy.setOrderBy(orderBy.clone());\n }\n if (condition != null) {\n copy.setCondition((Expression) condition.clone());\n }\n copy.isWindowed = this.isWindowed;\n copy.type = this.type;\n copy.setFunctionDescriptor(getFunctionDescriptor());\n return copy;\n }", "@Override\n public PhoneNumberCloneable clone() {\n try {\n return (PhoneNumberCloneable) super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(); // Can't happen}\n }\n }", "public Expression deepCopy (){\n return new LiteralExpression(_value);\n }", "public Function clone();", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public Object clone() {\n/* */ try {\n/* 111 */ return super.clone();\n/* */ }\n/* 113 */ catch (CloneNotSupportedException cloneNotSupportedException) {\n/* 114 */ throw new InternalError(cloneNotSupportedException.toString(), cloneNotSupportedException);\n/* */ } \n/* */ }", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public boolean prepareClone() {\n\n switch (this.type) {\n\n case KVM:\n System.out.println(\"Preparing the KVM clone \" + this.name);\n System.err.println(\"Not yet implemented for the KVM clones\");\n break;\n\n case VIRTUALBOX:\n\n System.out.println(\"Preparing the Virtualbox clone \" + this.name);\n CloneState cloneState = getTheStateOfPhysicalMachine();\n System.out.println(\"clone \" + this.name + \" is on \" + cloneState + \" state\");\n\n switch (cloneState) {\n\n case STOPPED:\n if (startVBClone()) {\n System.out.println(\"Started the Virtualbox clone \" + this.name);\n this.status = CloneState.RESUMED;\n return true;\n } else {\n System.err.println(\"Could not start the Virtualbox clone \" + this.name);\n this.status = CloneState.STOPPED;\n return false;\n }\n\n case PAUSED:\n if (resumeVBClone()) {\n System.out.println(\"Resumed the Virtualbox clone \" + this.name);\n this.status = CloneState.RESUMED;\n return true;\n } else {\n System.err.println(\"Could not resume the Virtualbox clone \" + this.name);\n this.status = CloneState.STOPPED;\n return false;\n }\n\n case RESUMED:\n System.out.println(\"The Virtualbox clone \" + this.name + \" was already started\");\n return true;\n\n default:\n break;\n }\n\n return false;\n\n case AMAZON:\n System.out.println(\"Preparing the Amazon clone \" + this.name);\n System.err.println(\"Not yet implemented for the amazon clones\");\n break;\n\n case UNKNOWN:\n System.err.println(\"I don't know how to start the clone \" + this.name);\n printInfoAboutCloneName();\n break;\n }\n\n return false;\n }", "@Override\n protected PlanNode clone() throws CloneNotSupportedException {\n NestedLoopsJoinNode node = (NestedLoopsJoinNode) super.clone();\n\n // Clone the predicate.\n if (predicate != null)\n node.predicate = predicate.duplicate();\n else\n node.predicate = null;\n\n return node;\n }", "public EnbOper cloneShallow() {\n return (EnbOper)cloneShallowContent(new EnbOper());\n }", "public RMShape cloneDeep() { return clone(); }", "@Override\n public AggregationBuilder clone() {\n try {\n AggregationBuilder clone = (AggregationBuilder) super.clone();\n clone.root = root.clone();\n clone.current = clone.root;\n return clone;\n } catch(CloneNotSupportedException ex){\n return null;\n }\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "@Override\n\tpublic YoungO clone() throws CloneNotSupportedException {\n\t\tYoungO toReturn = (YoungO) super.clone();\n\t\treturn toReturn;\n\t}", "@Override\n public Object clone() throws CloneNotSupportedException {\n\t return new TypeCloner(this, super.clone()).invoke();\n\t}", "public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public void testClone()\n {\n // as lifted from the JDK Object JavaDoc for clone:\n // x.clone() Creates and returns a copy of x.\n // The precise meaning of \"copy\" may depend on\n // the class of the object. The general intent\n // is that, for any object x, the expression: \n // x.clone() != x \n // will be true, and that the expression: \n // x.clone().getClass() == x.getClass()\n // will be true, but these are not absolute requirements.\n // While it is typically the case that:\n // x.clone().equals(x)\n // will be true, this is not an absolute requirement.\n // For EthernetAddress, this test will check that all the above\n // ARE true in the case of EthernetAddress clone() because it is\n // the desired behavior.\n EthernetAddress x = new EthernetAddress(VALID_ETHERNET_ADDRESS_STRING);\n assertTrue(\"x.clone() != x did not return true\",\n x.clone() != x);\n assertTrue(\"x.clone().getClass() == x.getClass() did not return true\",\n x.clone().getClass() == x.getClass());\n assertTrue(\"x.clone().equals(x) did not return true\",\n x.clone().equals(x));\n }", "public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}", "public abstract Shape clone() throws CloneNotSupportedException;", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "public Object clone() {\n \ttry {\n \tMyClass1 result = (MyClass1) super.clone();\n \tresult.Some2Ob = (Some2)Some2Ob.clone(); ///IMPORTANT: Some2 clone method called for deep copy without calling this Some2.x will be = 12\n \t\n \treturn result;\n \t} catch (CloneNotSupportedException e) {\n \treturn null; \n \t}\n\t}", "@Override\r\n\tpublic Object clone() throws CloneNotSupportedException {\r\n\t\tConditionalOp clone = (ConditionalOp) super.clone();\r\n\t\tclone.isFloatType = isFloatType;\r\n\t\treturn clone;\r\n\t}", "@Override\r\n\t\tpublic Node cloneNode(boolean deep)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "@Override\n\tpublic ConditionConnective clone() {\n\t\tfinal ConditionConnective clone = new ConditionConnective(type);\n\t\tfor (final Condition c : conditions) {\n\t\t\tclone.conditions.add(c.clone());\n\t\t}\n\t\treturn clone;\n\t}", "public boolean isReifiable() {\n ASTNode$State state = state();\n try { return false; }\n finally {\n }\n }", "public CFExp deepCopy(){\r\n return this;\r\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "boolean isImmutable();", "@Override\r\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\n\t}", "public abstract GameObject clone();", "public boolean isCopyState() {\n\t\treturn true;\n\t}", "@Override\n public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "@Override\n public GraphicsState clone(\n )\n {\n GraphicsState clone;\n {\n // Shallow copy.\n try\n {clone = (GraphicsState)super.clone();}\n catch(CloneNotSupportedException e)\n {throw new RuntimeException(e);} // NOTE: It should never happen.\n\n // Deep copy.\n /* NOTE: Mutable objects are to be cloned. */\n clone.ctm = (AffineTransform)ctm.clone();\n clone.tlm = (AffineTransform)tlm.clone();\n clone.tm = (AffineTransform)tm.clone();\n }\n return clone;\n }", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public Object clone() throws CloneNotSupportedException{\n\t\tthrow (new CloneNotSupportedException());\n\t}", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public Stack<E> clone() {\n try { return (Stack<E>) super.clone(); }\n catch(CloneNotSupportedException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n return null;\n }\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n\n return super.clone();\n }", "public Object clone() throws CloneNotSupportedException\n\t{\n\t\tthrow new CloneNotSupportedException();\n\t}", "public boolean isExpression (Object value);", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public void testClone() {\n System.out.println(\"clone\");\n Play instance = new Play(\"Player1\", new Card(Rank.QUEEN, Suit.SPADES));\n Play expResult = instance;\n Play result = instance.clone();\n assertNotSame(expResult, result);\n }", "public Solution deepClone() {\n\t\tArrayList<GridPoint> cloneRepresentation = new ArrayList<GridPoint>();\n\t\t\n\t\tfor(GridPoint p : solutionRepresentation) {\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0] = p.getX();\n\t\t\tcoord[1] = p.getY();\n\t\t\tcloneRepresentation.add(new GridPoint(coord));\n\t\t}\n\t\treturn new Solution(this.host, cloneRepresentation);\n\t}", "public final Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "@Override\r\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\t\r\n\t\treturn super.clone();\r\n\t}", "public EnbOper clone() {\n return (EnbOper)cloneContent(new EnbOper());\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-110),\n Long.valueOf(78),\n Order.getDefault(),\n \"08618abe-660a-4e54-bad6-818ca0dfef42\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = subtenantpolicygrouplistoptions1.clone();\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n\tpublic final void testClone(){\n\t\tShape starting = shape.clone();\n\t\tassertNotNull( starting );\n\t\tshape.shiftDown();\n\t\tCell[] startingCells = starting.getCells();\n\t\tCell[] endingCells = shape.getCells();\n\t\tfor( int i = 0; i < startingCells.length; i++ ){\n\t\t\tassertNotEquals( \"Cell \" + i, startingCells[i], endingCells[i] );\n\t\t}\n\t}", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "protected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "Component deepClone();", "public Object clone() {\r\n // Implementation notes: Since all state of an XMLOutputter is\r\n // embodied in simple private instance variables, Object.clone\r\n // can be used. Note that since Object.clone is totally\r\n // broken, we must catch an exception that will never be\r\n // thrown.\r\n try {\r\n return super.clone();\r\n }\r\n catch (java.lang.CloneNotSupportedException e) {\r\n // even though this should never ever happen, it's still\r\n // possible to fool Java into throwing a\r\n // CloneNotSupportedException. If that happens, we\r\n // shouldn't swallow it.\r\n throw new RuntimeException(e.toString());\r\n }\r\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\treturn super.clone();\n\t}", "@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}", "public abstract State clone();", "@Override\npublic Object clone() throws CloneNotSupportedException {\n\tSystem.out.println(\"Clone is running....\"+namr);\n\treturn super.clone();\n}", "public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n /* Cannot happen */\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "public Node cloneNode(boolean deep) {\n/* 320 */ cloneDeepCheck(deep);\n/* */ \n/* 322 */ return new PoaMaestroMultivaloresHTML(this);\n/* */ }", "@Override\n\tpublic Object clone() \n\t{\n\t\ttry{\n\t\t// Note all state is primitive so no need to deep copy reference types.\n\t\treturn (Tile) super.clone();\n\t\t} catch (CloneNotSupportedException e) \n\t\t{\n\t\t\t// We should not ever be here as we implement Cloneable.\n\t\t\t// It is better to deal with the exception here rather than letting\n\t\t\t// clone throw it as we would have to catch it in more places then.\n\t\t\treturn null;\n\t\t}\n\t}", "Object clone();", "Object clone();", "public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException(\"clone() is not supported in \"+this.getClass().getName());\n }" ]
[ "0.66039217", "0.657075", "0.6270048", "0.6239141", "0.6133029", "0.6081622", "0.6015655", "0.5950775", "0.5950699", "0.58158064", "0.57664263", "0.575159", "0.5709488", "0.5691728", "0.5684231", "0.56757385", "0.5665772", "0.5561068", "0.55410564", "0.5538098", "0.55264974", "0.5526123", "0.55231065", "0.55201435", "0.5495792", "0.54864454", "0.5482341", "0.5448252", "0.5442088", "0.54163724", "0.54044294", "0.5401724", "0.5389438", "0.5374858", "0.53596526", "0.5352753", "0.5334378", "0.5328306", "0.5324306", "0.53176546", "0.5305437", "0.5305437", "0.5305437", "0.5305437", "0.52951336", "0.5291133", "0.5289723", "0.5287949", "0.5273378", "0.5269314", "0.52627754", "0.5257376", "0.5255469", "0.52531314", "0.5251077", "0.5246616", "0.5242813", "0.5236127", "0.5236127", "0.5236127", "0.5234605", "0.5234605", "0.5234605", "0.52331126", "0.5231473", "0.5221719", "0.5215426", "0.5213852", "0.52137214", "0.52131575", "0.52131575", "0.52131575", "0.52131575", "0.52131575", "0.52131575", "0.52131575", "0.52131575", "0.52131575", "0.5205575", "0.52049506", "0.52042145", "0.5203448", "0.51981956", "0.5195535", "0.51940227", "0.5192482", "0.5191331", "0.5188641", "0.51822525", "0.5179758", "0.5177455", "0.51738584", "0.51712", "0.51674473", "0.5166354", "0.5164844", "0.5164099", "0.5164003", "0.5164003", "0.5160792" ]
0.78306854
0
Return a clone of this node.
public ValueNode getClone() throws StandardException { TimestampOperatorNode newTS = (TimestampOperatorNode) getNodeFactory().getNode( C_NodeTypes.TIMESTAMP_OPERATOR_NODE, leftOperand, rightOperand, getContextManager()); newTS.copyFields(this); return newTS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Node clone() {\n Node node = null;\n try {\n node = (Node) super.clone();\n } catch (Exception e) {\n System.err.println(\"Unable to clone!\");\n e.printStackTrace();\n }\n return node;\n }", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "public Node clone() {\n Node n = new Node((float) this.getSimPos().getX(), (float) this.getSimPos().getY(), radius*2, isStationary, this.renderColor);\n n.node_uuid = this.node_uuid;\n return n;\n }", "public Object clone() {\n return this.copy();\n }", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public Tree<T> clone() {\n Node<T> clonedRoot = this.root.clone();\n clone(this.root, this.root.clone());\n return new Tree<T>(clonedRoot);\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Function clone();", "public abstract Node copy();", "public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }", "Object clone();", "Object clone();", "public LinkedList<AnyType> clone() {\n LinkedList<AnyType> clone = new LinkedList<AnyType>();\n LinkedListIterator<AnyType> itr = this.first();\n LinkedListIterator<AnyType> cloneitr = clone.zeroth();\n while (itr.current != null) {\n clone.insert(itr.current.element, cloneitr);\n itr.advance();\n cloneitr.advance();\n }\n return clone;\n }", "public Object clone() {\n\t\tSubstrateNetwork s = new SubstrateNetwork(this.listNode, this.listLink);\n\t\treturn s;\n\t}", "@Override\r\n\tpublic BinaryNodeInterface<E> copy() {\n\t\treturn null;\r\n\t}", "public Restaurant clone() {\r\n return new Restaurant(this);\r\n }", "public Object clone() {\n \t\treturn new Term(this);\n \t}", "public QueryNode cloneTree() throws CloneNotSupportedException;", "public Node cloneNode () {\n return new VcsGroupFileNode(shadowObject, originalNode);\n }", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "public LinkedList clone(){\n\t\tif(firstNode == null) return new LinkedList(null);\n\t\treturn new LinkedList(firstNode.clone());\n\t}", "public abstract Object clone();", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "public BinaryNode copy() {\n\t\tBinaryNode newRoot = new BinaryNode(data);\n\t\tif(leftChild != null)\n\t\t\tnewRoot.setLeftChild(leftChild.copy());\n\t\tif(rightChild != null)\n\t\t\tnewRoot.setRightChild(rightChild.copy());\n\t\treturn newRoot;\n\t}", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "public abstract Object clone() ;", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public Object clone() {\n return new PointImpl( this );\n }", "public Entity clone() {\n try {\n return (Entity) super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n return null;\n }\n }", "public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}", "@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}", "public T cloneDeep();", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public StringStack clone()\n\t{\n\t\tStringStack clonedStack = new StringStack();\n\t\tnodePtr = top;\n\t\twhile (nodePtr!=null)\n\t\t{\n\t\t\tclonedStack.push(nodePtr.getData());\n\t\t\tnodePtr = nodePtr.getLink();\n\t\t}\n\t\treturn clonedStack;\n\t}", "public Stack<E> clone() {\n try { return (Stack<E>) super.clone(); }\n catch(CloneNotSupportedException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n return null;\n }\n }", "@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }", "public Object clone() {\r\n // Implementation notes: Since all state of an XMLOutputter is\r\n // embodied in simple private instance variables, Object.clone\r\n // can be used. Note that since Object.clone is totally\r\n // broken, we must catch an exception that will never be\r\n // thrown.\r\n try {\r\n return super.clone();\r\n }\r\n catch (java.lang.CloneNotSupportedException e) {\r\n // even though this should never ever happen, it's still\r\n // possible to fool Java into throwing a\r\n // CloneNotSupportedException. If that happens, we\r\n // shouldn't swallow it.\r\n throw new RuntimeException(e.toString());\r\n }\r\n }", "public MemberAddress clone() {\r\n try {\r\n return (MemberAddress)super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n throw new IllegalStateException(\"Failed to clone the entity: \" + toString(), e);\r\n }\r\n }", "public Vector clone()\r\n {\r\n Vector<O> v = new Vector<O>();\r\n \r\n VectorItem<O> vi = first;\r\n while (vi != null)\r\n {\r\n v.pushBack (vi.getObject());\r\n vi = vi.getNext();\r\n }\r\n \r\n return v;\r\n }", "@Override\n public Drop clone() {\n try {\n return (Drop) super.clone();\n } catch (CloneNotSupportedException ex) {\n // Never.\n return null;\n }\n }", "@Override\n\tpublic Box clone()\n\t{\n\t\treturn new Box(center.clone(), xExtent, yExtent, zExtent);\n\t}", "@Override\r\n\t\tpublic Node cloneNode(boolean deep)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n public GeoPoint clone() {\n return new GeoPoint(this.latitude, this.longitude);\n }", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "public Clone() {}", "public Tree copy() {\n Tree cpTree = new Tree();\n if(!empty()) {\n Node cpNode = copyNodes(root);\n cpTree.setRoot(cpNode);\n }\n return cpTree;\n }", "public EnbOper clone() {\n return (EnbOper)cloneContent(new EnbOper());\n }", "public Object clone()\n {\n Object o = null;\n try \n { o = super.clone(); } \n catch(CloneNotSupportedException e) \n { System.err.println(\"Erreur dans le clonage de la cellule...\"); }\n return o;\n }", "final public Attr clone() {\r\n\t\t\tif(Vector == null)\r\n\t\t\t\treturn new Attr(Name, Value, null);\r\n\t\t\telse if(Object == null)\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone());\r\n\t\t\telse\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone(), Object);\r\n\t\t}", "public AST copy()\n {\n return new Implicate(left, right);\n }", "public Update clone() {\n return (Update)cloneContent(new Update());\n }", "public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n /* Cannot happen */\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "public Piece clone() {\n return new Pawn(new Point(this.location.x, this.location.y),\n this.color, this.numMoves, this.enPassantOk);\n }", "public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "@Override\n public AggregationBuilder clone() {\n try {\n AggregationBuilder clone = (AggregationBuilder) super.clone();\n clone.root = root.clone();\n clone.current = clone.root;\n return clone;\n } catch(CloneNotSupportedException ex){\n return null;\n }\n }", "public Object clone() {\n GlobalizedAnswer cloned;\n try {\n cloned = (GlobalizedAnswer)super.clone();\n }\n catch (CloneNotSupportedException e) {\n throw new Error(getClass() + \" must support cloning\", e);\n }\n assert cloned != null;\n \n // Copy mutable fields by value\n cloned.tuples = (Tuples) tuples.clone();\n \n return cloned;\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return (InstTexes) super.clone();\n }", "@Override\n\tpublic Message clone() {\n\t\treturn this;\n\t}", "@Override\n\tpublic Message clone() {\n\t\treturn this;\n\t}", "@Override\n\tpublic Message clone() {\n\t\treturn this;\n\t}", "public EnbOper cloneShallow() {\n return (EnbOper)cloneShallowContent(new EnbOper());\n }", "@Override\n public User clone(){\n return new User(this);\n }", "public a clone() {\n try {\n a aVar = (a) super.clone();\n aVar.f22064a = null;\n return aVar;\n } catch (CloneNotSupportedException unused) {\n return null;\n }\n }", "@Override\n public MetaContainer clone() {\n return clone(false);\n }", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "Point clone ();", "@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}", "public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}", "@Override\n\tpublic Component clone() {\n\t\treturn null;\n\t}", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public abstract TreeNode copy();", "@Override\n public ISentence clone() {\n WordNode newSentence = new WordNode(this.word, restOfSentence.clone());\n return newSentence;\n }", "@Override\n public ChessPiece clone() {\n ChessPiece copy = new Bishop(this.owner);\n this.owner.removeChessPiece(copy);\n copy.canCastle = this.canCastle;\n copy.icon = this.icon;\n\n return copy;\n }", "public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "@Override\n\tpublic MapNode clone()\n\t{\n\t\t// Create copy of this map node\n\t\tMapNode copy = (MapNode)super.clone();\n\n\t\t// Copy KV pairs\n\t\tcopy.pairs = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, AbstractNode> pair : pairs.entrySet())\n\t\t{\n\t\t\tAbstractNode value = pair.getValue().clone();\n\t\t\tcopy.pairs.put(pair.getKey(), value);\n\t\t\tvalue.setParent(copy);\n\t\t}\n\n\t\t// Return copy\n\t\treturn copy;\n\t}", "public GitHubAccount clone() {\n return new GitHubAccount(this.value);\n }", "Component deepClone();", "public HeapElt copy() {\n HeapElt newElement = new HeapElt();\n \n newElement.setHandle(this.handle);\n newElement.setRecord(this.record);\n \n return newElement;\n }", "public Object clone() throws CloneNotSupportedException {\n // return INSTANCE\n throw new CloneNotSupportedException();\n }", "public Object clone() throws CloneNotSupportedException {\r\n\t\t// Shallow clone\r\n\t\tExpression v = (Expression) super.clone();\r\n\t\tv.eval_stack = null;\r\n\t\t// v.text = new StringBuffer(new String(text));\r\n\t\tint size = elements.size();\r\n\t\tArrayList cloned_elements = new ArrayList(size);\r\n\t\tv.elements = cloned_elements;\r\n\r\n\t\treturn v;\r\n\t}", "public Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public Srv clone() {\n return (Srv)cloneContent(new Srv());\n }", "abstract public Vertex cloneMe();", "public Object clone() {\n \ttry {\n \tMyClass1 result = (MyClass1) super.clone();\n \tresult.Some2Ob = (Some2)Some2Ob.clone(); ///IMPORTANT: Some2 clone method called for deep copy without calling this Some2.x will be = 12\n \t\n \treturn result;\n \t} catch (CloneNotSupportedException e) {\n \treturn null; \n \t}\n\t}", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }" ]
[ "0.8177986", "0.7942636", "0.79110694", "0.783597", "0.78324795", "0.77330136", "0.76885337", "0.7630234", "0.75539565", "0.7534487", "0.7510624", "0.75089824", "0.7430192", "0.7430192", "0.7430192", "0.7430192", "0.73797154", "0.73642933", "0.73408407", "0.7315098", "0.7315098", "0.72999305", "0.72595", "0.7174971", "0.7167952", "0.7140757", "0.71281296", "0.7116575", "0.71133673", "0.7084329", "0.7074401", "0.70657223", "0.70612544", "0.70345455", "0.70340484", "0.70209813", "0.7010075", "0.69974756", "0.6980533", "0.6978801", "0.69746345", "0.6970993", "0.6963709", "0.69445634", "0.6941192", "0.6918997", "0.69151294", "0.6900331", "0.68911695", "0.68891543", "0.6876745", "0.68721503", "0.6864361", "0.68581355", "0.68528605", "0.68494326", "0.6843207", "0.68427056", "0.6831028", "0.6822967", "0.6819204", "0.68168026", "0.6813863", "0.6788638", "0.67834353", "0.6769635", "0.67624164", "0.6742795", "0.673354", "0.6723605", "0.67234623", "0.67139685", "0.67139685", "0.67139685", "0.67104053", "0.67066175", "0.67061436", "0.670108", "0.6689656", "0.6688464", "0.6679545", "0.66773283", "0.66670513", "0.66636914", "0.66618377", "0.6661758", "0.66614765", "0.6650285", "0.6641842", "0.66355276", "0.6634567", "0.66331196", "0.66232014", "0.66216546", "0.6621419", "0.6611188", "0.6603487", "0.6602369", "0.65929365", "0.65883934", "0.6582944" ]
0.0
-1
TS_Agent_01_E2E To verify whether the Partner service agent is able to register a Broker through Partner service agent journey TS_Agent_03 To verify whether the broker registered through CSA is able to log in via broker partner portal TS_Agent_18 To verify whether Register user page is displayed when clicking Register user link in Partner service agent page
@Test(groups ={Slingshot,Regression,CsaAgent}) public void verifyPartnerServiceAgentRegisterUser() throws Exception { Report.createTestLogHeader("PSA Journey", "To verify whether the Partner service agent is able to register a Broker through Partner service agent journey"); UserProfile userProfile = new TestDataHelper().getUserProfile("PSABroker"); CrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile("SlingshotCrmDetails"); new PartnerServiceAgentAction() .navigateToPSARegistration() .clickRegisteraUser(userProfile); /*new SapCrmAction() .loginDetails(crmuserProfile) .searchByAccountId(crmuserProfile, userProfile);*/ new RegistrationAction() .openEncryptURL(userProfile) .fillRegistrationDetails(userProfile) .verifyThankYouPage() .clickLoginLink() .verifyAuditEntry(userProfile) .verifyEmailIdInDb(userProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUserFunctionality() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify whether the account status of broker is successfully changed by agent\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t/*deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);*/\n\t\t\t\t\n\t\t\t\t//verify Lookup User functionality\n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.updateAndVerifyStatus(userProfile);\n\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUser() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify updated user details page through Look up user navigation\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\tnew RegistrationAction()\n\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t.verifyThankYouPage()\n\t\t\t\t.clickLoginLink()\n\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t.verifyEmailIdInDb(userProfile);\n\t\t\t\t//verify Lookup User functionality\n*/\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyUpdateUserDetailsPage()\n\t\t\t\t\t.verifyUserAccountInformation(userProfile);\t\t\n\t\t\t\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyImpersonateUserLink() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"ViewBillPartner\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew SapCrmAction()\n\t\t\t\t\t .loginDetails(crmuserProfile)\n\t\t\t\t\t .searchByAccountId(crmuserProfile, userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\t//verify Lookup User functionality\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyImpersonateLink(smrProfile);\t \n\t\t\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyPasswordResetLink() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew SapCrmAction()\n\t\t\t\t\t .loginDetails(crmuserProfile)\n\t\t\t\t\t .searchByAccountId(crmuserProfile, userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\t//verify Lookup User functionality\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyPasswordLink(userProfile);\t \n\t\t\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyAuditTrailSearch() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyAuditTrail(userProfile);\n\t\t\t\t \n\t\t\t\t}", "@Test(groups=\"SMR1137\")\r\n\tpublic void smr1137(){\r\n\t\ttry {\r\n\t\t\t//final String firstName=testDataOR.get(\"mono_first_name\"),lastName=testDataOR.get(\"mono_last_name\"); \r\n\t\t\t//login(\"URLEportal\",testDataOR.get(\"mono_user_login\"),firstName,lastName);\r\n\t\t\teportalCust=testDataOR.get(\"customer\");\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEportal\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t//login(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t/*logger.info(\"SMR1137 execution started\");\r\n\t\t\tfinal String customerName=testDataOR.get(\"customer\");\r\n\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 1 :\");\r\n\t\t\tlogger.info(\"Access eportal with superuser\");\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 2,3,4:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Disable ‘ePayment’ module and validate\r\n\t\t\tlogger.info(\"Step 5:\");\r\n\t\t\tdisableModNVal(\"ep_ckbx_id\", EPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Disable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tdisableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Access ePortal with a superuser and select customer\r\n\t\t\t//In Store Payment menu should not be available\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tAssert.assertFalse(selUtils.isElementPresentCommon(\"instorepay_tab_xpath\"),INSTOREPAY+\" menu is available\");\r\n\t\t\tlogger.info(\"In store payment menu is not available\");\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 8,9:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Enable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 10\");\r\n\t\t\tenableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\r\n\t\t\t\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 11\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);*/\r\n\t\t\tlogger.info(\"SMR1137 execution started\");\r\n\t\t}catch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "@Test(priority = 4, dependsOnMethods = { \"verifyUrlOfSubscription\" }, groups = { \"Smoke\" })\n\tpublic static void verifySubscriptionPageComponents() throws InterruptedException \n\t{\n\n\t\ttest = report.startTest(\"Verify Components of Subscription Page\");\n \n\t\t\n\t\t //verify Select Service Principal\n\t\t WebElement selectServicePrincipal=driver.findElement(By.xpath(xpathSelectServicePrincipal));\n\t\t Assert.assertTrue(selectServicePrincipal.isDisplayed());\n\t\t test.log(LogStatus.PASS, \"Select Service Principal\",\"Select Service Principal is displaying\");\n\t\t \n\t\t //Verify Select Service Principal Field WaterMark\n\t\t String selectServicePrincipalWM = driver.findElement(By.xpath(xpathSelectServicePrincipalWM)).getText();\n Assert.assertEquals(selectServicePrincipalWM,\"Select Service Principal *\",\"select Service Principal WaterMark is not Displaying \");\n test.log(LogStatus.PASS,\"Select Service Principal WM\", \"select Service Principal WaterMark is Displaying\");\n\t\t\n\t\t\n\t\t// Verify Name Field\n\t\tWebElement name = driver.findElement(By.id(idName));\n\t\tAssert.assertTrue(name.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"Name Field\", \"Name Field is displaying\");\n\n\t\t// Verify Name Field WaterMark\n\t\tString nameWaterMark = driver.findElement(By.xpath(xpathNameWaterMark)).getText();\n\t\tAssert.assertEquals(nameWaterMark, \"Name *\", \"Name * WaterAmrk is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Name Field WaterMark\", \"Name * WaterMark is Displaying\");\n\n\t\t// Verify Subscription Id Field\n\t\tWebElement subScription = driver.findElement(By.id(idSubScription));\n\t\tAssert.assertTrue(subScription.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"SubScription Field\", \"SubScription Field is displaying\");\n\n\t\t// Verify Subscription Id Field WaterMark\n\t\tString subscriptionIdWaterMark = driver.findElement(By.xpath(xpathSubscriptionIdWaterMark)).getText();\n\t\tAssert.assertEquals(subscriptionIdWaterMark, \"Subscription ID *\",\n\t\t\t\t\"Subscription ID * WaterMark is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"SubScription Field WaterMark\", \"Subscription ID * WaterMark is Displaying\");\n\n\t\t// Verify Description Field\n\t\tWebElement description = driver.findElement(By.id(idDescription));\n\t\tAssert.assertTrue(description.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"Description Field\", \"Description Field is displaying\");\n\n\t\t// Verify Description Field WaterMark\n\t\tString descriptionWaterMark = driver.findElement(By.xpath(xpathDescriptionWaterMark)).getText();\n\t\tAssert.assertEquals(descriptionWaterMark, \"Description\", \"Description WaterMark is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Description Field WaterMark\", \"Description WaterMark is Displaying\");\n\n\t\t// Verify and Validate Submit Button\n\t\tWebElement submitBtn = driver.findElement(By.id(idSubmitBtn));\n\t\tAssert.assertTrue(submitBtn.isEnabled());\n\t\ttest.log(LogStatus.PASS, \"Submit Button\", \"Submit Button is displaying and Enabled\");\n\n\t\t// Verify and Validate Submit Button Text\n\t\tString submitText = driver.findElement(By.id(idSubmitBtn)).getText();\n\t\tAssert.assertEquals(submitText, \"Submit\", \"Submit Text is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Submit Button Text\", \"Submit Text is Displaying\");\n\n\t\t// Verify and Validate Cancel Button\n\t\tWebElement cancelButton = driver.findElement(By.xpath(xpathCancelButton));\n\t\tAssert.assertTrue(cancelButton.isEnabled());\n\t\ttest.log(LogStatus.PASS, \"cancel Button\", \"cancel Button is displaying and Enabled\");\n\n\t\t// Verify and Validate Cancel Button Text\n\t\tString cancelButtonText = driver.findElement(By.xpath(xpathCancelButton)).getText();\n\t\tAssert.assertEquals(cancelButtonText, \"Cancel\", \"Cancel Text is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Cancel Button Text\", \"Cancel Text is Displaying\");\n\n\t\t// Verify and Validate Grid or contents Container\n\t\tWebElement gridOfSubscription = driver.findElement(By.xpath(xpathOfGridOfSubscription));\n\t\tAssert.assertTrue(gridOfSubscription.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"Grid Of Subscription\", \"Grid Of Subscription is displaying\");\n\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyRBPAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the RBP user is able to perform journey\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifyRBPuserjourneyverification();\n\t\n\t}", "@Test\n\n public void verifyRegistrationPageSLT() throws InterruptedException {\n ReadFromPropFile readFromPropFileObj = new ReadFromPropFile(\"RegiProfile.properties\");\n RegisterHealthcareProfPO registerHealthcareProfPOObj = new RegisterHealthcareProfPO(driver);\n\n //**********************Registration Screen************************************//\n\n //1. Click \"Sign in\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.SignIN_xpath),\"Unable to click on SignIn link \");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on SignIn link \", \"User should able to click on sign in link\");\n\n //3. Click on \"Click Here\" button for healthcare office.\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.HireReg_xpath),\"Unable to 'Click Here' button\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Click Here' button \", \"User should able to Click on 'Click Here' button \");\n\n //4.Enter \"Facility\" name\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FacilityName_xpath,readFromPropFileObj.getFacilityName()),\"Unable to enter facilityName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter facility name \", \"User should able to enter on facility name \");\n\n //5.Enter \"First name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FName_xpath, readFromPropFileObj.getFirstName()),\"Unable to enter First Name\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter first name \", \"User should able to enter first name \");\n\n //5A.Enter \"last name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.LName_xpath, readFromPropFileObj.getLastName()),\"Unable to get LastName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter last name \", \"User should able to enter on last name \");\n\n //6.Enter EmailID\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Email_xpath, readFromPropFileObj.getEmail1()),\"Unable to enter emailID\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter EmailID \", \"User should able to enter EmailID\");\n\n //7.Enter phone number\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Phone_xpath, readFromPropFileObj.getphone()),\"Unable to enter ph\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter phone number \", \"User should able to enter phone number\");\n\n //8.Enter department\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Dept_xath, readFromPropFileObj.getDept()),\"Unable to enter Dept\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n //9.Enter address\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Address_xpath, readFromPropFileObj.getAddress()),\"Unable to enter addrees\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter address \", \"User should able to enter address\");\n\n //10.Enter city\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.City_xpath, readFromPropFileObj.getCity()),\"Unable to enter city\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n ((JavascriptExecutor) driver).executeScript(\"window.scrollBy(0,3000)\");\n\n //11.Select State\n Assert.assertTrue(registerHealthcareProfPOObj.selectFromDropDownBtn(registerHealthcareProfPOObj.State_xpath, registerHealthcareProfPOObj.State1_xpath),\"Unable to select state\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Select state \", \"User should able to select state\");\n\n //12.Enter zip code\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Zip_xpath, readFromPropFileObj.getZip()),\"Unable to enter zip\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter zip code \", \"User should able to enter zip code\");\n\n //13.Click \"Registor Now\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.RegisterNow_xpath),\"Unable to click on register now\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Register Now'\", \"User should able to Click on 'Register Now' \");\n\n //14.User registered successfully and message should display - \"check inbox to verify your account\".\n String expectedMessage = \"Check inbox to verify your account.\";\n Assert.assertEquals(registerHealthcareProfPOObj.findText(registerHealthcareProfPOObj.VerifyAcct_xpath),expectedMessage);\n ExtentTestManager.getTest().log(LogStatus.PASS, \"User should see toast message 'Check inbox to verify your account'\", \"User able to see the toast message\");\n\n }", "public void v_Verify_Guest2_Displayed(){\n\t}", "public void userShouldBeAbleToRegisterSuccessfully() {\n clickElement(reg_link);\n //Select gender\n clickElement(gender);\n //Enter Firstname\n enterText(firstName, readTestDataFile(\"FirstName\"));\n //Enter Lastname\n enterText(lastName, readTestDataFile(\"LastName\"));\n //Select date of birth\n int num=Integer.valueOf(readTestDataFile(\"DateDay\"));\n selectByIndex(dateDay,num);\n //Select date of month\n selectbyVisibleText(month, readTestDataFile(\"Month\"));\n //Select date of Year\n selectByValue(year, readTestDataFile(\"Year\"));\n //Enter Email\n enterText(email, readTestDataFile(\"Email\")+dateStamp()+\"@test.com\");\n //Enter Company name\n enterText(company, readTestDataFile(\"Company\"));\n //Enter Newsletter option\n driver.findElement(newsletter).isSelected();\n //Enter Password\n enterText(password, readTestDataFile(\"Password\"));\n //Enter ConfirmPassword\n enterText(confirmPassword, readTestDataFile(\"ConfirmPassword\"));\n //Click Register button\n clickElement(registerButton);\n //Expected Result\n String expectedRegisterSuccessMessage = \"Your registration completed\";\n String actualRegisterSuccessMessage=getText(actualMessage);\n //assert use to compare expected and actual result are same or not\n softAssert.assertEquals(expectedRegisterSuccessMessage,actualRegisterSuccessMessage,\"Registration Fail\");\n softAssert.assertAll();\n //Click logout button\n clickElement(logOut);\n }", "public void v_GuestRegistration(){\n\t\tResult=\"Pass\";\n\t\tLF.AddActualResult(Result);\n\t}", "public void test_SignUp() throws Exception {\n\t\t\n//\t\tSystem.setProperty(BrowType, BrowPath);\n//\t\tWebDriver driver = new ChromeDriver();\n\t\t\n\t\tdriver.get(url);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(EmailAddress);\n\t\tdriver.findElement(By.id(\"password1\")).sendKeys(Password);\n\t\tdriver.findElement(By.id(\"password2\")).sendKeys(VerifyPassword);\n\t\tdriver.findElement(By.id(\"displayName\")).sendKeys(DisplayName);\n\t\tnew Select(driver.findElement(By.id(\"countrySelect\"))).selectByVisibleText(Country);\n\t\tdriver.findElement(By.id(\"signUpButton\")).click();\n\t\t\n\t\tString ExpConfMsg1 = \"Thank you for creating a Screencast.com account!\";\n\t\tString ConfMsg1 = driver.findElement(By.xpath(\"//*[@id='container']/div[3]/h3\")).getText();\n\t\tif(ConfMsg1.equals(ExpConfMsg1)){\n\t\t\tSystem.out.println(\"SignUp functionality Passed. Confirmation Message that appeared is : \" + ConfMsg1);\n\t\t} else {\n\t\t\tSystem.out.println(\"SignUp functionality Failed. Confirmation Message that appeared is : \" + ConfMsg1);\n\t\t} //end of if statement\n\t\t\n\t\tdriver.findElement(By.xpath(\"//*[@id='signedInAs']/a\")).click();\n\t\tThread.sleep(5000);\n\t\t\n\n\t}", "public void v_Verify_Guest12_Displayed(){\n\t}", "public void v_Verify_Guest11_Displayed(){\n\t}", "public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}", "public void v_Verify_Guest1_Displayed(){\n\t}", "public void v_Verify_Guest3_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyRPAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the RB user is able to perform journeys\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifyRPuserjourneyverification();\n\t\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "public void v_Verify_Guest7_Displayed(){\n\t}", "public void verifyAddAgentPage() throws Exception {\n\n\t\twdriver.findElement(By.xpath(WebData.verifyAddAgentPage)).isDisplayed();\n\t}", "public void v_Verify_Guest4_Displayed(){\n\t}", "@Step\n\tpublic void verify_the_DP_Topic_of_retire_status(String Page)throws Exception {\n\n\t\tLong dpKey=Serenity.sessionVariableCalled(\"DPkey\"); \n\n\t\tswitch(Page){\n\t\tcase \"AWB\": \n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"No Disposition\");\n\t\t\tString medicalPolicy=Serenity.sessionVariableCalled(\"Medicalpolicy\");\n\t\t\tString MedPolicyXpath = StringUtils.replace(oCPWPage.MedPolicyAfterSearch, \"MedPolicyValue\", medicalPolicy);\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.PolicySelectionDrawerButton);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_10_Seconds);\n\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.MedPolicySearchBox, medicalPolicy);\n\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.MedPolicySearchButton);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_3_Seconds);\n\t\t\tobjSeleniumUtils.clickGivenXpath(MedPolicyXpath); \n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.ApplyToOpportunityGridBtn);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tboolean statusValue=oGenericUtils.isElementExist(oCPWPage.nonRecordsOfMedicalPolicies);\n\t\t\tif(statusValue)\n\t\t\t{\n\t\t\t\tAssert.assertTrue(\"Non Medical Policy / Topic \"+oCPWPage.nonRecordsOfMedicalPolicies+\"Status\",statusValue);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.SearchFileldXpath, String.valueOf(dpKey));\n\t\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.SearchButtonXpath);\n\t\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\t\tAssert.assertTrue(\"Non Records Opportunities \"+oCPWPage.nonRecordsOfOpportunities+\"Status\",oGenericUtils.isElementExist(oCPWPage.nonRecordsOfOpportunities));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"RWO\":\n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"No Disposition\");\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.reviewWorkedOpportunities);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.SearchFileldXpath, String.valueOf(dpKey));\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.SearchButtonXpath);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tAssert.assertTrue(\"Non Records Opportunities \"+oCPWPage.nonRecordsOfOpportunities+\"Status\",oGenericUtils.isElementExist(oCPWPage.nonRecordsOfOpportunities));\n\t\t\tbreak;\n\t\tcase \"PM\":\n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"Present\"); \n\t\t\tThread.sleep(2000);\n\t\t\t//Click on 'Reset' button\n\t\t\tobjSeleniumUtils.highlightElement(oFilterDrawer.sReset);\n\t\t\toGenericUtils.clickButton(By.xpath(oFilterDrawer.sReset));\n\t\t\tThread.sleep(2000);\n\t\t\tboolean bstatus=oCPWPage.Enter_the_given_MP_Topic_in_filter_Drawer(Serenity.sessionVariableCalled(\"Medicalpolicy\"));\n\n\t\t\tif(bstatus)\n\t\t\t{\n\t\t\t\tobjSeleniumUtils.clickGivenXpath(StringUtils.replace(oFilterDrawer.Medicalpolicy_Checkbox, \"value\", Serenity.sessionVariableCalled(\"Medicalpolicy\")));\n\t\t\t\toFilterDrawer.user_filters_by_clicking_on_Apply_for_Medical_Policy_Topic();\n\t\t\t\toOppurtunityDeck.validatethegivenDatainOpportunityDeck(Serenity.sessionVariableCalled(\"DPkey\").toString(), \"Updated DPkey\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAssert.assertTrue(\"DPKey not displayed as its retired\"+Serenity.sessionVariableCalled(\"DPkey\"), true);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySAPElecCustomer()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the SAP SMR page for Electricity customer\");\n//SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\t new SubmitMeterReadAction()\n\t\t .openSMRpage(\"Electricity\")\n\t\t.verifyAnonymousSAPElecCustomersRewrite(smrProfile);\n}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyNewUserDetailsactivation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Super User Overlay Yes Button Selection\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes(); \t \t \t \t \n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserSpecificAccounts_RBP() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether confirmation page is getting displayed for Reads, Bills, Payments users\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SubmitMeterReadodb\");\n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsRBP\"); \n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile);\t\t\t\t\t \t \t\t\t\t\t \t \t\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTabledetails(userProfile)\n\t\t.AdduserConfirmationPage();\n\t\t/*.confirmationPageVerificationLinks()\n\t\t.UserJourney_RBPAccessVerification(userProfile);\n\t\tnew SapCrmAction()\n\t\t.loginDetails(crmuserProfile)\n\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile);*/\n\t}", "public void v_Verify_Guest5_Displayed(){\n\t}", "public void v_Verify_Guest9_Displayed(){\n\t}", "public void v_Verify_Guest10_Displayed(){\n\t}", "@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}", "public static void main(String[] args) throws InterruptedException {\nSystem.setProperty(\"webdriver.chromedriver.driver\",\"C:\\\\Users\\\\mtauseef\\\\Downloads\");\nWebDriver driver = new ChromeDriver();\ndriver.get(\"http://www.jawwy.tv/\");\ndriver.manage().window().maximize();\ndriver.findElement(By.className(\"hide-resp\")).click();\ndriver.findElement(By.className(\"header__subscribe\")).click();\ndriver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\ndriver.findElement(By.id(\"password\")).sendKeys(\"12345678\");\ndriver.findElement(By.id(\"sub_form\")).click();\n//waiting for elements to load\nWebDriverWait wait = new WebDriverWait(driver, 10);\n//Scenario1: validate back button\nWebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"signup-form__back\")));\nif (element !=null)\n{\nSystem.out.println(\"back button is validated\");\n}else {\n\t//not validated\n}\n//Scenario2: validate that one single payment method appears for lebanon\nSelect country = new Select(driver.findElement(By.name(\"country\")));\ncountry.selectByVisibleText(\"Lebanon\");\nWebDriverWait wait1 = new WebDriverWait(driver, 10);\n\nWebElement lebanoncclist = (driver.findElement(By.className(\"selectProviders-list\")));\nList<WebElement> links= lebanoncclist.findElements(By.tagName(\"li\"));\nif(links.size()==1) \n{\nSystem.out.println(\"one mop for lebanon\");\n}\nelse {\n\t//not okay\n}\nThread.sleep(10000);\n//Scenario3: validate that two payment mehtod appears for bahrain\ncountry.selectByVisibleText(\"Bahrain\");\nThread.sleep(10000);\nWebElement bahraincclist = (driver.findElement(By.className(\"selectProviders-list\")));\nList<WebElement> linksBahrain= bahraincclist.findElements(By.tagName(\"li\"));\nif(linksBahrain.size()==2) \n{\nSystem.out.println(\"two mops for bahrain\");\n}else {\n\t//not okay\n}\nThread.sleep(10000);\n//Scenario4: validate that user navigates back to subscriber now page\ndriver.findElement(By.className(\"signup-form__back\")).click();\nThread.sleep(10000);\ndriver.findElement(By.linkText(\"Click here\")).click();\n Thread.sleep(10000);\ndriver.findElement(By.linkText(\"Subscribe\")).click();\nThread.sleep(10000);\n//Scenario5: validate t&c page\ndriver.findElement(By.linkText(\"Terms & Conditions\")).click();\nThread.sleep(10000);\n\n\n\n\n\n\n\t}", "public String isValidAgentLogin(String userName, String password, String txn);", "@Test(alwaysRun=true, priority=17,enabled=true)\n\tpublic void tenantVerification() throws InterruptedException, IOException {\t\n\t\tadminPage.tenantVerification(driver);\n\t\t\n\t}", "public void v_Verify_Guest8_Displayed(){\n\t}", "public void v_Verify_Guest6_Displayed(){\n\t}", "@Test\npublic void cytc_005() throws InterruptedException {\n\t Thread.sleep(3000);\n\t cyclosPOM.cyclosGenericLogin(\"srivalli2\",\"pass12345\");\n\t screenShot.captureScreenShot(\"CYTC00501\");\n\t Thread.sleep(3000);\n\t cyclosPOM.myProfileOption();\n\t screenShot.captureScreenShot(\"CYTC00502\");\n\t Thread.sleep(2000);\n\t cyclosPOM.changeProfileBtn();\n\t screenShot.captureScreenShot(\"CYTC00503\");\n\t Thread.sleep(1000);\n\t cyclosPOM.changeAddress(\"Raidurgam\");\n\t cyclosPOM.saveButton();\n\t screenShot.captureScreenShot(\"CYTC00504\");\n\t System.out.println(driver.switchTo().alert().getText());\n\t driver.switchTo().alert().accept();\n\t screenShot.captureScreenShot(\"CYTC00505\");\n\t String Actual = cyclosPOM.verifyAddress();\n\t String Expected = \"Raidurgam\";\n\t Assert.assertEquals(Actual, Expected);\n}", "@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateAcctCheckbox() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether proper error message is displayed when continuing with out enabling the accounts check box\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.ValidateCheckboxerror(userProfile);\t \t \t\t\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserSpecificAccounts_FA() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether confirmation page is getting displayed for Full access user\");\n\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SubmitMeterReadodb\");\n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsFA\"); \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile);\t\t\t\t\t \t \t\t\t\t\t \t \t\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTabledetails(userProfile)\n\t\t.AdduserConfirmationPage()\n\t\t.confirmationPageVerificationLinks();\n\t\t/*.UserJourney_FA_AccessVerification(userProfile,smrProfile)\n\t\t new SapCrmAction()\n\t\t\t.loginDetails(crmuserProfile)\n\t\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile); \t*/\t\n\t}", "@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}", "@Test\n\tpublic void Authentication_02() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"01\", \"[email protected]\", \"12345678\");\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Username already exists\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t}", "@Then(\"the Booking page shows correct booking details\")\n public void bookingpage_verify_booking_details(){\n }", "@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRCollective(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates whether Submit meter read is successful for customers submitting within MR window for logged in customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "@Override\n\tpublic void msgReadyForCheck(Customer customerAgent, String choice) {\n\t\t\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRGas(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates meter read submission and Email to customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .overlay()\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "@Test\n\tpublic void Authentication_04() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"11\", \"wesley11\", \"12345678\");\n\t\t\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Username is not a valid email address\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t\t\n\t\t\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySAPElectricCustomer_old()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the SAP SMR page for Electric customer\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t//.verifyAnonymousSAPElecCustomersRewrite(smrProfile)\n\t\t.verifyAnonymousSAPElectricCustomers(smrProfile)\n\t\t.verifyLeadTable(smrProfile);\n\t\n}", "@Step\n\tpublic void verify_AWB_and_RWO_pages_after_pipeline_for_the_captured_data(String sChange, String sDisposition, String DpType,String user) throws Throwable{\n\t\t\n\t\tExcelUtils.LoadEllData();\n\t\t\n\n\t\tHashMap<Integer, HashMap<String, String>> sEllData = ProjectVariables.sSubsequentEllData;\n\t\t\n\t\tSerenity.setSessionVariable(\"user\").to(user);\n\n\t\tint iRowCount = sEllData.size();\n\t\tint i =1;\n\t\tboolean blnRows = false;\n\n\t\tfor (i=1;i<=iRowCount;i++){\n\t\t\t\n\t\t\tString sExecution = sEllData.get(i).get(\"Execution\");\n\t\t\t\n\t\t\tif (sExecution.equalsIgnoreCase(\"Y\")){\n\t\t\t\tSerenity.setSessionVariable(\"client\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Client\"));\n\t\t\t\tSerenity.setSessionVariable(\"user\").to(user);\n\t\t\t\tSerenity.setSessionVariable(\"Medicalpolicy\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Medical_Policy\"));\n\t\t\t\tSerenity.setSessionVariable(\"Topic\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Topic\"));\n\t\t\t\tSerenity.setSessionVariable(\"DPkey\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"i_DP Key\"));\n\t\t\t\tSerenity.setSessionVariable(\"Disposition\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Disposition_captured\"));\t\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_Set_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"NotRFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_NotSet_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Savings\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"O_Savings_NotSet_RFP\"));\n\t\t\t\tString sClientkey=CPWPage.RetrieveTheClientkeyfromgivenClientthroughservice(Serenity.sessionVariableCalled(\"client\").toString());\n\t\t\t\tSerenity.setSessionVariable(\"clientkey\").to(sClientkey);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\toCPWPage.SelectPayer(\"\", Serenity.sessionVariableCalled(\"client\").toString());\n\t\tswitch(sChange.toUpperCase()){\n\t\tcase \"DP RETIRE\":\n\t\t\toCPWPage.SelectPolicySelectionAndApplyFilters(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\tAssert.assertFalse(\"'No results found that meet the search criteria.' message is displayed in the AWB Grid for the Medical policy ==>\"+\"Medicaid - New York State Policy\",objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Div_contains_text, \"value\", \"No results found that meet the search criteria.\")));\n\t\t\tArrayList<String> DPKeylist = new ArrayList();\n\t\t\tDPKeylist.add(Serenity.sessionVariableCalled(\"DPkey\").toString());\n\n\t\t\toCPWPage.verify_the_captured_data_is_not_displayed_in_the_given(DPKeylist, \"DPkey\", DpType);//mp no need\n\t\t\t///\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPkey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+DPKeylist, objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPKey ===>\"+DPKeylist+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"DP DESCRIPTION\":\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPKey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tAssert.assertTrue(\"Unable to click the DPKey in Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured Topic is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured MP is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tAssert.assertTrue(\"case not found::\"+sChange, false);\n\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\t\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void registerParticipantSuccess() throws IntegrationException, SOAPFaultException, MalformedURLException,\n JAXBException {\n final Date stTime = new Date(new java.util.Date().getTime());\n\n xsltTransformer.transform(null, null, null);\n EasyMock.expectLastCall().andAnswer(new IAnswer() {\n\n public Object answer() {\n // return the value to be returned by the method (null for void)\n return getParticipantXMLString();\n }\n }).anyTimes();\n\n final CaaersServiceResponse caaersServiceResponse = getRegisterParticipantResponse(SUCCESS);\n EasyMock.expect(wsClient.createParticipant((String) EasyMock.anyObject())).andReturn(caaersServiceResponse);\n EasyMock.replay(wsClient);\n\n final ServiceInvocationMessage serviceInvocationMessage = prepareServiceInvocationMessage(REFMSGID,\n getParticipantInterimMessage(), stTime,\n caAERSRegistrationServiceInvocationStrategy.getStrategyIdentifier());\n\n final ServiceInvocationResult result = caAERSRegistrationServiceInvocationStrategy\n .invoke(serviceInvocationMessage);\n\n Assert.assertNotNull(result);\n }", "@Test\r\n\tpublic void smr142() {\r\n\t\ttry{\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\tlogger.info(\"SMR142 execution started\");\r\n\t\t\tfinal String numComm=testDataOR.get(\"num_comm\"),cust=testDataOR.get(\"customer\")\r\n\t\t\t\t\t,posNum=testDataOR.get(\"pos_number\"),dbEportal=testDataOR.get(\"databaseEportal\"),dbAxis=testDataOR.get(\"databaseAxis\")\r\n\t\t\t\t\t,pos,numptv,numcom;\r\n\t\t\tfinal String[] posLoc={\"posrefund_xpath\",\"posforcing_xpath\",\"posvoid_xpath\",\"posnumcomm_xpath\"},\r\n\t\t\t\t\tposVal={testDataOR.get(\"refund_option\"),testDataOR.get(\"forcing_option\"),testDataOR.get(\"void_option\"),numComm};\r\n\t\t\t\r\n\t\t\t//Access Everest with the Everest superuser\r\n\t\t\t//Navigate to Card Payment-Customer Provisioning and select the \r\n\t\t\t//customer\r\n\t\t\taddProfToCust(cust);\r\n\r\n\t\t\t//Select 'Manual localization',pos and click Next\t\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"operationorder_id\"), MANUALLOCALZTION);\r\n\t\t\tlogger.info(\"Selected \"+MANUALLOCALZTION);\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"pos_radiobttn_xpath\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"orderopenext_id\"));\r\n\r\n\t\t\t//Select a lowest level zone and click Next\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"localization_id\"), testDataOR.get(\"lowest_level_zone_a\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"localizationnext_xpath\"));\r\n\t\t\tlogger.info(\"Selected a lowest level zone and next button\");\r\n\t\t\t\r\n\t\t\t//Select the <num_comm> from the dropdown list,click 'Next' button\r\n\t\t\tlogger.info(\"Step 8:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"numcomm_selection_id\"), numComm);\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", selUtils.getObject(\"locnext_id\"));\r\n\t\t\tlogger.info(\"Selected numcomm zone and next button\");\r\n\r\n\t\t\t\r\n\t\t\t//select manual pos,and add pos details\r\n\t\t\tlogger.info(\"Step 9:\");\r\n\t\t\tselUtils.slctChkBoxOrRadio(selUtils.getObject(\"enterposanual_xpath\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"addpos_xpath\"));\r\n\t\t\tselUtils.getObject(\"posnumber_id\").sendKeys(posNum);\r\n\t\t\taddPOSval(posLoc, posVal);\r\n\t\t\t\r\n\t\t\t//Edit projectname and deploy\r\n\t\t\teditPNameNDeply();\r\n\t\t\t\r\n\t\t\tif(dbCheck){\r\n\t\t\t\t//validating data with database,validate data in Eportal database\r\n\t\t\t\tsqlQuery = \"SELECT * FROM pos WHERE pos='\"+posNum+\"'\";\r\n\t\t\t\tresSet = dbMethods.getDataBaseVal(dbEportal,sqlQuery,CommonConstants.ONEMIN);\r\n\t\t\t\tpos=resSet.getString(\"pos\");\r\n\t\t\t\tAssert.assertTrue(pos.equals(posNum), \"Table data does not exist \");\r\n\t\t\t\tlogger.info(\"pos number \"+posNum+ \" exists in table\");\r\n\r\n\t\t\t\t//Validating the results in Axis database\r\n\t\t\t\tsqlQuery=\"SELECT numtpv,numcomm FROM emv.tpvemv WHERE numtpv='\"+posNum+\"' AND numcomm='\"+numComm+\"';\";\r\n\t\t\t\tresSet = dbMethods.getDataBaseVal(dbAxis,sqlQuery,CommonConstants.ONEMIN);\r\n\t\t\t\tnumptv=resSet.getString(\"numtpv\");\r\n\t\t\t\tnumcom=resSet.getString(\"numcomm\");\r\n\t\t\t\tAssert.assertTrue(numptv.equals(posNum)&&numcom.equals(numComm), \"Table data does not exist \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlogger.info(\"SMR142 executed successfully\");\r\n\t\t}\r\n\t\tcatch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "@Test\n\tpublic void TC01_Register() {\n\t\tclickToElemnet(registerLinkX);\n\t\tSystem.out.println(\"TC01 : 1. Register Page Display Status : \" + checkElementDisplayed(registerPageX));\n\n\t\t// Register new accout\n\t\tclickToElemnet(genderMaleRadioBtnX);\n\t\tsendkeysToElement(firstNameTxtX, regFirstName);\n\t\tsendkeysToElement(lastNameTxtX, regLastName);\n\t\tselectElementFromDropDown(dateOfBirthDropDownX, regDateOfBirth);\n\t\tselectElementFromDropDown(dateOfMonthDropDownX, regDateOfMonth);\n\t\tselectElementFromDropDown(dateOfYearDropDownX, regDateOfYear);\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(companyNameTxtX, regCompanyName);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tsendkeysToElement(confirmPasswordTxtX, regPassword);\n\t\tclickToElemnet(registerBtnX);\n\n\t\t// Verify Account is Created Successfully\n\t\tSystem.out.println(\"TC01 : 2. Register message : \" + getTextFromElement(registerSuccessMsgX));\n\n\t\t// Click Log Out Link\n\t\tSystem.out.println(\"TC01 : 3. Click Log Out Link\");\n\t\tclickToElemnet(logOutLinkX);\n\n\t\t// Verify navigate to Home Page\n\t\tSystem.out.println(\"TC01 : 4. Navigate to Home Page : \" + driver.getCurrentUrl());\n\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void updateParticipantRegistrationSuccess() throws IntegrationException, SOAPFaultException,\n MalformedURLException, JAXBException, DatatypeConfigurationException {\n final Date stTime = new Date(new java.util.Date().getTime()); \n\n xsltTransformer.transform(null, null, null);\n EasyMock.expectLastCall().andAnswer(new IAnswer() {\n\n public Object answer() {\n return getParticipantXMLString();\n }\n }).anyTimes();\n\n final CaaersServiceResponse updateParticipantResponse = getUpdateParticipantResponse(SUCCESS);\n final CaaersServiceResponse getParticipantResponse = getParticipantResponse(SUCCESS);\n EasyMock.expect(wsClient.updateParticipant((String) EasyMock.anyObject())).andReturn(updateParticipantResponse)\n .anyTimes();\n EasyMock.expect(wsClient.getParticipant((String) EasyMock.anyObject())).andReturn(getParticipantResponse);\n EasyMock.replay(wsClient);\n\n final ServiceInvocationMessage serviceInvocationMessage = prepareServiceInvocationMessage(REFMSGID,\n getParticipantInterimMessage(), stTime,\n caAERSUpdateRegistrationServiceInvocationStrategy.getStrategyIdentifier());\n\n final ServiceInvocationResult result = caAERSUpdateRegistrationServiceInvocationStrategy\n .invoke(serviceInvocationMessage);\n\n Assert.assertNotNull(result);\n }", "public static void main(String[] args) throws Exception \r\n\t{\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"Drivers\\\\geckodriver.exe\");\r\n\t\tWebDriver driver=new FirefoxDriver();\r\n\t\tdriver.get(\"http://outlook.com\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t\t//Identify Signin Button\r\n\t\tWebElement Signin_btn=driver.findElement(By.xpath(\"(//a[contains(.,'Sign in')])[1]\"));\r\n\t\tSignin_btn.click();\r\n\t\t\r\n\t\r\n\t\t//Identify email \r\n\t\tWebElement Email_editbox=driver.findElement(By.xpath(\"//input[@id='i0116']\"));\r\n\t\tEmail_editbox.clear();\r\n\t\tEmail_editbox.sendKeys(\"[email protected]\"); //Entered valid email\r\n\t\t\r\n\t\t//Click Next button\r\n\t\tWebElement Next_btn=driver.findElement(By.xpath(\"//input[contains(@id,'idSIButton9')]\"));\r\n\t\tNext_btn.click();\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\t\r\n\t\t//Identify webpage\r\n\t\tWebElement Page=driver.findElement(By.tagName(\"body\"));\r\n\t\tString Page_Visible_text=Page.getText();\r\n\t\tSystem.out.println(Page_Visible_text);\r\n\t\t\r\n\t\t\r\n\t\t//Write decision to verify expected text visible at webpage\r\n\t\tif(Page_Visible_text.contains(\"Enter password\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Testpass, Expected text visible at webapge\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Expected text not visible at webpage\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "@Test\n\tpublic void test03_AcceptARequest(){\n\t\tinfo(\"Test03: Accept a Request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t/*Step Number: 1\n\t\t *Step Name: Accept a request\n\t\t *Step Description: \n\t\t\t- Login as John\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of mary\n\t\t\t- Click on Accept button\n\t\t *Input Data: \n\t\t/*Expected Outcome: \n\t\t\t- The invitation of root, mary is shown on the invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- John is connected to mary and the invitation fades out and is permanently removed from the list\n\t\t\t- Request of root are moving to the top of the gadget if needed*/ \n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_ACCEPT_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\n\tpublic void Authentication_03() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"100\", \"[email protected]\", \"12345\");\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Password length must be 6 or more\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t\t\n\t}", "@Test(priority=4)\r\n\t public void ValidLoginD() {\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\r\n\t\t ValidateSigninbuttonB(); // Calling the validatesigninbutton function to click the signin link\r\n\t\t \r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"ap_email\")).click(); // Clicking the username\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"ap_email\")).sendKeys(\"[email protected]\"); // Inserting the username\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"continue\")).click(); // Clicking the continue button\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"ap_password\")).sendKeys(\"Test@@12345\"); // Inserting the password\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"signInSubmit\")).click(); // Clicking the login button\r\n\t\t \r\n\t\t \r\n\t\t String text = driver.findElement(By.id(\"nav-link-yourAccount\")).getText(); // Extracting the text value from the webelement identifier\r\n\t\t \r\n\t\t // Validating the successful login flow\r\n\t\t \r\n\t\t if (text.contains(\"Wilson\")){\r\n\t\t\t System.out.println(\"Login successful\");\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Login not successful\");\r\n\t\t }\r\n\t }", "@Test(priority = 1, alwaysRun = true)\n\n\tpublic void usercanregistersuccessfully() {\n\t\thomeobject = new HomePage(driver);\n\t\thomeobject.openregisterpage();\n\t\t// take object mn el method elmowgoda fy home page\n\t\tregistrationobject = new UserRegisteration(driver);\n\t\tregistrationobject.userregisteration( firstname, lastname, email, password);\n\n\t\t// validate the scenario\n\t\tAssert.assertTrue(registrationobject.successmessage.getText().contains(\"Your registration completed\"));\n\t}", "@Test(enabled = true)\n public void registraionPage() throws InterruptedException {\n driver.findElement(By.xpath(\"//a[contains(.,'Sign up, it’s free')]\")).click();\n Thread.sleep(2000);\n\n\n String expected = \"Show us your human side...\";\n String actual = driver.findElement(By.xpath(\"//h1[contains(.,'Show us your human side')]\")).getText();\n\n Assert.assertEquals(actual, expected, \"Test Failed. Registration page could not be reached.\");\n\n\n }", "@Test\r\n\tpublic void TC_10_verify_Passowrd_Requirements() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with password does not meet system requirements\r\n\t\t\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", \"test\");\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"test\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\terrMsg = Page_Registration.getpswdRqmtErrMsg();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password \r\n\t\t// system requirements\r\n\t\t\r\n\t\tAssert.assertEquals(errMsg, \"Password does not meet the minimum requirements. It must be at least 7 characters in length, contain one number and one letter.\");\r\n\r\n\t}", "public void verifyRegisterForNPILink() {\n npiLink.assertState().enabled();\n npiLink.assertContains().text(\"register for a National Provider Identifier (NPI)\");\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserspecificaccountsConfirmationPageNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Superuser Specific accounts Navigationlinks for the confirmation Page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile)\t \t \t\t \t \n\t\t.AddNewUserNavigationVerification() \n\t\t.UserConfirmationPageNavigations();\t \t \t\t\n\t}", "public void verifyServerCn(boolean yesno);", "@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySearchMeterByAcctno()\n{\t\t\n\t Report.createTestLogHeader(\"Submit Meter Read\", \"Verify multiple Search results are getting displayed while giving valid Account number in search field\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GlobalSMRMultiDialMeter11\");\n\tnew SubmitMeterReadAction()\n\t\n\t.BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .BgbverifyAfterLogin()\n .clickSubmitMeterReadLink()\n .SearchByAccoutnNumber(smrProfile)\n .enterMeterDials(smrProfile)\n //.enterGlobalMeterDials(smrProfile)\n\t.verifyMeterReadConfirmationTitle()\n\t.verifyAuditLeadTable(smrProfile);\n \n}", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "@Test\n\tpublic void loginToOpentaps() {\n\t\tinvokeApp(\"chrome\", \"http://demo1.opentaps.org\");\n\n\t\t// Step 2: Enter user name\n\t\tenterById(\"username\", \"DemoSalesManager\");\n\n\t\t// Step 3: Enter Password\n\t\tenterById(\"password\", \"crmsfa\");\n\n\t\t// Step 4: Click Login\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\t\t// Step 5: Verify Username\n\t\tverifyTextContainsByXpath(\"//div[@id='form']/h2\", \"Welcome\");\n\t\t\n\t\t// Step 6: Click Logout\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\n\n\n\t}", "public void test_Login() throws Exception {\n//\t\tSystem.setProperty(BrowType, BrowPath);\n//\t\tWebDriver driver = new ChromeDriver();\n\t\t\n//\t\tdriver.get(url);\n//\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"emailAddress\")).sendKeys(EmailAddress);\n\t\tdriver.findElement(By.id(\"password\")).sendKeys(Password);\n\t\tdriver.findElement(By.id(\"signInButton\")).click();\n\t\tThread.sleep(5000);\n\t\t\n\t\tString ExpConfMsg2 = \"Signed in as \" + DisplayName + \"(Sign Out)\";\n\t\tString ConfMsg2 = driver.findElement(By.xpath(\"//*[@id='signedInAs']\")).getText();\n\t\tif(ConfMsg2.equals(ExpConfMsg2)) {\n\t\t\tSystem.out.println(\"Login functionality Passed. Confirmation Message that appeared is : \" + ConfMsg2);\n\t\t} else {\n\t\t\tSystem.out.println(\"Login functionality Failed. Confirmation Message that appeared is : \" + ConfMsg2);\n\t\t}\n\t\t\n\t\tdriver.quit();\n\t\t\n\t}", "public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyAnonymousElectricCustomer()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the anonymous SMR page for Electric customer\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRElectricityUserforsingleMeter\");\n\nnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.verifyElectricityServiceDeskCustomer(smrProfile)\n\t.verifyLeadTable(smrProfile); \t\n}", "@Test\n\tpublic void checkValidLoginCommissioner() {\n\t\ttest = report.createTest(\"CheckValidLoginCommissioner\");\n\t\t\n\t\tcommissionerhomepage = loginpage.successfullLoginCommissioner(UserContainer.getCommissioner());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(commissionerhomepage.getUserNameText(), UserContainer.getCommissioner().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = commissionerhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "@Test(groups ={Slingshot,Regression})\n\t\tpublic void VerifyFullUserAccessJourneys() {\n\t\t\tReport.createTestLogHeader(\"MuMv\", \" Verify the Full user is able to perform journeys\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\t\tnew LoginAction()\n\t\t\t.BgbnavigateToLogin()\n\t\t\t.bgbloginDetails(userProfile);\t\t\n\t\t\tnew MultiUserMultiViewAction()\n\t\t\t.ManageAccountLink(userProfile)\n\t\t\t.verifyFullAccessuserjourneyverification();\t\t\n\t\t}", "@Test(groups = { \"android\", \"ios\", \"web\", \"BVT02\" })\n\tpublic void P0Pass_2_testSignUpAsATeacher_BoysScout() throws Exception {\n\t\tSystem.out.println(\"P0Pass_1_testSignUpAsATeacher_BoysScout\");\n\t\tString sEmail = \"test_BoyScouts\" + getTimeStamp().replaceAll(\"-\", \"_\") + \"@test.com\";\n\t\tSystem.out.println(sEmail);\n\t\tLandingPage.getLandingPage(browser).clickOnCreateAccount().clickOnCreateNewClassGroup().clickOnBoyScoutsGroup()\n\t\t.enterFirstName(\"test\").enterLastName(\"Boy Scouts\")\n\t\t.enterEmailId(sEmail).enterPassword(\"bloomz999\")\n\t\t.clickOnSignUpButton().thenVerifyCreateButtonShouldBeDisplayed().thenVerifyProfileName(\"test Boy Scouts\")\n\t\t.thenVerifyWelcomeScreenTroop(\"Create a Troop\").clickOnSettingButton().clickOnAccountSettingsButton()\n\t\t.clickOnDeleteAccountButton().selectReasonForDeleteButton().selectReasonAsOthersButton()\n\t\t.enterPassword().clickDeletePermanentButton().clickOnYesButton().thenVerifyConfirmMessage().clickOnOkButton()\n\t\t.thenVerifySignInAndCreateButtonsShouldBeDisplayed();\n\t}", "@Test(enabled = true)\n\tpublic void viewTravelHistoryUnregistredCustomer() throws Exception {\n\n\t\t// create travel history via soap call\n\t\tSOAPClientSAAJ sClient = new SOAPClientSAAJ();\n\t\tCreditCardNumberGenerator ccGenerator = new CreditCardNumberGenerator();\n\t\tString validCCNumber = ccGenerator.generate(\"4\", 16);\n\t\tString accountID = sClient.travelHistorySOAPCall(validCCNumber);\n\t\tSystem.out.println(\"cc number being used is \" + validCCNumber);\n\t\tSystem.out.println(\"account id being returned is \" + accountID);\n\n\t\t// check cmc for travel history based on cc\n\t\t// takes around 6 minutes for travel history to show on cmc\n\t\tUtils.waitTime(360000);\n\n\t\tcoreTest.signIn(driver);\n\t\tTokenSearchPage tPage = getTokenSearchPage();\n\t\ttPage.selectTokenType(driver, TOKEN_TYPE);\n\t\ttPage.selectSubsystem(driver, SUBSYSTEM);\n\t\ttPage.enterBankNumber(driver, validCCNumber);\n\t\ttPage.selectExpMonth(driver);\n\t\ttPage.selectExpYear(driver);\n\t\ttPage.clickSearchToken(driver);\n\t\ttPage.clickViewDetails(driver);\n\t\ttPage.clickTravelHistory(driver);\n\n\t\tTravelHistoryPage tvPage = new TravelHistoryPage(driver);\n\t\tAssert.assertEquals(tvPage.getLocation(driver), LOCATION_UC);\n\t\tAssert.assertEquals(tvPage.getTravelMode(driver), TRAVEL_MODE);\n\t\tAssert.assertEquals(tvPage.getToken(driver), TOKEN);\n\t\tAssert.assertEquals(tvPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(tvPage.getUnpaidFare(driver), UNPAID_FARE);\n\n\t\t// check travel history details\n\t\ttvPage.clickTiming(driver);\n\t\tTravelHistoryDetailPage tvdPage = new TravelHistoryDetailPage(driver);\n\t\tAssert.assertEquals(tvdPage.getLocation(driver), LOCATION_UC);\n\t\tAssert.assertEquals(tvdPage.getDevice(driver), DEVICE);\n\t\tAssert.assertEquals(tvdPage.getOperator(driver), OPERATOR);\n\t\tAssert.assertEquals(tvdPage.getTransactionStatus(driver), TRANSACTION_STATUS);\n\t\tAssert.assertEquals(tvdPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(tvdPage.getSource(driver), SOURCE_UC);\n\t\ttvdPage.clickClose(driver);\n\n\t\tLog.info(\"viewTravelHistoryUnregistredCustomer\");\n\t\tdriver.close();\n\n\t}", "void checkForAccServices();", "private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserSpecificAccounts_RB() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether confirmation page is getting displayed for Reads & Bills users\");\t\t\t\t\t \t \t \t\t\t \t \n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsRB\"); \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforRB\");\n\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile);\t\t\t\t\t \t \t\t\t\t\t \t \t\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage();\n\t\t/*.confirmationPageVerificationLinks()\n\t\t.UserJourney_RBAccessVerification(userProfile);*/\n\t\t/*new SapCrmAction()\n\t\t.loginDetails(crmuserProfile)\n\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile);*/\t\t\t\t\t \t \t \n\n\t}", "@Test(priority = 8, retryAnalyzer = Retry.class)\n\tpublic void VPORT_15_TeacherLoginScenarios() {\n\n\t\tString schoolAndCode[];\n\t\tString trackName;\n\t\tString tickeToReadURL;// = \"https://tickettoread.com/\";[https://www.tickettoread.com/choose/index.jsp]\n\t\tif(vportData.vportURL.contains(\"qa.\"))\n\t\t{\n\t\t\t tickeToReadURL = \"https://qa.tickettoread.com/choose/index.jsp\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttickeToReadURL = \"https://www.tickettoread.com/choose/index.jsp\";\n\t\t}\n\t\t// Create Track\n\t\t// Click the Add district button and enter the required details for\n\t\t// track creation\n\t\tvportloginpage.verifyLoginPage();\n\t\tvportloginpage.enterLoginCredentials(vportData.vportUsername, vportData.vportPassword);\n\t\tvporttrackfilterPage = (VportTrackFilterPage) vportloginpage.clickSignInButton(ReturnPage.FILTERPAGE);\n\n\t\taddedittrack = vporttrackfilterPage.clickAddDistrictbutton();\n\t\taddedittrack.verfyDistrictPage();\n\t\ttrackName = addedittrack.fillTrackDetails(vportData.Districtname, vportData.Address, vportData.DistCity,\n\t\t\t\tvportData.Country, vportData.State, vportData.ZipCode, vportData.userType, vportData.productName,\n\t\t\t\tvportData.Status,vportData.Year);\n\t\tvporttrackfilterPage = addedittrack.clickSaveChanges();\n\n\t\t// Filtering the track by providing details\n\t\tvporttrackfilterPage.verifyFilterPage();\n\t\tvporttrackfilterPage.trackFilters(vportData.productName, vportData.userType, vportData.alpha, trackName);\n\t\tvporttrackfilterPage.clickUpdateButton();\n\t\tvporttrackfilterPage.verifyTrackCreation(trackName);\n\n\t\t// Create school\n\t\tvporttrackfilterPage.trackFilters(vportData.productName, vportData.userType, vportData.alpha, trackName);\n\t\tvporttrackfilterPage.clickUpdateButton();\n\t\tvporttrackfilterPage.verifyTrackCreation(trackName);\n\t\t// String schoolName = config.getProperty(\"VPORT_002_SchoolName\");\n\t\t// To navigate to master page of track\n\t\tmasterDistrictTracksPage = vporttrackfilterPage.clickOnMasterIcon(trackName);\n\t\t// To Verify master page by 'District' tab is loaded\n\t\tmasterDistrictTracksPage.verifyMasterDistrictTracksPage();\n\t\t// To Navigate to School sub tab from District tab\n\t\tmasterDistrictTracksPage.navigateToSchoolsSubtab();\n\t\t// To verify Schools sub tab is loaded\n\t\tmasterDistrictTracksPage.verifySchoolsSubtab();\n\t\t// Creating a school and store the name and Details in App.Properties\n\t\tschoolAndCode = masterDistrictTracksPage.CreateSchool(vportData.schoolName, vportData.Code, vportData.Address1,\n\t\t\t\tvportData.SchoolCity, vportData.zipCode);\n\t\t// verifying school is created correctly with the given data\n\t\t// (data+random)\n\t\tmasterDistrictTracksPage.verifySchoolDetails(schoolAndCode[0], schoolAndCode[1], vportData.SchoolCity);\n\n\t\t// Activating School\n\t\tvporttrackfilterPage = masterDistrictTracksPage.navigateToFiltersPage();\n\t\t// To click on Track name to open track and it returns Contacts page\n\t\tdistrictTrackContactsPage = vporttrackfilterPage.clickonTrackName(trackName);\n\t\t// To verify Contacts page is loaded\n\t\tdistrictTrackContactsPage.verifyDistrictTrackContactsPage(trackName);\n\n\t\t// to click on School Tracks tab to navigate to SchoolTracks page and it\n\t\t// returns school tracks page object\n\t\tdistrictTrackSchoolTracksPage = districtTrackContactsPage.clickSchoolTrackstab();\n\t\t// To verify schoolTracks page is loaded\n\t\tdistrictTrackSchoolTracksPage.verifySchoolTracksTab(trackName);\n\t\t// To find a required school to activate from the list of schools\n\t\tdistrictTrackSchoolTracksPage.findSchool(schoolAndCode[0]);\n\t\t// Verifies Inherit buttons are disabled before activating school\n\t\tdistrictTrackSchoolTracksPage.verifyInheritRadiobuttonsStatus(schoolAndCode[0], false);\n\t\t// To activate the school\n\t\tdistrictTrackSchoolTracksPage.activateSchoolAndSave(schoolAndCode[0]);\n\t\t// Verifies Inherit buttons are enabled after activating school\n\t\tdistrictTrackSchoolTracksPage.verifyInheritRadiobuttonsStatus(schoolAndCode[0], true);\n\n\t\t// Create teacher and Add classes to the teacher\n\t\tdistrictAdminHomepage = districtTrackSchoolTracksPage.clickPIIcon(trackName);\n\t\t// Selects school from school dropdown\n\t\tdistrictAdminHomepage.selectSchoolFromDropdown(schoolAndCode[0]);\n\t\t// Navigate to My school tab after selecting a class from classes\n\t\t// dropdown and verifies it\n\t\tdistrictAdminMySchoolPage = districtAdminHomepage.clickOnMySchoolTab();\n\t\tdistrictAdminMySchoolPage.verifyMySchoolPage(schoolAndCode[0]);\n\t\t// Navigate to Teachers and classes tab and verifies it\n\t\tdistrictAdminMySchoolPage.navigateToTeachersAndClassesSubtab();\n\t\tdistrictAdminMySchoolPage.verifyTeachersAndClassesSubtab();\n\t\t// long strRandom = System.currentTimeMillis();\n\t\t// Adds teacher and edit the user name and password\n\t\tString lastname = districtAdminMySchoolPage.addTeacher(vportData.teacherLastName, vportData.teacherFirstName,\n\t\t\t\tvportData.teacherEmail);\n\t\tString teacherID = districtAdminMySchoolPage.editTeacherandSave(lastname, vportData.teacherUserId, vportData.teacherPassword);\n\n\t\t// Add classes to school and verifies schools in schools drop down and\n\t\t// classes section\n\t\t// Also add the class names to properties file\n\t\tString classes[] = districtAdminMySchoolPage.addClassesandSave(lastname, vportData.class1, vportData.class2,\n\t\t\t\tvportData.class3);\n\t\tdistrictAdminMySchoolPage.verifyAddedClasses(lastname, vportData.class1, vportData.class2, vportData.class3);\n\t\tdistrictAdminMySchoolPage.verifyClassesinClassesDropdown(lastname, vportData.class1, vportData.class2,\n\t\t\t\tvportData.class3);\n\n\t\t//Scenario 1 - TEACHER LOGIN WITHOUT STUDENTS IN THE CLASS & WITHOUT STAFF LICENSES\n\n\t\tgetDriver().get(tickeToReadURL);\n\t\tteacherLoginScenarios = new TeacherLoginScenarios(getDriver());\n\t\tteacherLoginScenarios.loginIntoAppication(teacherID);\n\t\tteacherLoginScenarios.verifyLogin(tickeToReadURL);\n\n\n\t\t//*** Pre condition for second Scenario *****\n\t\t//adding staff Licenses to the track\n\t\tgetDriver().get(vportData.vportURL);\n\t\tvportloginpage.verifyLoginPage();\t\n\t\tvportloginpage.enterLoginCredentials(vportData.vportUsername, vportData.vportPassword);\n\t\tvporttrackfilterPage = (VportTrackFilterPage) vportloginpage.clickSignInButton(ReturnPage.FILTERPAGE);\n\t\tvporttrackfilterPage.trackFilters(vportData.productName, vportData.userType, vportData.alpha, trackName);\n\t\tvporttrackfilterPage.clickUpdateButton();\n\t\tvporttrackfilterPage.verifyTrackCreation(trackName);\n\t\t// To click on Track name to open track and it returns Contacts page\n\t\tdistrictTrackContactsPage = vporttrackfilterPage.clickonTrackName(trackName);\n\t\tdistrictmaterialspage = districtTrackContactsPage.clickMaterialsTab();\n\t\tdistrictmaterialspage.verifyMaterialsPage();\n\t\tdistrictmaterialspage.verifyAvailableLicencesOnMaterialsPage();\n\t\tdistrictmaterialspage.addAndVerifyLicences(vportData.licencegradelevel, vportData.licenceseatcount,\n\t\t\t\tvportData.reasonforaddinglicence, vportData.addLicenceAlertMessage,\n\t\t\t\tvportData.reasonForCreatingLicenceImagePath);\n\t\tdistricttracktechnologypage = districtmaterialspage.clickOnTechnologyTab();\n\t\tdistricttracktechnologypage.verifyTechnologyPage();\n\t\tdistricttracktechnologypage.verifyAssessmentPlansAndEnabledRadioButtons();\n\n\t\t//Scenario 2 - Verify teacher login without students in the class \n\n\t\tgetDriver().get(tickeToReadURL);\n\t\tteacherLoginScenarios = new TeacherLoginScenarios(getDriver());\n\t\tteacherLoginScenarios.loginIntoAppication(teacherID);\n\t\tteacherLoginScenarios.verifyLogin(tickeToReadURL);\n\t}", "public static void main(String[] args) {\n try {\r\n System.out.println(\"We are trying to do something cool\");\r\n System.setProperty(\"webdriver.chrome.driver\", \"C://chromedriver.exe\");\r\n WebDriver driver = new ChromeDriver();\r\n String gmail = \"https://accounts.google.com/signin/v2/identifier?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin\";\r\n\r\n driver.get(gmail);\r\n\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierId\\\"]\")).sendKeys(\"[email protected]\"); //[email protected]\r\n\r\n Thread.sleep(1000);\r\n //This is to click next\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n Thread.sleep(1000);\r\n //This is to put in the password Cairo2000\r\n driver.findElement(By.cssSelector(\".aCsJod.oJeWuf div div input\" )).sendKeys(\"Cairo2000\");\r\n driver.findElement(By.cssSelector(\"#passwordNext\")).click();\r\n //tempGmail.sendKeys(Keys.SHIFT, Keys.TAB);\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"passwordNext\\\"]\")).sendKeys(\"Awad9911677\");\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n\r\n Thread.sleep(1000);\r\n WebElement PageChecker = (new WebDriverWait(driver, 10000)).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\":ha\\\"]/div/div\")));\r\n\r\n System.out.println(\"We should be in the email now to check the stuff\");\r\n\r\n\r\n for(int x = 0; x <= 17; x++){\r\n String ca = \"a\";\r\n\r\n switch (x) {\r\n case 0: ca = \"0\";\r\n break;\r\n case 1: ca = \"1\";\r\n break;\r\n case 2: ca = \"2\";\r\n break;\r\n case 3: ca = \"3\";\r\n break;\r\n case 4: ca = \"4\";\r\n break;\r\n case 5: ca = \"5\";\r\n break;\r\n case 6: ca = \"6\";\r\n break;\r\n case 7: ca = \"7\";\r\n break;\r\n case 8: ca = \"8\";\r\n break;\r\n case 9: ca = \"9\";\r\n break;\r\n case 10: ca = \"a\";\r\n break;\r\n case 11: ca = \"b\";\r\n break;\r\n case 12: ca = \"c\";\r\n break;\r\n case 13: ca = \"d\";\r\n break;\r\n case 14: ca = \"e\";\r\n break;\r\n case 15: ca = \"f\";\r\n break;\r\n case 16: ca = \"g\";\r\n break;\r\n default: ca = \"g\";\r\n break;\r\n }\r\n //This is the innerloop\r\n for(int y = 0; y <= 36; y++){\r\n\r\n String da;\r\n //da = checkYValue(y);\r\n switch (y) {\r\n case 0: da = \"0\";\r\n break;\r\n case 1: da = \"1\";\r\n break;\r\n case 2: da = \"2\";\r\n break;\r\n case 3: da = \"3\";\r\n break;\r\n case 4: da = \"4\";\r\n break;\r\n case 5: da = \"5\";\r\n break;\r\n case 6: da = \"6\";\r\n break;\r\n case 7: da = \"7\";\r\n break;\r\n case 8: da = \"8\";\r\n break;\r\n case 9: da = \"9\";\r\n break;\r\n case 10: da = \"a\";\r\n break;\r\n case 11: da = \"b\";\r\n break;\r\n case 12: da = \"c\";\r\n break;\r\n case 13: da = \"d\";\r\n break;\r\n case 14: da = \"e\";\r\n break;\r\n case 15: da = \"f\";\r\n break;\r\n case 16: da = \"g\";\r\n break;\r\n case 17: da = \"h\";\r\n break;\r\n case 18: da = \"i\";\r\n break;\r\n case 19: da = \"j\";\r\n break;\r\n case 20: da = \"k\";\r\n break;\r\n case 21: da = \"l\";\r\n break;\r\n case 22: da = \"m\";\r\n break;\r\n case 23: da = \"n\";\r\n break;\r\n case 24: da = \"o\";\r\n break;\r\n case 25: da = \"p\";\r\n break;\r\n case 26: da = \"q\";\r\n break;\r\n case 27: da = \"r\";\r\n break;\r\n case 28: da = \"s\";\r\n break;\r\n case 29: da = \"t\";\r\n break;\r\n case 30: da = \"u\";\r\n break;\r\n case 31: da = \"v\";\r\n break;\r\n case 32: da = \"w\";\r\n break;\r\n case 33: da = \"x\";\r\n break;\r\n case 34: da = \"y\";\r\n break;\r\n case 35: da = \"z\";\r\n break;\r\n default: da = \"g\";\r\n break;\r\n }\r\n\r\n // System.out.println(\"Check CA and DA \" + ca + \" X\" );\r\n\r\n if( x >= 3 && y >= 2){ // if ID = 31 skip it duh\r\n\r\n if( driver.findElements(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).size() != 0){\r\n\r\n //System.out.println(\"Check CA and DA\" + ca + \" \" + da);\r\n //*[@id=\":6t\"]\r\n //TODO: Search based on sender of email //*[@id=\\\":\" + ca + da + \"\\\"]\" //*[@id=\":v7\"]/b/text()\r\n\r\n // System.out.println(driver.findElement(By.id(\":\" + ca + da)).getText());\r\n // System.out.println(\"We are here\");\r\n\r\n //if(driver.findElement(By.cssSelector(\".zA.zE\")).getCssValue(gmail)){ //this is to find if it is unread //Old Code .getText().contains(\"Instant payment received from\")\r\n if(driver.findElement(By.id(\":\" + ca + da)).getText().contains(\"Instant payment received from\")) {\r\n WebElement currentEmail = driver.findElement(By.id(\":\" + ca + da));\r\n System.out.println(currentEmail.getCssValue(\"background\"));\r\n if(currentEmail.getCssValue(\"background\").contains(\"rgba(255, 255, 255, 0.9)\")){\r\n //unread click it\r\n System.out.println(\"We are unread now click\");\r\n driver.findElement(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).click();\r\n System.out.println(\"You Luckly basters\");\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n if(x == 16 && y == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n if(x == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n\r\n System.out.println(\"We are in the RIGHT EMAIL ADDRESS\");\r\n Thread.sleep(1000);\r\n WebElement insideEmail = driver.findElement(By.cssSelector(\".acX .aaq, .acX .bsQ\"));\r\n //driver.findElement(By.xpath(\"//*[@id=\\\":k8\\\"]/div[1]/div[2]/div[1]/table/tbody/tr[1]/td[4]/div[1]\")).click();\r\n insideEmail.click();\r\n //insideEmail.sendKeys(\"This is a test\");\r\n driver.findElement(By.cssSelector(\".aO7\")).sendKeys(\"We made it\");\r\n\r\n\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Ebay.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n\r\n }", "@Then(\"User should be navigated to services page\")\n\tpublic static void services_positive_tc_001() throws Exception {\n\t\ttry {\n\t\t\tstr=driver.findElement(By.xpath(OR_reader(\"Object Locator\",\"services_title\"))).isDisplayed();\n\t\t\tAssert.assertEquals(str, true);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttakeScreenShot(\"services_positive_tc_001\");\n\t\t}\n\t}", "@Test\n public void testCreateOnBehalfUser_asTechnologyManager() throws Exception {\n container.login(supplierAdminUser.getKey(), ROLE_TECHNOLOGY_MANAGER);\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), \"abcdef\");\n checkCreatedUser(result, customer, \"abcdef\", false);\n checkUserRoleAssignment(result, ROLE_ORGANIZATION_ADMIN);\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyThankYouSurveyInAnonymousSMR(){\t\t\t\t\t\t \n\t Report.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the anonymous SMR page for Gas customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRUser\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.verifyAnonymousSAPGasCustomer(smrProfile)\t\t\n\t//.verifySapIsu(smrProfile)\n\t.verifyMeterReadConfirmation(smrProfile);\n\t//.verifyThankYouSurveyPage(smrProfile);\n\t//.verifyAnonymousSAPGasCustomer(smrProfile);\n\n\n}", "@Test(priority = 2 , retryAnalyzer = Retry.class)\n\tpublic void VPORT_10_VerifyAllTabsPages()\n\t{\n\t\tString districtUser = dependentData.getProperty(\"VPORT_002_DistrictUserName\");\n\t\tvportloginpage.enterLoginCredentials(districtUser, vportData.distUserPassword);\n\t\tdistrictAdminHomepage = (DistrictAdminHomepage) vportloginpage.clickSignInButton(ReturnPage.MYDISTRICPAGE);\n\t\t//\tVerifying all the Pages and links for District user\n\t\tdistrictAdminHomepage.verifyAllTheLinksAndPages(\"DistUser\");\n\t\t//Log out from District user Login\n\t\tvportloginpage=districtAdminHomepage.clickLogoutLink();\n\t\tvportloginpage.verifyLoginPage();\n\n\t\t/*\t ---Verification For Campus User User--- \n\t\tString campusUser = dependentData.getProperty(\"VPORT_002_SchoolUser\");\n\t\tvportloginpage.enterLoginCredentials(campusUser, vportData.schoolUserPassword);\n\t\tdistrictAdminHomepage = (DistrictAdminHomepage) vportloginpage.clickSignInButton(ReturnPage.MYDISTRICPAGE);\n\t\t//\tVerifying all the Pages and links for District user\n\t\tdistrictAdminHomepage.verifyAllTheLinksAndPages(\"CampUser\");\n\t\t//Log out from Campus/School user Login\n\t\tvportloginpage=districtAdminHomepage.clickLogoutLink();\n\t\tvportloginpage.verifyLoginPage();\n\n\t\t ---Verification For Teacher User--- \n\t\tString teacher = dependentData.getProperty(\"VPORT_006_TeacherUserID\");\n\t\tvportloginpage.enterLoginCredentials(teacher, teacher);\n\t\tdistrictAdminHomepage = (DistrictAdminHomepage) vportloginpage.clickSignInButton(ReturnPage.MYDISTRICPAGE);\n\t\t//\tVerifying all the Pages and links for District user\n\t\tdistrictAdminHomepage.verifyAllTheLinksAndPages(\"Teacher\");\n\t\t//Log out from Teacher user Login\n\t\tvportloginpage=districtAdminHomepage.clickLogoutLink();\n\t\tvportloginpage.verifyLoginPage();*/\n\t}", "String getComponentVerifyTicket();", "@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }", "@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "public static String regParticipantsTest() {\n\t\t\t\n\t\t\tlogger.info(\"ParticipantRegistrationPlus:regParticipantsTest\");\t\n\t\t\t\n\t\t\tClientSession cs = ClientSession.getInstance();\n\t\t\t\t\t\t\n\t\t\ttry {\n\t\t\t\tcs.startSession(userName, password);\n\t\t\t} catch (ApplicationException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tboolean isError=false;\n\t\t\tString errorMsg=\"\";\n\t\t\tProperties prop = new Properties();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\tParticipant p = new Participant();\n\t\t\t\t\tp.setLastName(\"patientElement\");\n\t\t\t\t\tp.setFirstName(\"\");\n\t\t\t\t\tp.setMiddleName(\"cpElement\");\n\t\t\t\t\tp.setActivityStatus(\"Active\");\n\t\t\t\t\tp.setBirthDate(dateFormat(\"0000-00-00\"));\n\t\t\t\t\tString gender=\"Male Gender\";\n\t\t\t\t\tp.setGender(gender);\n\t\t\t\t\tp.setVitalStatus(\"Unknown\");\n\t\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\tp = (Participant) appService.createObject(p);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\tlogger.info(\"while creating participant\");\n\t\t\t\t \te.printStackTrace();\n\t\t\t \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Participant created successfully\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisError = true;\n\t\t\t\terrorMsg=e.getMessage();\n\t\t\t}\n\t\t\tif(isError)\n\t\t\t\treturn \"Participant registration failed because of an error [\"+errorMsg+\"]\";\n\t\t\telse\n\t\t\t\treturn \"success\";\n\t\t}", "@Test\n\tpublic void AccountDetail() {\n\t\tWebElement SignIn = driver.findElement(By.xpath(\"//a[@id='nav-link-accountList']\"));\n\t\tSignIn.click();\n\n\t\t// Enter the Emailid \n\t\tWebElement EmailId = driver.findElement(By.id(\"ap_email\"));\n\t\tEmailId.sendKeys(\"[email protected]\");\n\n\t\t// To click the continue next button \n\t\tWebElement ContinueTOClick = driver.findElement(By.id(\"continue\"));\n\t\tContinueTOClick.click();\n\n\t\t// fill the password\n\t\tWebElement Password = driver.findElement(By.id(\"ap_password\"));\n\t\tPassword.sendKeys(\"abc121\");\n\n\t\t// click on sign in submit button\n\t\tWebElement submit = driver.findElement(By.id(\"signInSubmit\"));\n\t\tsubmit.click();\n\t\t\n\t\t\n\t\ttry {\n\t\t\tWebElement AlertMessage = driver.findElement(By.xpath(\"//h4[@class='a-alert-heading']\"));\n\t\t\tSystem.out.println(AlertMessage.getText());\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\tWebElement AlertMessage = driver.findElement(By.xpath(\"//h4[@class='a-alert-heading']\"));\n\t\t\t\n\t\t\tSystem.out.println(AlertMessage.getText());\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}", "@Test(priority=22)\n\tpublic void verifyActiveAdsVistsLeadsCountandIconsaredisplaying() throws Exception {\n\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\t/*LoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(\"[email protected]\", \"sunfra123\");\n\t\tclick(loginPage.LoginButton);*/\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\twaitTill(2000);\n\t\t//for ActiveAds\n\t\tAssert.assertTrue(getText(overviewObj.totalActiveAdsText).trim().equals(\"Total number of active ads\"),\n\t\t\t\t\"Total number of active Ads text is not displaying\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.iconInActiveAdsCountSection),\n\t\t\t\t\"Icon is not displaying for total number of active Ads\");\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(Integer.parseInt(getText(overviewObj.totalActiveAdsCount).trim())>0,\n\t\t\t\t\"Total number of active Ads count is incorrect\");\n\t\t\n\t\t//for visits\n\t\tAssert.assertTrue(getText(overviewObj.totalVisitsText).trim().equals(\"Total of visits\"),\n\t\t\t\t\"Total number of visit text is not displaying\");\n Assert.assertTrue(verifyElementPresent(overviewObj.iconInVisitesCountSection),\n\t\t\t\t\"Icon is not displaying for total number of visits\");\n Assert.assertTrue(Integer.parseInt(getText(overviewObj.totalVisitsCount).trim())>0,\n\t\t\t\t\"Total number of visit count is incorrect\");\n //for Leads\n \tAssert.assertTrue(getText(overviewObj.totalLeadsText).trim().equals(\"Total of leads\"),\n \t\t\t\t\t\t\"Total number of Leads text is not displaying\");\n \tAssert.assertTrue(verifyElementPresent(overviewObj.iconInTotalLeadsCountSection),\n \t\t\t\t\t\t\"Icon is not displaying for total number of Leads\");\n \tAssert.assertTrue(Integer.parseInt(getText(overviewObj.totalLeadsCount).trim())>0,\n \t\t\t\t\t\"Total number of Leads count is incorrect\");\n\t\n\t}", "@Test(enabled = true)\n\tpublic void viewTravelHistoryRegistredCustomerSubAccount() throws Exception {\n\n\t\t// create travel history via soap call\n\t\tSOAPClientSAAJ sClient = new SOAPClientSAAJ();\n\t\tCreditCardNumberGenerator ccGenerator = new CreditCardNumberGenerator();\n\t\tString validCCNumber = ccGenerator.generate(\"4\", 16);\n\t\tString accountID = sClient.travelHistorySOAPCall(validCCNumber);\n\t\tSystem.out.println(\"cc number being used is \" + validCCNumber);\n\t\tSystem.out.println(\"account id being returned is \" + accountID);\n\n\t\t// takes around 6 minutes for travel history to show on cmc\n\t\tUtils.waitTime(360000);\n\n\t\t// create account and link it to cc\n\t\tcoreTest.signIn(driver);\n\t\tcoreTest.createCustomer(driver);\n\t\tBasePage bPage = new BasePage(driver);\n\t\tbPage.clickLinkAccount(driver);\n\t\tLinkAccountPage lPage = new LinkAccountPage(driver);\n\n\t\t// use cc number from soap call to link account\n\t\tlPage.enterBankAccount(driver, validCCNumber);\n\t\tlPage.selectExpMonth(driver);\n\t\tlPage.selectExpYear(driver, 2);\n\t\tlPage.clickSearchToken(driver);\n\t\tlPage.enterNickName(driver, \"adam\");\n\t\tlPage.clickLinkAccount(driver);\n\n\t\t// checking travel history under subaccount page\n\t\tbPage.clickLinkedAccount(driver);\n\t\tTokenSearchSubSystemPage ssPage = new TokenSearchSubSystemPage(driver);\n\t\tssPage.clickTravelHistory(driver);\n\t\n\t\tAssert.assertEquals(ssPage.getLocation(driver), LOCATION);\n\t\tAssert.assertEquals(ssPage.getTravelMode(driver), TRAVEL_MODE);\n\t\tAssert.assertEquals(ssPage.getToken(driver), TOKEN);\n\t\tAssert.assertEquals(ssPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(ssPage.getUnpaidFare(driver), UNPAID_FARE);\n\n\t\tssPage.clickTravelHistoryRow(driver);\n\t\tTravelHistoryDetailPage tdPage = new TravelHistoryDetailPage(driver);\n\n\t\tAssert.assertEquals(tdPage.getLocation(driver), LOCATION);\n\t\tAssert.assertEquals(tdPage.getOperator(driver), OPERATOR);\n\t\tAssert.assertEquals(tdPage.getTransactionStatus(driver), TRANSACTION_STATUS);\n\n\t\tLog.info(\"viewTravelHistoryRegistredCustomerSubAccount Completed\");\n\t\tdriver.close();\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifySuperUserAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the super user is able to perform journeys\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifySuperuserAccessjourneyverification();\n\t}", "@Override\r\n\t\tpublic void action() {\n\t\t\tswitch (state) {\r\n\t\t\tcase REGISTER:\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" trying to register\");\r\n\t\t\t\t\r\n\t\t\t\t// searching for waiter agent\r\n\t\t\t\twhile(waiter == null) {\r\n\t\t\t\t\twaiter = searchWaiterAgent(\"waiter-service\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tACLMessage cfp = new ACLMessage(ACLMessage.CFP);\r\n\t\t\t\tcfp.addReceiver(waiter);\r\n\t\t\t\tcfp.setContent(\"philosopher-agent\");\r\n\t\t\t\tcfp.setConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tcfp.setReplyWith(\"cfp\"+System.currentTimeMillis());\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" send registration request \" + cfp);\r\n\t\t\t\tmyAgent.send(cfp);\r\n\t\t\t\t\r\n\t\t\t\t// Prepare template to get response\r\n\t\t\t\t//mt = MessageTemplate.and(MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\"),\r\n\t\t\t\t//\t\tMessageTemplate.MatchInReplyTo(request.getReplyWith()));\r\n\t\t\t\tmt = MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tstate = State.REGISTERED;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase REGISTERED:\r\n\t\t\t\tACLMessage response = myAgent.receive();\r\n\t\t\t\tif (response != null && response.getConversationId().equals(\"philosopher-waiter-fork\")) {\r\n\t\t\t\t\tif (response.getPerformative() == ACLMessage.SUBSCRIBE) {\r\n\t\t\t\t\t\t// behaviour can be finished\r\n\t\t\t\t\t\tregistered = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registered Successfully\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tregistered = false;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registration in progress\");\r\n\t\t\t\t\t\tstate = State.REGISTER;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(myAgent.getAID().getName() + \" blocked\");\r\n\t\t\t\t\tblock();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "public static void main(String[] args) {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n\n\t\tWebDriver driver = new ChromeDriver();\n\n\t\t// maximize the window\n\t\tdriver.manage().window().maximize();\n\n\t\t// Load url\n\t\t// driver.get(\"https://opensource-demo.orangehrmlive.com/\");\n\t\tdriver.get(\"https://secure.bankofamerica.com/login/sign-in/signOnV2Screen.go\");\n\n\t\t// get title of the page\n\t\t// System.out.println(driver.getTitle());\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(title);\n\n\t\t// Assertion\n\t\tAssert.assertEquals(title, \"Bank of America | Online Banking | Sign In | Online ID\", \"Asserting page Title\");\n\n\t\t// isDisplayed(); -\"Bank of America\" Logo is displayed (true/false)\n\t\tboolean logo = driver.findElement(By.xpath(\"//img[@alt='Bank of America']\")).isDisplayed();\n\n\t\t// Assertion\n\t\tAssert.assertTrue(logo, \"logo is displayed\");\n\n\t\t// isEnabled() -Get The App link is Enable(true/false)\n\t\tboolean getTheAppLink = driver.findElement(By.xpath(\"//a[@id='choose-device-get-the-app']/span[1]\"))\n\t\t\t\t.isEnabled();\n\t\tif (getTheAppLink == true) {\n\t\t\tSystem.out.println(\"The Get the App link is Enabled\");\n\t\t} else {\n\t\t\tSystem.out.println(\"The Get the App link is not Enabled\");\n\t\t}\n\n\t\t// sign in to OrangeHRM\n\t\t/*\n\t\t * driver.findElement(By.id(\"txtUsername\")).sendKeys(\"Admin\");\n\t\t * driver.findElement(By.id(\"txtPassword\")).sendKeys(\"admin123\");\n\t\t * driver.findElement(By.id(\"btnLogin\")).click();\n\t\t * driver.findElement(By.linkText(\"Admin\")).click();\n\t\t */\n\n\t\t// isSelected();-to do this validation we can use only-RadioButton,a CheckBox &\n\t\t// Drop-down (true/false)\n\t\t// 1st click on the \"Save this online Id CheckBox\"(select) then verify\n\t\t// isSelected() otherwise else part will be work\n\t\tdriver.findElement(By.xpath(\"//div[@class='remember-info']/input \")).click();\n\t\tboolean SaveThisOnlineIdCheckbox = driver.findElement(By.xpath(\"//div[@class='remember-info']/input \"))\n\t\t\t\t.isSelected();\n\t\tSystem.out.println(SaveThisOnlineIdCheckbox);\n\n\t\t// Assertion\n\t\tAssert.assertTrue(SaveThisOnlineIdCheckbox, \"SaveThisOnlineId CheckBox is selected\");\n\n\t\t// Validation\n\t\tif (SaveThisOnlineIdCheckbox == true) {\n\t\t\tSystem.out.println(\"The checkbox is Selected\");\n\t\t} else {\n\t\t\tSystem.out.println(\"The checkbox is not Selected\");\n\t\t}\n\n\t\t// driver.quit();\n\t}", "@Given(\"^I'm on \\\"([^\\\"]*)\\\" page of GetGo pay with valid \\\"([^\\\"]*)\\\" and \\\"([^\\\"]*)\\\"$\")\n public void i_m_on_page_of_GetGo_pay_with_valid_and(String arg1, String arg2, String arg3) throws Throwable {\n passworddetails=arg3;\n email=PropertyReader.testDataOf(arg2);\n if(Device.isAndroid()) {\n welcome.clickLogin();\n login.enterEmail(PropertyReader.testDataOf(arg2));\n login.clickNext();\n login.enterPassword(PropertyReader.testDataOf(arg3));\n //login.enterPassword(PropertyReader.dynamicReadTestDataOf(arg3));\n\n login.clickLogin();\n //dashboard.\n }\n else\n {\n login.iOSLoginFlow(PropertyReader.testDataOf(arg2),PropertyReader.testDataOf(arg3));\n }\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMeterReadingElectricityOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"verify the Electricity reading meter Overlay in Reading Page\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t.verifyElectricitysitenoWhereCanIfindthisLink(smrProfile);\t\t\n\t\t\n}", "public void LocationAssesment_Location(){\r\n\t\t//String RFSID = getValue(\"RFSName\");\r\n\t//\tString password = getValue(Password);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tdriver.switchTo().defaultContent();\r\n\t\t\t\t\tsleep(3000);\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget2Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocationAssesment\"));\r\n\t\t\t click(locator_split(\"linkclickLocation\"));\r\n\t\t\t // driver.findElement(By.xpath(\"//*[@tabindex='4']/a/span\")).click();\r\n\t\t\t // driver.findElement(By.xpath(\"//a[@title='Click here to open Location Assessment']\")).click();\r\n\t\t\t driver.switchTo().defaultContent();\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget3Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocation\"));\r\n\t\t\t //driver.findElement(By.xpath(\"//li[@tabindex='0']/a/span\")).click();\r\n\t\t\t System.out.println(\"verification\");\r\n\t\t\t sleep(1000);\r\n\t\t\t\t System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getAttribute(\"value\"));\r\nsleep(2000);\r\n\t\t\t \r\n\t\t\t // verifyTextPresent(locator_split(\"txtLocation\"), getValue(\"Locationname\"),\"Location Name\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtLocation\"), getValue(\"Locationname\")) == false){\r\n\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtLocation\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtLocation\")), getValue(\"Locationname\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t // getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"),\"city\");\r\n\t\t\t // System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getText());\r\n\t\t\t \r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtCity\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtCity\")), getValue(\"CityName\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"ListCountry\"), getValue(\"Country\"),\"Country\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"ListCountry\"), getValue(\"Country\"))==false){\r\n\t\t\t\t \r\n\t\t\t \t//clearWebEdit(locator_split(\"ListCountry\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tselectListValue((locator_split(\"ListCountry\")), getValue(\"Country\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIvalue\"),getValue(\"BIValue\"),\"BI Value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIvalue\"), getValue(\"BIValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIvalue\")), getValue(\"BIValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"),\"BI Indemnity period\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIindemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIindemnityperiod\")), getValue(\"BIIndemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"),\"Building\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBuildingValue\")), getValue(\"BuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"),\"M+EValue\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtMEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtMEvalue\")), getValue(\"MandEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"),\"Content value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtcontentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtcontentvalue\")), getValue(\"Contentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //verifyTextPresent(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"),\"Stock inventory\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtstockinventory\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtstockinventory\")), getValue(\"Stockvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"),\"Other PD\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtotherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtotherPD\")), getValue(\"OtherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //click(locator_split(\"txtLocationnext\"));\r\n\t\t\t\t//clickbylinktext(\"No\");\r\n\t\t\t\r\n\t\t//switchframe(\"PegaGadget2Ifr\");\r\n\t\tsleep(3000);\r\n\t\t//clickbylinktext(\"No\");*/\r\n\t\t\tif(driver.findElement(By.id(\"SectionCompleted\")).isSelected()==true)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check Box alresy selected\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check box is not selected\");\r\n\t\t\t\tdriver.findElement(By.id(\"SectionCompleted\")).click();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}" ]
[ "0.7585426", "0.731861", "0.63884807", "0.6349125", "0.6302789", "0.6254645", "0.60929406", "0.60669094", "0.6015811", "0.5995458", "0.59269863", "0.5922923", "0.59182113", "0.5890842", "0.58847857", "0.58538795", "0.5842697", "0.58282316", "0.5808667", "0.5777699", "0.57701576", "0.57560617", "0.57413346", "0.56991625", "0.5687182", "0.5660895", "0.5658376", "0.56404525", "0.5639679", "0.5624987", "0.56216305", "0.5620657", "0.56187123", "0.5609632", "0.5608864", "0.5605811", "0.55895185", "0.5540191", "0.55359495", "0.551467", "0.55108035", "0.550656", "0.5502854", "0.5498353", "0.54876065", "0.5485705", "0.547832", "0.54637116", "0.5454701", "0.54459244", "0.54355806", "0.54355204", "0.5432664", "0.542586", "0.54234713", "0.5422152", "0.5412595", "0.54121006", "0.54117286", "0.541029", "0.5410263", "0.54076344", "0.5394532", "0.5391571", "0.5390644", "0.53795946", "0.5379298", "0.53782606", "0.5373953", "0.53674144", "0.53670573", "0.5355892", "0.5346511", "0.5343601", "0.534334", "0.5341717", "0.5334213", "0.5332457", "0.53316736", "0.53310794", "0.5330653", "0.5325174", "0.53250957", "0.53233314", "0.5315824", "0.53153765", "0.531331", "0.53108275", "0.5306936", "0.53003246", "0.52999973", "0.52996385", "0.5289642", "0.5286161", "0.5284256", "0.5281131", "0.52809936", "0.52809584", "0.52808034", "0.5280416" ]
0.74895054
1
TS_Agent_02_E2E To verify whether the Partner service agent is able to look up a Broker through "Partner service agent" journey TS_Agent_08 To verify the link "Find user" link navigates to the "Update user details" page when entering Email address or Contact person BP number in "Look up user" page TS_Agent_09 To verify the details of the particular logged in broker is prepopulated in the "Update user details" page
@Test(groups ={Slingshot,Regression,CsaAgent}) public void verifyPartnerServiceAgentLookUpUser() throws Exception { Report.createTestLogHeader("CSA", "To verify updated user details page through Look up user navigation"); UserProfile userProfile = new TestDataHelper().getUserProfile("PSABroker"); //deregisterinBgbonline(userProfile); //Register a user /*new PartnerServiceAgentAction() .navigateToPSARegistration() .clickRegisteraUser(userProfile); new RegistrationAction() .openEncryptURL(userProfile) .fillRegistrationDetails(userProfile) .verifyThankYouPage() .clickLoginLink() .verifyAuditEntry(userProfile) .verifyEmailIdInDb(userProfile); //verify Lookup User functionality */ new PartnerServiceAgentAction() .navigateToPSARegistration() .verifyFindUser(userProfile) .verifyUpdateUserDetailsPage() .verifyUserAccountInformation(userProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUserFunctionality() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify whether the account status of broker is successfully changed by agent\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t/*deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);*/\n\t\t\t\t\n\t\t\t\t//verify Lookup User functionality\n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.updateAndVerifyStatus(userProfile);\n\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyImpersonateUserLink() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"ViewBillPartner\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew SapCrmAction()\n\t\t\t\t\t .loginDetails(crmuserProfile)\n\t\t\t\t\t .searchByAccountId(crmuserProfile, userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\t//verify Lookup User functionality\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyImpersonateLink(smrProfile);\t \n\t\t\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyPasswordResetLink() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew SapCrmAction()\n\t\t\t\t\t .loginDetails(crmuserProfile)\n\t\t\t\t\t .searchByAccountId(crmuserProfile, userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\t//verify Lookup User functionality\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyPasswordLink(userProfile);\t \n\t\t\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyAuditTrailSearch() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyAuditTrail(userProfile);\n\t\t\t\t \n\t\t\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentRegisterUser() throws Exception {\n\t\t\tReport.createTestLogHeader(\"PSA Journey\", \"To verify whether the Partner service agent is able to register a Broker through Partner service agent journey\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetails\"); \n\t\t\tnew PartnerServiceAgentAction()\n\t\t\t.navigateToPSARegistration()\n\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t/*new SapCrmAction()\n\t\t\t .loginDetails(crmuserProfile)\n\t\t\t .searchByAccountId(crmuserProfile, userProfile);*/\n\t\t\tnew RegistrationAction()\n\t\t\t.openEncryptURL(userProfile)\n\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t.verifyThankYouPage()\n\t\t\t.clickLoginLink()\n\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t.verifyEmailIdInDb(userProfile);\n\t\t\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyRBPAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the RBP user is able to perform journey\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifyRBPuserjourneyverification();\n\t\n\t}", "@Test(groups=\"SMR1137\")\r\n\tpublic void smr1137(){\r\n\t\ttry {\r\n\t\t\t//final String firstName=testDataOR.get(\"mono_first_name\"),lastName=testDataOR.get(\"mono_last_name\"); \r\n\t\t\t//login(\"URLEportal\",testDataOR.get(\"mono_user_login\"),firstName,lastName);\r\n\t\t\teportalCust=testDataOR.get(\"customer\");\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEportal\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t//login(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t/*logger.info(\"SMR1137 execution started\");\r\n\t\t\tfinal String customerName=testDataOR.get(\"customer\");\r\n\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 1 :\");\r\n\t\t\tlogger.info(\"Access eportal with superuser\");\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 2,3,4:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Disable ‘ePayment’ module and validate\r\n\t\t\tlogger.info(\"Step 5:\");\r\n\t\t\tdisableModNVal(\"ep_ckbx_id\", EPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Disable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tdisableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Access ePortal with a superuser and select customer\r\n\t\t\t//In Store Payment menu should not be available\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tAssert.assertFalse(selUtils.isElementPresentCommon(\"instorepay_tab_xpath\"),INSTOREPAY+\" menu is available\");\r\n\t\t\tlogger.info(\"In store payment menu is not available\");\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 8,9:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Enable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 10\");\r\n\t\t\tenableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\r\n\t\t\t\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 11\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);*/\r\n\t\t\tlogger.info(\"SMR1137 execution started\");\r\n\t\t}catch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "@Step\n\tpublic void verify_the_DP_Topic_of_retire_status(String Page)throws Exception {\n\n\t\tLong dpKey=Serenity.sessionVariableCalled(\"DPkey\"); \n\n\t\tswitch(Page){\n\t\tcase \"AWB\": \n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"No Disposition\");\n\t\t\tString medicalPolicy=Serenity.sessionVariableCalled(\"Medicalpolicy\");\n\t\t\tString MedPolicyXpath = StringUtils.replace(oCPWPage.MedPolicyAfterSearch, \"MedPolicyValue\", medicalPolicy);\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.PolicySelectionDrawerButton);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_10_Seconds);\n\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.MedPolicySearchBox, medicalPolicy);\n\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.MedPolicySearchButton);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_3_Seconds);\n\t\t\tobjSeleniumUtils.clickGivenXpath(MedPolicyXpath); \n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.ApplyToOpportunityGridBtn);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tboolean statusValue=oGenericUtils.isElementExist(oCPWPage.nonRecordsOfMedicalPolicies);\n\t\t\tif(statusValue)\n\t\t\t{\n\t\t\t\tAssert.assertTrue(\"Non Medical Policy / Topic \"+oCPWPage.nonRecordsOfMedicalPolicies+\"Status\",statusValue);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.SearchFileldXpath, String.valueOf(dpKey));\n\t\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.SearchButtonXpath);\n\t\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\t\tAssert.assertTrue(\"Non Records Opportunities \"+oCPWPage.nonRecordsOfOpportunities+\"Status\",oGenericUtils.isElementExist(oCPWPage.nonRecordsOfOpportunities));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"RWO\":\n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"No Disposition\");\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.reviewWorkedOpportunities);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.SearchFileldXpath, String.valueOf(dpKey));\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.SearchButtonXpath);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tAssert.assertTrue(\"Non Records Opportunities \"+oCPWPage.nonRecordsOfOpportunities+\"Status\",oGenericUtils.isElementExist(oCPWPage.nonRecordsOfOpportunities));\n\t\t\tbreak;\n\t\tcase \"PM\":\n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"Present\"); \n\t\t\tThread.sleep(2000);\n\t\t\t//Click on 'Reset' button\n\t\t\tobjSeleniumUtils.highlightElement(oFilterDrawer.sReset);\n\t\t\toGenericUtils.clickButton(By.xpath(oFilterDrawer.sReset));\n\t\t\tThread.sleep(2000);\n\t\t\tboolean bstatus=oCPWPage.Enter_the_given_MP_Topic_in_filter_Drawer(Serenity.sessionVariableCalled(\"Medicalpolicy\"));\n\n\t\t\tif(bstatus)\n\t\t\t{\n\t\t\t\tobjSeleniumUtils.clickGivenXpath(StringUtils.replace(oFilterDrawer.Medicalpolicy_Checkbox, \"value\", Serenity.sessionVariableCalled(\"Medicalpolicy\")));\n\t\t\t\toFilterDrawer.user_filters_by_clicking_on_Apply_for_Medical_Policy_Topic();\n\t\t\t\toOppurtunityDeck.validatethegivenDatainOpportunityDeck(Serenity.sessionVariableCalled(\"DPkey\").toString(), \"Updated DPkey\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAssert.assertTrue(\"DPKey not displayed as its retired\"+Serenity.sessionVariableCalled(\"DPkey\"), true);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}", "public void v_Verify_Guest2_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserSpecificAccounts_RBP() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether confirmation page is getting displayed for Reads, Bills, Payments users\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SubmitMeterReadodb\");\n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsRBP\"); \n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile);\t\t\t\t\t \t \t\t\t\t\t \t \t\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTabledetails(userProfile)\n\t\t.AdduserConfirmationPage();\n\t\t/*.confirmationPageVerificationLinks()\n\t\t.UserJourney_RBPAccessVerification(userProfile);\n\t\tnew SapCrmAction()\n\t\t.loginDetails(crmuserProfile)\n\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile);*/\n\t}", "public static void main(String[] args) throws Exception \r\n\t{\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"Drivers\\\\geckodriver.exe\");\r\n\t\tWebDriver driver=new FirefoxDriver();\r\n\t\tdriver.get(\"http://outlook.com\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t\t//Identify Signin Button\r\n\t\tWebElement Signin_btn=driver.findElement(By.xpath(\"(//a[contains(.,'Sign in')])[1]\"));\r\n\t\tSignin_btn.click();\r\n\t\t\r\n\t\r\n\t\t//Identify email \r\n\t\tWebElement Email_editbox=driver.findElement(By.xpath(\"//input[@id='i0116']\"));\r\n\t\tEmail_editbox.clear();\r\n\t\tEmail_editbox.sendKeys(\"[email protected]\"); //Entered valid email\r\n\t\t\r\n\t\t//Click Next button\r\n\t\tWebElement Next_btn=driver.findElement(By.xpath(\"//input[contains(@id,'idSIButton9')]\"));\r\n\t\tNext_btn.click();\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\t\r\n\t\t//Identify webpage\r\n\t\tWebElement Page=driver.findElement(By.tagName(\"body\"));\r\n\t\tString Page_Visible_text=Page.getText();\r\n\t\tSystem.out.println(Page_Visible_text);\r\n\t\t\r\n\t\t\r\n\t\t//Write decision to verify expected text visible at webpage\r\n\t\tif(Page_Visible_text.contains(\"Enter password\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Testpass, Expected text visible at webapge\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Expected text not visible at webpage\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyRPAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the RB user is able to perform journeys\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifyRPuserjourneyverification();\n\t\n\t}", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Step\n\tpublic void verify_AWB_and_RWO_pages_after_pipeline_for_the_captured_data(String sChange, String sDisposition, String DpType,String user) throws Throwable{\n\t\t\n\t\tExcelUtils.LoadEllData();\n\t\t\n\n\t\tHashMap<Integer, HashMap<String, String>> sEllData = ProjectVariables.sSubsequentEllData;\n\t\t\n\t\tSerenity.setSessionVariable(\"user\").to(user);\n\n\t\tint iRowCount = sEllData.size();\n\t\tint i =1;\n\t\tboolean blnRows = false;\n\n\t\tfor (i=1;i<=iRowCount;i++){\n\t\t\t\n\t\t\tString sExecution = sEllData.get(i).get(\"Execution\");\n\t\t\t\n\t\t\tif (sExecution.equalsIgnoreCase(\"Y\")){\n\t\t\t\tSerenity.setSessionVariable(\"client\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Client\"));\n\t\t\t\tSerenity.setSessionVariable(\"user\").to(user);\n\t\t\t\tSerenity.setSessionVariable(\"Medicalpolicy\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Medical_Policy\"));\n\t\t\t\tSerenity.setSessionVariable(\"Topic\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Topic\"));\n\t\t\t\tSerenity.setSessionVariable(\"DPkey\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"i_DP Key\"));\n\t\t\t\tSerenity.setSessionVariable(\"Disposition\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Disposition_captured\"));\t\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_Set_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"NotRFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_NotSet_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Savings\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"O_Savings_NotSet_RFP\"));\n\t\t\t\tString sClientkey=CPWPage.RetrieveTheClientkeyfromgivenClientthroughservice(Serenity.sessionVariableCalled(\"client\").toString());\n\t\t\t\tSerenity.setSessionVariable(\"clientkey\").to(sClientkey);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\toCPWPage.SelectPayer(\"\", Serenity.sessionVariableCalled(\"client\").toString());\n\t\tswitch(sChange.toUpperCase()){\n\t\tcase \"DP RETIRE\":\n\t\t\toCPWPage.SelectPolicySelectionAndApplyFilters(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\tAssert.assertFalse(\"'No results found that meet the search criteria.' message is displayed in the AWB Grid for the Medical policy ==>\"+\"Medicaid - New York State Policy\",objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Div_contains_text, \"value\", \"No results found that meet the search criteria.\")));\n\t\t\tArrayList<String> DPKeylist = new ArrayList();\n\t\t\tDPKeylist.add(Serenity.sessionVariableCalled(\"DPkey\").toString());\n\n\t\t\toCPWPage.verify_the_captured_data_is_not_displayed_in_the_given(DPKeylist, \"DPkey\", DpType);//mp no need\n\t\t\t///\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPkey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+DPKeylist, objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPKey ===>\"+DPKeylist+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"DP DESCRIPTION\":\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPKey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tAssert.assertTrue(\"Unable to click the DPKey in Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured Topic is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured MP is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tAssert.assertTrue(\"case not found::\"+sChange, false);\n\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\t\n\t}", "public void run() throws Exception {\n\t\tweb.window(2,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").navigate(\n\t\t\t\t\t\t\"http://riyoramgbm02.maaden.com:8050/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE\");\n\t\tweb.window(4,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_text_unamebean}}\").click();\n\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_text_unamebean}}\").setText(\"PEETHAMBARANS\");\n\t\t\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_password_pwdbean}}\")\n\t\t\t\t.setPassword(deobfuscate(\"vWeMH+MT9Gy3Y8SojsL+Mg==\"));\n\t\n\t\tweb.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_button_SubmitButton}}\").click();\n\t\tweb.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.MWSPC_PURCHASING_SUPERUSE}}\").click();\n\t\tweb.window(17,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\n\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Purchase_Order}}\").click();\n\t\tweb.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Purchase_Order_Summary}}\").click();\n\t\tweb.window(28,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window_1}}\")\n\t\t\t\t.waitForPage(180,true);\n\t\tforms.captureScreenshot(33);\n\t\t\n\t\t//forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_OPERATING_UNIT_0}}\").setFocus();\n\t\tif(forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").exists(60, TimeUnit.SECONDS)){\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").setText(\"741903172\");\n\t\t}\n\t\t\n\t\tString PO_Number = forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").getText();\n\t\tinfo(\"PO_Number ->\"+PO_Number);\n\t\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_button_FIND_FIND_0}}\").click();\n\t\tforms.captureScreenshot(38);\n\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Lines}}\").click();\n\t\tforms.captureScreenshot(41);\n\t\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Shipment}}\").click();\n\t\tforms.captureScreenshot(44);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_PO_NUM_0}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_RELEASE_}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_LINE_NUM}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIPMENT}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_ITEM_NUM}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_UNIT_MEA}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIP_TO_}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIPMENT_1}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_START_DA}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_END_DATE}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY}}\").setFocus();\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").setFocus();\n\t\tinfo(\"Quantity Due is : \"+forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").getText() );\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_2}}\").setFocus();\n\t\tinfo(\"Quantity Received is : \"+forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_2}}\").getText());\n\t\tforms.captureScreenshot();\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").close();\n\t\tforms.captureScreenshot(63);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_LINES_FOLDER_PURCHASING_O}}\").setFocus();\n\t\t\n//\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Shipment}}\").click();\n//\t\t\n//\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").activate(true);\n//\t\tforms.captureScreenshot(68);\n//\t\t\n//\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").close();\n//\t\tforms.captureScreenshot(71);\n//\t\t\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_LINES_FOLDER}}\").close();\n\t\tforms.captureScreenshot(74);\n\t\t\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_HEADERS_FOLDER}}\").close();\n\t\tforms.captureScreenshot(77);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_OPERATING_UNIT_0}}\").setFocus();\n\t\tforms.captureScreenshot(80);\n\t\t\n\t\tforms.close(81);\n\t\tforms.captureScreenshot(83);\n\t\t\n\t\tforms.choiceBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_choiceBox}}\").clickButton(\"OK\");\n\t\t\n\t\t\n\n\t}", "public void v_Verify_Guest12_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserallaccountsConfirmationPageNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the StandardUser All accounts Navigationlinks for the confirmation Page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifyAllAccountsViewName(userProfile)\n\t\t.EnterValid_StandardUserdata(userProfile) \t \t \t\t\n\t\t.AddNewUserNavigationVerification() //have to update navigation link\n\t\t.UserConfirmationPageNavigations();\t \t \t\t\n\t}", "public void v_Verify_Guest11_Displayed(){\n\t}", "public void v_Verify_Guest7_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserSpecificAccounts_FA() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether confirmation page is getting displayed for Full access user\");\n\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SubmitMeterReadodb\");\n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsFA\"); \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile);\t\t\t\t\t \t \t\t\t\t\t \t \t\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTabledetails(userProfile)\n\t\t.AdduserConfirmationPage()\n\t\t.confirmationPageVerificationLinks();\n\t\t/*.UserJourney_FA_AccessVerification(userProfile,smrProfile)\n\t\t new SapCrmAction()\n\t\t\t.loginDetails(crmuserProfile)\n\t\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile); \t*/\t\n\t}", "@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}", "public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\r\n\tpublic void smr142() {\r\n\t\ttry{\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\tlogger.info(\"SMR142 execution started\");\r\n\t\t\tfinal String numComm=testDataOR.get(\"num_comm\"),cust=testDataOR.get(\"customer\")\r\n\t\t\t\t\t,posNum=testDataOR.get(\"pos_number\"),dbEportal=testDataOR.get(\"databaseEportal\"),dbAxis=testDataOR.get(\"databaseAxis\")\r\n\t\t\t\t\t,pos,numptv,numcom;\r\n\t\t\tfinal String[] posLoc={\"posrefund_xpath\",\"posforcing_xpath\",\"posvoid_xpath\",\"posnumcomm_xpath\"},\r\n\t\t\t\t\tposVal={testDataOR.get(\"refund_option\"),testDataOR.get(\"forcing_option\"),testDataOR.get(\"void_option\"),numComm};\r\n\t\t\t\r\n\t\t\t//Access Everest with the Everest superuser\r\n\t\t\t//Navigate to Card Payment-Customer Provisioning and select the \r\n\t\t\t//customer\r\n\t\t\taddProfToCust(cust);\r\n\r\n\t\t\t//Select 'Manual localization',pos and click Next\t\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"operationorder_id\"), MANUALLOCALZTION);\r\n\t\t\tlogger.info(\"Selected \"+MANUALLOCALZTION);\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"pos_radiobttn_xpath\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"orderopenext_id\"));\r\n\r\n\t\t\t//Select a lowest level zone and click Next\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"localization_id\"), testDataOR.get(\"lowest_level_zone_a\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"localizationnext_xpath\"));\r\n\t\t\tlogger.info(\"Selected a lowest level zone and next button\");\r\n\t\t\t\r\n\t\t\t//Select the <num_comm> from the dropdown list,click 'Next' button\r\n\t\t\tlogger.info(\"Step 8:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"numcomm_selection_id\"), numComm);\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", selUtils.getObject(\"locnext_id\"));\r\n\t\t\tlogger.info(\"Selected numcomm zone and next button\");\r\n\r\n\t\t\t\r\n\t\t\t//select manual pos,and add pos details\r\n\t\t\tlogger.info(\"Step 9:\");\r\n\t\t\tselUtils.slctChkBoxOrRadio(selUtils.getObject(\"enterposanual_xpath\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"addpos_xpath\"));\r\n\t\t\tselUtils.getObject(\"posnumber_id\").sendKeys(posNum);\r\n\t\t\taddPOSval(posLoc, posVal);\r\n\t\t\t\r\n\t\t\t//Edit projectname and deploy\r\n\t\t\teditPNameNDeply();\r\n\t\t\t\r\n\t\t\tif(dbCheck){\r\n\t\t\t\t//validating data with database,validate data in Eportal database\r\n\t\t\t\tsqlQuery = \"SELECT * FROM pos WHERE pos='\"+posNum+\"'\";\r\n\t\t\t\tresSet = dbMethods.getDataBaseVal(dbEportal,sqlQuery,CommonConstants.ONEMIN);\r\n\t\t\t\tpos=resSet.getString(\"pos\");\r\n\t\t\t\tAssert.assertTrue(pos.equals(posNum), \"Table data does not exist \");\r\n\t\t\t\tlogger.info(\"pos number \"+posNum+ \" exists in table\");\r\n\r\n\t\t\t\t//Validating the results in Axis database\r\n\t\t\t\tsqlQuery=\"SELECT numtpv,numcomm FROM emv.tpvemv WHERE numtpv='\"+posNum+\"' AND numcomm='\"+numComm+\"';\";\r\n\t\t\t\tresSet = dbMethods.getDataBaseVal(dbAxis,sqlQuery,CommonConstants.ONEMIN);\r\n\t\t\t\tnumptv=resSet.getString(\"numtpv\");\r\n\t\t\t\tnumcom=resSet.getString(\"numcomm\");\r\n\t\t\t\tAssert.assertTrue(numptv.equals(posNum)&&numcom.equals(numComm), \"Table data does not exist \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlogger.info(\"SMR142 executed successfully\");\r\n\t\t}\r\n\t\tcatch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "@Then(\"the Booking page shows correct booking details\")\n public void bookingpage_verify_booking_details(){\n }", "public void v_Verify_Guest3_Displayed(){\n\t}", "public void v_Verify_Guest5_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserSpecificAccounts_RB() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether confirmation page is getting displayed for Reads & Bills users\");\t\t\t\t\t \t \t \t\t\t \t \n\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetailsRB\"); \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforRB\");\n\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile);\t\t\t\t\t \t \t\t\t\t\t \t \t\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage();\n\t\t/*.confirmationPageVerificationLinks()\n\t\t.UserJourney_RBAccessVerification(userProfile);*/\n\t\t/*new SapCrmAction()\n\t\t.loginDetails(crmuserProfile)\n\t\t.searchCrmFieldsVerification(crmuserProfile, userProfile);*/\t\t\t\t\t \t \t \n\n\t}", "@Test\n\tpublic void AccountDetail() {\n\t\tWebElement SignIn = driver.findElement(By.xpath(\"//a[@id='nav-link-accountList']\"));\n\t\tSignIn.click();\n\n\t\t// Enter the Emailid \n\t\tWebElement EmailId = driver.findElement(By.id(\"ap_email\"));\n\t\tEmailId.sendKeys(\"[email protected]\");\n\n\t\t// To click the continue next button \n\t\tWebElement ContinueTOClick = driver.findElement(By.id(\"continue\"));\n\t\tContinueTOClick.click();\n\n\t\t// fill the password\n\t\tWebElement Password = driver.findElement(By.id(\"ap_password\"));\n\t\tPassword.sendKeys(\"abc121\");\n\n\t\t// click on sign in submit button\n\t\tWebElement submit = driver.findElement(By.id(\"signInSubmit\"));\n\t\tsubmit.click();\n\t\t\n\t\t\n\t\ttry {\n\t\t\tWebElement AlertMessage = driver.findElement(By.xpath(\"//h4[@class='a-alert-heading']\"));\n\t\t\tSystem.out.println(AlertMessage.getText());\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\tWebElement AlertMessage = driver.findElement(By.xpath(\"//h4[@class='a-alert-heading']\"));\n\t\t\t\n\t\t\tSystem.out.println(AlertMessage.getText());\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}", "@Test(enabled=false)\n\tpublic void loanDetails(){\n\t\n\t\ttry{\n\t\tHomePage homePage=new HomePage(driver);\n\t\thomePage.clickOnSignIn();\n\t\t\n\t\tLoginActions loginAction=new LoginActions();\n\t\tloginAction.login(driver, \"username\", \"password\");\n\t\t\n\t\tAccountSummaryPage accountsummary= new AccountSummaryPage(driver);\n\t\taccountsummary.isAccountSummary();\n\t\t\n\t\tAccountActivityPage accountActivity=new AccountActivityPage(driver);\n\t\taccountActivity.clickOnAccountActivity();\n\t\t\n\t\taccountActivity.selectLoanAccount();\n\t\t\n\t\taccountActivity.getRowdata();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getRowdata(), \"RENT\");\t\n\t\t\n\t\tSystem.out.println(accountActivity.getRowdata());\n\t\t\n\t\t// Test case no - AccActShow_04 -no results for credit card are verified under this test only\n\t\n\t\taccountActivity.getCreditCard();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getCreditCard(), \"No Results\");\n\t\t}\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.getMessage();\n\t\t}\n\t}", "@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}", "public void v_Verify_Guest6_Displayed(){\n\t}", "@Test\n\tpublic void test03_AcceptARequest(){\n\t\tinfo(\"Test03: Accept a Request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t/*Step Number: 1\n\t\t *Step Name: Accept a request\n\t\t *Step Description: \n\t\t\t- Login as John\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of mary\n\t\t\t- Click on Accept button\n\t\t *Input Data: \n\t\t/*Expected Outcome: \n\t\t\t- The invitation of root, mary is shown on the invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- John is connected to mary and the invitation fades out and is permanently removed from the list\n\t\t\t- Request of root are moving to the top of the gadget if needed*/ \n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_ACCEPT_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "public static void main(String[] args) throws Exception\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\mahesh251\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t//SWD code can use browser driver software to give required effect in browser\n\t\tChromeDriver driver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\t//lunch site under testing(SUT)\n\t\tdriver.get(\"http://www.gmail.com\");\n\t\tThread.sleep(5000);\n\t\t//locate and fill userid\n\t\tdriver.findElement(By.name(\"identifier\")).sendKeys(\"chanikyareddy231\");\n\t\t//locate and click \"Next\" button\n\t\tdriver.findElement(By.xpath(\"//button[@type='button']/child::div[2]\")).click();\n\t\tThread.sleep(5000);\n\t\t//locate and fill password\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Chanikya231\");\n\t\t//locate and click \"Next\" button\n\t driver.findElement(By.xpath(\"//div[@id='passwordNext']/descendant::div[3]\")).click();\n\t Thread.sleep(15000);\n\t //mailbox testing via pagenation\n\t int eamc=0;\n\t int eurmc=0;\n\t int ermc=0;\n\t while(true)\n\t {\n\t \tWebElement mailbox=driver.findElement(By.xpath(\"(//table)[7]/tbody\"));\n\t \tList<WebElement> mails=mailbox.findElements(By.xpath(\"child::tr\"));\n\t \teamc=eamc+mails.size();\n\t \tfor(WebElement mail:mails)\n\t \t{\n\t \t\tWebElement e=mail.findElement(By.xpath(\"child::td[4]/div[1]\"));\n\t \t\tString op=(String) driver.executeScript(\"return(arguments[0].textContent);\", e); \n\t \t if(op.startsWith(\"unread\"))\n\t \t\t{\n\t \t\t\teurmc++;\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\termc++;\n\t \t\t}\n\t \t}\t\n\t \t//Go to next page\n\t \ttry\n\t \t{\n\t \t\tif(driver.findElement(By.xpath(\"//div[@aria-label='Older']\")).getAttribute(\"aria-disabled\").equals(\"true\"))\n\t \t\t{\n\t \t\t\tbreak; //terminate from loop,bcz we are in last page\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tdriver.findElement(By.xpath(\"//div[@aria-label='Older']\")).click();\n\t \t\t\tThread.sleep(5000);\n\t \t\t}\n\t \t}\n\t \tcatch(NullPointerException ex)\n\t \t{\n\t \t\tdriver.findElement(By.xpath(\"//div[@aria-label='Older']\")).click();\n\t \t\tThread.sleep(5000);\n\t \t}\n\t }\n\t System.out.println(\"Total count of all mails is \"+eamc);\n\t System.out.println(\"Total count of unread mails is \"+eurmc);\n\t System.out.println(\"Total count of read mails is \"+ermc);\n\t //do logout\n\t driver.findElement(By.xpath(\"//a[starts-with(@aria-label,'Google Account')]/child::*\")).click();\n\t Thread.sleep(5000);\n\t driver.findElement(By.linkText(\"Sign out\")).click();\n\t Thread.sleep(5000);\n\t //close site\n\t driver.close();\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySearchMeterByAcctno()\n{\t\t\n\t Report.createTestLogHeader(\"Submit Meter Read\", \"Verify multiple Search results are getting displayed while giving valid Account number in search field\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GlobalSMRMultiDialMeter11\");\n\tnew SubmitMeterReadAction()\n\t\n\t.BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .BgbverifyAfterLogin()\n .clickSubmitMeterReadLink()\n .SearchByAccoutnNumber(smrProfile)\n .enterMeterDials(smrProfile)\n //.enterGlobalMeterDials(smrProfile)\n\t.verifyMeterReadConfirmationTitle()\n\t.verifyAuditLeadTable(smrProfile);\n \n}", "public void v_Verify_Guest1_Displayed(){\n\t}", "public void v_Verify_Guest4_Displayed(){\n\t}", "@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }", "public void v_Verify_Guest10_Displayed(){\n\t}", "public static void main(String[] args) {\n \n \tSystem.setProperty(\"webdriver.gecko.driver\",\"C:\\\\geckodriver.exe\");\n\t\tWebDriver driver = new FirefoxDriver();\n\t\t\n \t\n String baseUrl = \"https://evam.com/\";\n \n // STEP 1 - launch Firefox and Visit EVAM Website\n driver.get(baseUrl);\n \n \n // Step 2 - Go to Contact tab\n \n //Find Contact Link (HTML Element) with the help of xPath and then perform click operation to open the contact page\n \n driver.findElement(By.xpath(\"(//span[contains(.,'Contact')])[1]\")).click();\n \n \n // Step 3- Copy all EVAM office addresses and paste them into the Message field of the form by pressing enter between each of them to make it easy to read.\n \n // 1) Find out Span (HTML Element)t with xpath and get USA office address with getText method and finally store the text into a string variable called AddressUSA \n \n String AddressUSA = driver.findElement(By.xpath(\"/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[1]/div/div[2]/p[2]/span\")).getText();\n \n \n // 2) Find the Message Text Area Element and then send the USA address value to Message with the help of sendkeys() method \n \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(AddressUSA);\n \n \n // 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method \n \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(Keys.ENTER);\n \t\t\n \n // 1) Find out Span (HTML Element) with xpath and get Netherland office address with getText() method and finally store the text into a string variable called AddressNetherland \n \n String AddressNetherland = driver.findElement(By.xpath(\"/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[2]/div/div[2]/p[2]/span\")).getText();\n \n \n // 2) Find the Message Text Area Element and then send the Netherland address value to Message with the help of sendkeys() method \n \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(AddressNetherland);\n \n \n // 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method \n \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(Keys.ENTER);\n \n \n // 1) Find out Span (HTML Element) with xpath and get Turkey office address with getText() method and finally store the text into a string variable called AddressTurkey\n String AddressTurkey = driver.findElement(By.xpath(\"/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[1]/div/div[3]/div/div/div[2]/p[2]/span\")).getText();\n \n // 2) Find the Message Text Area Element and then send the Turkey address value to Message with the help of sendkeys() method \n \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(AddressTurkey);\n \n // 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(Keys.ENTER);\n \n \n // 1) Find out Span (HTML Element) with xpath and get Russian office address with getText() method and finally store the text into a string variable called AddressRussia\n String AddressRussia = driver.findElement(By.xpath(\"/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[2]/div/div[4]/p[2]/span\")).getText();\n \n // 2) Find the Message Text Area Element and then send the Russian address value to Message with the help of sendkeys() method \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(AddressRussia);\n \n // 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method \n driver.findElement(By.xpath(\"//textarea[@name='textarea-274']\")).sendKeys(Keys.ENTER);\n \n // Step 4 - Fill out Name, Email, Phone and Company Information\n \n // First of all find HTML Elements one by one for (Name, Email, Phone and Company) and then use sendKeys() method to send the values in the text fields \n \n driver.findElement(By.xpath(\"//input[@name='text-925']\")).sendKeys(\"Hammad Afzal\");\n \n driver.findElement(By.xpath(\"//input[@name='email-705']\")).sendKeys(\"[email protected]\");\n \n driver.findElement(By.xpath(\"//input[@type='tel']\")).sendKeys(\"066987452\");\n \n driver.findElement(By.xpath(\"//input[contains(@name,'text-926')]\")).sendKeys(\"Test Company\");\n \n try {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.err.println(\"There was some error in Thread.sleep()\");\n\t\t}\n \n // Step 5 - Find Span (HTML Element) with xpath for send button and then use to click() to submit the form\n \n driver.findElement(By.xpath(\"(//input[contains(@type,'submit')])[2]\")).click();\n \n \n //close Firefox\n driver.close();\n \n }", "@Test(priority = 4, dependsOnMethods = { \"verifyUrlOfSubscription\" }, groups = { \"Smoke\" })\n\tpublic static void verifySubscriptionPageComponents() throws InterruptedException \n\t{\n\n\t\ttest = report.startTest(\"Verify Components of Subscription Page\");\n \n\t\t\n\t\t //verify Select Service Principal\n\t\t WebElement selectServicePrincipal=driver.findElement(By.xpath(xpathSelectServicePrincipal));\n\t\t Assert.assertTrue(selectServicePrincipal.isDisplayed());\n\t\t test.log(LogStatus.PASS, \"Select Service Principal\",\"Select Service Principal is displaying\");\n\t\t \n\t\t //Verify Select Service Principal Field WaterMark\n\t\t String selectServicePrincipalWM = driver.findElement(By.xpath(xpathSelectServicePrincipalWM)).getText();\n Assert.assertEquals(selectServicePrincipalWM,\"Select Service Principal *\",\"select Service Principal WaterMark is not Displaying \");\n test.log(LogStatus.PASS,\"Select Service Principal WM\", \"select Service Principal WaterMark is Displaying\");\n\t\t\n\t\t\n\t\t// Verify Name Field\n\t\tWebElement name = driver.findElement(By.id(idName));\n\t\tAssert.assertTrue(name.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"Name Field\", \"Name Field is displaying\");\n\n\t\t// Verify Name Field WaterMark\n\t\tString nameWaterMark = driver.findElement(By.xpath(xpathNameWaterMark)).getText();\n\t\tAssert.assertEquals(nameWaterMark, \"Name *\", \"Name * WaterAmrk is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Name Field WaterMark\", \"Name * WaterMark is Displaying\");\n\n\t\t// Verify Subscription Id Field\n\t\tWebElement subScription = driver.findElement(By.id(idSubScription));\n\t\tAssert.assertTrue(subScription.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"SubScription Field\", \"SubScription Field is displaying\");\n\n\t\t// Verify Subscription Id Field WaterMark\n\t\tString subscriptionIdWaterMark = driver.findElement(By.xpath(xpathSubscriptionIdWaterMark)).getText();\n\t\tAssert.assertEquals(subscriptionIdWaterMark, \"Subscription ID *\",\n\t\t\t\t\"Subscription ID * WaterMark is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"SubScription Field WaterMark\", \"Subscription ID * WaterMark is Displaying\");\n\n\t\t// Verify Description Field\n\t\tWebElement description = driver.findElement(By.id(idDescription));\n\t\tAssert.assertTrue(description.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"Description Field\", \"Description Field is displaying\");\n\n\t\t// Verify Description Field WaterMark\n\t\tString descriptionWaterMark = driver.findElement(By.xpath(xpathDescriptionWaterMark)).getText();\n\t\tAssert.assertEquals(descriptionWaterMark, \"Description\", \"Description WaterMark is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Description Field WaterMark\", \"Description WaterMark is Displaying\");\n\n\t\t// Verify and Validate Submit Button\n\t\tWebElement submitBtn = driver.findElement(By.id(idSubmitBtn));\n\t\tAssert.assertTrue(submitBtn.isEnabled());\n\t\ttest.log(LogStatus.PASS, \"Submit Button\", \"Submit Button is displaying and Enabled\");\n\n\t\t// Verify and Validate Submit Button Text\n\t\tString submitText = driver.findElement(By.id(idSubmitBtn)).getText();\n\t\tAssert.assertEquals(submitText, \"Submit\", \"Submit Text is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Submit Button Text\", \"Submit Text is Displaying\");\n\n\t\t// Verify and Validate Cancel Button\n\t\tWebElement cancelButton = driver.findElement(By.xpath(xpathCancelButton));\n\t\tAssert.assertTrue(cancelButton.isEnabled());\n\t\ttest.log(LogStatus.PASS, \"cancel Button\", \"cancel Button is displaying and Enabled\");\n\n\t\t// Verify and Validate Cancel Button Text\n\t\tString cancelButtonText = driver.findElement(By.xpath(xpathCancelButton)).getText();\n\t\tAssert.assertEquals(cancelButtonText, \"Cancel\", \"Cancel Text is not Displaying \");\n\t\ttest.log(LogStatus.PASS, \"Cancel Button Text\", \"Cancel Text is Displaying\");\n\n\t\t// Verify and Validate Grid or contents Container\n\t\tWebElement gridOfSubscription = driver.findElement(By.xpath(xpathOfGridOfSubscription));\n\t\tAssert.assertTrue(gridOfSubscription.isDisplayed());\n\t\ttest.log(LogStatus.PASS, \"Grid Of Subscription\", \"Grid Of Subscription is displaying\");\n\n\t}", "public void v_Verify_Guest9_Displayed(){\n\t}", "@Given(\"^I'm on \\\"([^\\\"]*)\\\" page of GetGo pay with valid \\\"([^\\\"]*)\\\" and \\\"([^\\\"]*)\\\"$\")\n public void i_m_on_page_of_GetGo_pay_with_valid_and(String arg1, String arg2, String arg3) throws Throwable {\n passworddetails=arg3;\n email=PropertyReader.testDataOf(arg2);\n if(Device.isAndroid()) {\n welcome.clickLogin();\n login.enterEmail(PropertyReader.testDataOf(arg2));\n login.clickNext();\n login.enterPassword(PropertyReader.testDataOf(arg3));\n //login.enterPassword(PropertyReader.dynamicReadTestDataOf(arg3));\n\n login.clickLogin();\n //dashboard.\n }\n else\n {\n login.iOSLoginFlow(PropertyReader.testDataOf(arg2),PropertyReader.testDataOf(arg3));\n }\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMeterReadingElectricityOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"verify the Electricity reading meter Overlay in Reading Page\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t.verifyElectricitysitenoWhereCanIfindthisLink(smrProfile);\t\t\n\t\t\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMeterByMeterpointreference()\n{\t\t\n\t Report.createTestLogHeader(\"Submit Meter Read\", \"Verify whether Single Search result is getting displayed while giving valid MPRN in search field\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GlobalSMRUserMultiMeters\");\n\tnew SubmitMeterReadAction()\n\t\n\t.BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .BgbverifyAfterLogin()\n .clickSubmitMeterReadLink()\n .searchByMeterpointreference(smrProfile)\n \t.enterGlobalMeterDials(smrProfile)\n\t.verifyMeterReadConfirmationTitle()\n\t.verifyAuditLeadTable(smrProfile);\n}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserspecificaccountsConfirmationPageNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Superuser Specific accounts Navigationlinks for the confirmation Page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile)\t \t \t\t \t \n\t\t.AddNewUserNavigationVerification() \n\t\t.UserConfirmationPageNavigations();\t \t \t\t\n\t}", "public static void main(String[] args) throws InterruptedException {\n\t\tWebDriver driver = new FirefoxDriver();\r\n\r\n\t\tdriver.get(\"http://alchemy.hguy.co/crm\");\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"user_name\")).sendKeys(\"admin\");\r\n\t\tdriver.findElement(By.id(\"username_password\")).sendKeys(\"pa$$w0rd\");\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\'bigbutton\\']\")).click();\r\n\t driver.findElement(By.id(\"grouptab_0\")).click();\r\n\t driver.findElement(By.id(\"moduleTab_9_Leads\")).click();\r\n\t driver.manage().window().maximize();\r\n\t \r\n\t \r\n\t WebDriverWait wait = new WebDriverWait(driver,50);\r\n\t wait.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//span[@id='adspan_1e367a61-8a0f-33f3-4e6f-5db0c113de32']/child::*\")));\r\n WebElement AdditionalInfo=driver.findElement(By.xpath(\"//span[@id='adspan_1e367a61-8a0f-33f3-4e6f-5db0c113de32']/child::*\"));\r\n AdditionalInfo.click();\r\n wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(\"span.phone\")));\r\n System.out.println(\"Phone no details: \"+driver.findElement(By.cssSelector(\"span.phone\")).getText());\r\n }", "public static void main(String[] args) throws InterruptedException {\n\r\n\t\tlogin();\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tdriver.findElementByLinkText(\"CRM/SFA\").click();\r\n\t\tdriver.findElementByLinkText(\"Leads\").click();\r\n\t\tdriver.findElementByLinkText(\"Find Leads\").click();\r\n\t\tdriver.findElementByXPath(\"(//input[@name='firstName'])[3]\").sendKeys(\"Vikram\");\r\n\t\tdriver.findElementByXPath(\"//button[text()='Find Leads']\").click();\r\n\t\t//Thread.sleep(8000);\r\n\t\t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"(//table[@class='x-grid3-row-table'])[1]/tbody/tr/td[1]/div/a\")));\r\n\t\tdriver.findElementByXPath(\"(//table[@class='x-grid3-row-table'])[1]/tbody/tr/td[1]/div/a\").click();\r\n\r\n\t\tString actualTitle = driver.getTitle();\r\n\r\n\t\tif (actualTitle.equalsIgnoreCase(expectedTitle)) {\r\n\t\t\tSystem.out.println(\"The Title is matching with the expected\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"The title is not matching with the expected\");\r\n\t\t}\r\n\r\n\t\tdriver.findElementByLinkText(\"Edit\").click();\r\n\t\tdriver.findElementById(\"updateLeadForm_companyName\").clear();\r\n\t\tdriver.findElementById(\"updateLeadForm_companyName\").sendKeys(\"CGI modified\");\r\n\t\tdriver.findElementByXPath(\"//input[@value='Update']\").click();\r\n\t\tThread.sleep(5000);\r\n\r\n\t\tString getCompanyName = driver.findElementById(\"viewLead_companyName_sp\").getText();\r\n\t\tgetCompanyName = getCompanyName.substring(0, getCompanyName.lastIndexOf(\"(\")).trim();\r\n\r\n\t\tif (getCompanyName.equalsIgnoreCase(\"CGI modified\")) {\r\n\t\t\tSystem.out.println(\"The modified company is displayed correctly \" + getCompanyName);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"The modified company name is not displayed \" + getCompanyName);\r\n\t\t}\r\n\r\n\t\t// driver.close();\r\n\r\n\t}", "public void searchCriteria(WebDriver driver) throws InterruptedException\r\n\t {\r\n\t\t try\r\n\t\t {\r\n\t\t\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \r\n\t\t\t driver.findElement(By.id(\"filter_purchaserEmail\")).clear();\r\n\t driver.findElement(By.id(\"filter_purchaserEmail\")).sendKeys(purchaserEmail);\r\n\t \r\n\t driver.findElement(By.id(\"filter_code\")).clear();\r\n\t driver.findElement(By.id(\"filter_code\")).sendKeys(code);\r\n\t \r\n\t driver.findElement(By.id(\"search\")).click();\r\n\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t\t \r\n\t redeemerEmail = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[3]\")).getText();\r\n\t System.out.println(\"redeemerEmail:\"+redeemerEmail);\r\n\t \r\n\t creditsOnGifts = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[6]\")).getText();\r\n\t System.out.println(\"creditsOnGifts:\"+creditsOnGifts);\r\n\t \r\n\t codeActive = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[7]\")).getText();\r\n\t System.out.println(\"codeActive:\"+codeActive);\r\n\t \r\n\t Thread.sleep(10000);\r\n\t //driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t refunded = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[8]/span\")).getText();\r\n\t System.out.println(\"refunded:\"+refunded);\r\n\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \r\n\t //Condition to check view more details\r\n\t if(redeemerEmail.equalsIgnoreCase(TestConstants.NOT_REDEEMED) && codeActive.equalsIgnoreCase(TestConstants.STATUS_YES) && refunded.equalsIgnoreCase(TestConstants.STATUS_NO))\r\n\t {\r\n\t \t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \t System.out.println(\"Before View More Detail\");\r\n\t \t driver.findElement(By.xpath(\"//a[contains(text(),'View More Detail')]\")).click();\r\n\t \t System.out.println(\"After View More Detail\");\r\n\t \t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t }\r\n\t \r\n\t System.out.println(\"Try block\");\r\n\t }catch(NoSuchElementException e)\r\n\t\t {\r\n\t \t e.printStackTrace();\r\n\t \t System.out.println(\"Catch block\");\r\n\t\t }\r\n\t}", "public String _page_signedoffsocialnetwork(String _network,String _extra) throws Exception{\n_page.ws.getSession().SetAttribute(\"authType\",(Object)(\"\"));\r\n //BA.debugLineNum = 265;BA.debugLine=\"page.ws.Session.SetAttribute(\\\"authName\\\", \\\"\\\")\";\r\n_page.ws.getSession().SetAttribute(\"authName\",(Object)(\"\"));\r\n //BA.debugLineNum = 266;BA.debugLine=\"page.ws.Session.SetAttribute(\\\"IsAuthorized\\\", \\\"\\\")\";\r\n_page.ws.getSession().SetAttribute(\"IsAuthorized\",(Object)(\"\"));\r\n //BA.debugLineNum = 267;BA.debugLine=\"ABMShared.NavigateToPage(ws, ABMPageId, \\\"../\\\")\";\r\n_abmshared._navigatetopage(_ws,_abmpageid,\"../\");\r\n //BA.debugLineNum = 268;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySearchByGlobalSmrPage()\n{\t\t\n\t Report.createTestLogHeader(\"Submit Meter Read\", \"Verify whether the Submit meter read landing page is getting displayed with Global search fields\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SmrLoggedInJourneySingleDial\");\n\tnew SubmitMeterReadAction()\t\n\t.BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .BgbverifyAfterLogin()\n .clickSubmitMeterReadLink()\n .SearchByAccoutnNumber(smrProfile)\n .enterGlobalMeterDials(smrProfile)\n .verifyAuditLeadTable(smrProfile);\n\n}", "public void v_Verify_Guest8_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\tpublic void AnonymousElecSmrCR_Multipleregister_newuser_emailurl(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verifies the anonymous SMR page for Gas customer\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"Anonymousnonalertbpcp\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageforemailurl(smrProfile)\n\t\t\t .verifyAnonymousSAPElecCus_CR_Multiplereg_newuser_emailurl(smrProfile);\n\t\t\t // .VerifySAPCRM_SMR_noalret(smrProfile,crmuserProfile,userProfile);\n\t\t\t }", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "public void ClickPartnerInformationPage() {\r\n\t\tpartnerinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Partner Information\\\" button on the Birthdays page\");\r\n\t}", "public static void main(String[] args) throws InterruptedException {\nSystem.setProperty(\"webdriver.chromedriver.driver\",\"C:\\\\Users\\\\mtauseef\\\\Downloads\");\nWebDriver driver = new ChromeDriver();\ndriver.get(\"http://www.jawwy.tv/\");\ndriver.manage().window().maximize();\ndriver.findElement(By.className(\"hide-resp\")).click();\ndriver.findElement(By.className(\"header__subscribe\")).click();\ndriver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\ndriver.findElement(By.id(\"password\")).sendKeys(\"12345678\");\ndriver.findElement(By.id(\"sub_form\")).click();\n//waiting for elements to load\nWebDriverWait wait = new WebDriverWait(driver, 10);\n//Scenario1: validate back button\nWebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"signup-form__back\")));\nif (element !=null)\n{\nSystem.out.println(\"back button is validated\");\n}else {\n\t//not validated\n}\n//Scenario2: validate that one single payment method appears for lebanon\nSelect country = new Select(driver.findElement(By.name(\"country\")));\ncountry.selectByVisibleText(\"Lebanon\");\nWebDriverWait wait1 = new WebDriverWait(driver, 10);\n\nWebElement lebanoncclist = (driver.findElement(By.className(\"selectProviders-list\")));\nList<WebElement> links= lebanoncclist.findElements(By.tagName(\"li\"));\nif(links.size()==1) \n{\nSystem.out.println(\"one mop for lebanon\");\n}\nelse {\n\t//not okay\n}\nThread.sleep(10000);\n//Scenario3: validate that two payment mehtod appears for bahrain\ncountry.selectByVisibleText(\"Bahrain\");\nThread.sleep(10000);\nWebElement bahraincclist = (driver.findElement(By.className(\"selectProviders-list\")));\nList<WebElement> linksBahrain= bahraincclist.findElements(By.tagName(\"li\"));\nif(linksBahrain.size()==2) \n{\nSystem.out.println(\"two mops for bahrain\");\n}else {\n\t//not okay\n}\nThread.sleep(10000);\n//Scenario4: validate that user navigates back to subscriber now page\ndriver.findElement(By.className(\"signup-form__back\")).click();\nThread.sleep(10000);\ndriver.findElement(By.linkText(\"Click here\")).click();\n Thread.sleep(10000);\ndriver.findElement(By.linkText(\"Subscribe\")).click();\nThread.sleep(10000);\n//Scenario5: validate t&c page\ndriver.findElement(By.linkText(\"Terms & Conditions\")).click();\nThread.sleep(10000);\n\n\n\n\n\n\n\t}", "@Test\r\n\tpublic void runACME () throws InterruptedException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./drivers/Chromedriver/chromedriver.exe\");// in order to establish the connection between the browser and the software\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://acme-test.uipath.com/account/login\");// window to be opened\r\n\t\tdriver.manage().window().maximize();//to open window and maximize the screen\r\n\t\tdriver.findElementById(\"email\").sendKeys(\"[email protected]\",Keys.TAB);\r\n\t\tdriver.findElementById(\"password\").sendKeys(\"leaf@12\");\r\n\t\tdriver.findElementByXPath(\"//button[@id='buttonLogin']\").click();\r\n\t\tActions builder=new Actions(driver);\r\n\t\tThread.sleep(3000);\r\n\t\tWebElement Invoices = driver.findElementByXPath(\"//button[text()[normalize-space()='Invoices']]\");\r\n\t\tbuilder.moveToElement(Invoices).perform();\r\n\t\tdriver.findElementByXPath(\"//a[@href='/invoices/search']\").click();\r\n\t\tdriver.findElementById(\"vendorTaxID\").sendKeys(\"DE763212\");\r\n\t\tdriver.findElementByXPath(\"//button[@class='btn btn-primary']\").click();\r\n\t\tWebElement table = driver.findElementByClassName(\"table\");\r\n\t\tList<WebElement> rows = table.findElements(By.tagName(\"tr\"));\r\n\t\tint InvoiceSize = rows.size();\r\n\t\t//System.out.println(InvoiceSize);\r\n\t\t//Map<String, Integer> InvoiceDetails = new HashMap<String,Integer>();\r\n\t\tfor(int i=2;i<InvoiceSize;i++) {\r\n\t\t//String InvoiceItem = driver.findElementByXPath(\"(//td[text()='IT Support'])[\"+i+\"]\").getText();\r\n\t\tString InvoiceItem = driver.findElementByXPath(\"//table[@class='table']//tr[\"+i+\"]/td[3]\").getText();\r\n\t\tif(InvoiceItem.equals(\"IT Support\")) {\r\n\t\t\tString invoiceNumber = driver.findElementByXPath(\"//table[@class='table']/tbody[1]/tr[\"+i+\"]/td[1]\").getText();\r\n\t\t\tSystem.out.println(invoiceNumber);\r\n\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t}\r\n\t/*\tif((Country.equals(\"France\"))&&(VendorName.equals(\"Blue Lagoon\"))) {\r\n\t\t\tSystem.out.println(\"Text match\");\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"Text Not match\");\r\n\t\t}*/\r\n\t\t\r\n\t\tdriver.findElementByXPath(\"//a[@href='/account/logout/']\").click();\r\n\t\tdriver.close();\r\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}", "@Test\n\n public void verifyRegistrationPageSLT() throws InterruptedException {\n ReadFromPropFile readFromPropFileObj = new ReadFromPropFile(\"RegiProfile.properties\");\n RegisterHealthcareProfPO registerHealthcareProfPOObj = new RegisterHealthcareProfPO(driver);\n\n //**********************Registration Screen************************************//\n\n //1. Click \"Sign in\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.SignIN_xpath),\"Unable to click on SignIn link \");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on SignIn link \", \"User should able to click on sign in link\");\n\n //3. Click on \"Click Here\" button for healthcare office.\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.HireReg_xpath),\"Unable to 'Click Here' button\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Click Here' button \", \"User should able to Click on 'Click Here' button \");\n\n //4.Enter \"Facility\" name\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FacilityName_xpath,readFromPropFileObj.getFacilityName()),\"Unable to enter facilityName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter facility name \", \"User should able to enter on facility name \");\n\n //5.Enter \"First name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FName_xpath, readFromPropFileObj.getFirstName()),\"Unable to enter First Name\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter first name \", \"User should able to enter first name \");\n\n //5A.Enter \"last name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.LName_xpath, readFromPropFileObj.getLastName()),\"Unable to get LastName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter last name \", \"User should able to enter on last name \");\n\n //6.Enter EmailID\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Email_xpath, readFromPropFileObj.getEmail1()),\"Unable to enter emailID\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter EmailID \", \"User should able to enter EmailID\");\n\n //7.Enter phone number\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Phone_xpath, readFromPropFileObj.getphone()),\"Unable to enter ph\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter phone number \", \"User should able to enter phone number\");\n\n //8.Enter department\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Dept_xath, readFromPropFileObj.getDept()),\"Unable to enter Dept\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n //9.Enter address\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Address_xpath, readFromPropFileObj.getAddress()),\"Unable to enter addrees\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter address \", \"User should able to enter address\");\n\n //10.Enter city\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.City_xpath, readFromPropFileObj.getCity()),\"Unable to enter city\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n ((JavascriptExecutor) driver).executeScript(\"window.scrollBy(0,3000)\");\n\n //11.Select State\n Assert.assertTrue(registerHealthcareProfPOObj.selectFromDropDownBtn(registerHealthcareProfPOObj.State_xpath, registerHealthcareProfPOObj.State1_xpath),\"Unable to select state\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Select state \", \"User should able to select state\");\n\n //12.Enter zip code\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Zip_xpath, readFromPropFileObj.getZip()),\"Unable to enter zip\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter zip code \", \"User should able to enter zip code\");\n\n //13.Click \"Registor Now\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.RegisterNow_xpath),\"Unable to click on register now\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Register Now'\", \"User should able to Click on 'Register Now' \");\n\n //14.User registered successfully and message should display - \"check inbox to verify your account\".\n String expectedMessage = \"Check inbox to verify your account.\";\n Assert.assertEquals(registerHealthcareProfPOObj.findText(registerHealthcareProfPOObj.VerifyAcct_xpath),expectedMessage);\n ExtentTestManager.getTest().log(LogStatus.PASS, \"User should see toast message 'Check inbox to verify your account'\", \"User able to see the toast message\");\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRGas(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates meter read submission and Email to customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .overlay()\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "public void verifyAddAgentPage() throws Exception {\n\n\t\twdriver.findElement(By.xpath(WebData.verifyAddAgentPage)).isDisplayed();\n\t}", "public void Req_detail()\n {\n\t boolean reqpresent=reqdetails.size()>0;\n\t // boolean reqpresent = driver.findElements(By.linkText(\"Requests details\")).size()>0;\n\t if(reqpresent)\n\t {\n\t\t // System.out.println(\"Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request details report is not present\");\n\t }\n }", "public void testProcessReturnedMail() throws Exception {\n \n logln(\"\\n==== Process Returned Mail ====\\n\");\n \n //login\n loginAFSCME();\n \n //go to the 'Process Returned Mail' page.\n selectLink(\"Process Returned Mail\");\n \n //fill in the parameters\n setParameter(\"addressIds\", \"120\\n221\" );\n \n submit(\"submit\");\n //logout\n selectLink(\"LOGOUT\");\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStdSpecificacctsPrepopulatedUserdetails() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the confirmation page of Add new user is getting displayed with prepopulated user details\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewNames(userProfile);\t \t \t\t \t \t\t \t \t \t \t\t \t \t\t \t \t\t \t \t\t\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRCollective(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates whether Submit meter read is successful for customers submitting within MR window for logged in customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyElectricityYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Navigation Links\");\n\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricNavigationLinks();\n\t\t\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySAPElectricCustomer_old()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the SAP SMR page for Electric customer\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t//.verifyAnonymousSAPElecCustomersRewrite(smrProfile)\n\t\t.verifyAnonymousSAPElectricCustomers(smrProfile)\n\t\t.verifyLeadTable(smrProfile);\n\t\n}", "public void initializeStatusFields(NbaUserVO user, NbaLob lob, NbaTXLife aNbaTXLife, RequirementInfo requirementInfo) throws NbaBaseException {\n NbaVpmsAdaptor vpmsProxy = null;\n try {\n NbaOinkDataAccess data = new NbaOinkDataAccess(lob);\n if (aNbaTXLife != null) {\n data.setContractSource(aNbaTXLife);\n } \n vpmsProxy = new NbaVpmsAdaptor(data, NbaVpmsAdaptor.AUTO_PROCESS_STATUS);\n String busFunc = NbaUtils.getBusinessProcessId(user);\n getDeOinkMap().put(NbaVpmsConstants.A_PROCESS_ID, busFunc);\n String mode = NbaServerUtility.getDataStore(lob, null);\n getDeOinkMap().put(NbaVpmsConstants.A_DATASTORE_MODE, mode);\n if (NbaConstants.PROC_APP_SUBMIT.equals(busFunc) || NbaConstants.PROC_GI_APP_SUBMIT.equals(busFunc) ) {\n Category configCategory = NbaConfiguration.getInstance().getIntegrationCategory(lob.getBackendSystem(),\n NbaConfigurationConstants.UNDERWRITINGRISK);\n if (configCategory != null && configCategory.hasValue()) {\n getDeOinkMap().put(NbaVpmsConstants.A_INTEGRATED_CLIENT, configCategory.getValue());\n } else {\n getDeOinkMap().put(NbaVpmsConstants.A_INTEGRATED_CLIENT, \"\");\n }\n }\n //Begin NBA250\n if (NbaConstants.PROC_PRV_FLWUP.equals(busFunc) && aNbaTXLife != null) {//ALII457\n \tRequirementInfo reqInfo = aNbaTXLife.getRequirementInfo(lob.getReqUniqueID());\n \tRequirementInfoExtension reqInfoExt = NbaUtils.getFirstRequirementInfoExtension(reqInfo);\n TrackingInfo trackingInfo = reqInfoExt.getTrackingInfo();\n \tif (trackingInfo != null && trackingInfo.getFollowUpCompleted()) {\n getDeOinkMap().put(NbaVpmsConstants.A_FLWUP_COMPLETD, String.valueOf(trackingInfo.getFollowUpCompleted()));\n } else {\n getDeOinkMap().put(NbaVpmsConstants.A_FLWUP_COMPLETD, \"false\");\n }\n }//End NBA250\n // begin AXAL3.7.20\n\t\tif (NbaConstants.PROC_NBAFORMAL.equalsIgnoreCase(busFunc) ||\n\t\t\t\t//NbaConstants.PROC_AUTO_UNDERWRITING.equalsIgnoreCase(busFunc) || // code commented by ALS3347\n\t\t\t\tNbaConstants.PROC_NBACREATE.equalsIgnoreCase(busFunc)) {\n\t\t\tAxaUtils.deOinkCWAInd(getWork(), (HashMap) getDeOinkMap());\n\t\t}\n\t\t// end AXAL3.7.20\n\t\t//start NBA300\n\t\tif ((NbaConstants.PROC_AUTO_UNDERWRITING.equals(busFunc) || NbaConstants.PROC_TERMCONV.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_AGGREGATE.equals(busFunc) || NbaConstants.PROC_ELECTRONIC_MONEY.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_AGGR_CONTRACT.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_PRINT_HOLD.equals(busFunc)) \n\t\t\t\t&& (aNbaTXLife != null)) {//ALII457,APSL2735,APSL4765\n\t\t\tNbaVPMSHelper.deOinkTermConvData(getDeOinkMap(), aNbaTXLife, lob);\n\t\t}\n\t\t\n\t\t//end NBA300\n\t\t//start APSL4412\n\t\tif ((NbaConstants.PROC_AGGR_CONTRACT.equals(busFunc)) && (aNbaTXLife != null)) {\n\t\t\tString rcmTeam = NbaUtils.getRCMTeam(NbaUtils.getAsuCodeForRetail(aNbaTXLife), NbaUtils.getEPGInd(aNbaTXLife));\n\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_RCMTEAM, rcmTeam);\n\t\t}\n\t\t//end APSL4412\n\t\t\n\t\t// Begin NBLXA-2035\n\t\tif ((NbaConstants.PROC_AGGREGATE.equals(busFunc))\n\t\t\t\t&& (lob.getReview() == NbaConstants.REVIEW_USER_REQUIRED || lob.getReview() == NbaConstants.REVIEW_SYSTEMATIC)\n\t\t\t\t&& (aNbaTXLife != null)) {\n\t\t\t\t\tMap resultMap = getAppQueueAndStatus(user, aNbaTXLife.getPolicy().getPolNumber());\n\t\t\t\n\t\t\t\tString appQueue = (String)resultMap.get(\"appQueue\");\n\t\t\t\tString appStatus = (String)resultMap.get(\"appStatus\");\n\t\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_APPLICATION_QUEUE_LOB, appQueue);\n\t\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_APPLICATION_STATUS, appStatus);\n\t\t}\n\t\t// End NBLXA-2035\n\t\t// NBLXA-2343,NBLXA-2658 deleted switch over logic\n\t\tvpmsProxy.setSkipAttributesMap(getDeOinkMap());\n vpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_WORKITEM_STATUSES);\n if (requirementInfo != null) {\n NbaOinkRequest oinkRequest = new NbaOinkRequest();\n oinkRequest.setRequirementIdFilter(requirementInfo.getId());\n vpmsProxy.setANbaOinkRequest(oinkRequest);\n }\n VpmsComputeResult result = vpmsProxy.getResults();\n updateProcessStatus(result);\n } catch (java.rmi.RemoteException re) {\n throw new NbaBaseException(NbaBaseException.VPMS_AUTOMATED_PROCESS_STATUS, re);\n } catch (Throwable t) {\n throw new NbaBaseException(NbaBaseException.VPMS_AUTOMATED_PROCESS_STATUS, t);\n } finally {\n //begin SPR3362\n try {\n if (vpmsProxy != null) {\n vpmsProxy.remove();\n }\n } catch (Throwable th) {\n LogHandler.Factory.LogError(this, NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n //end SPR3362\n }\n}", "@Test\n\tpublic void verifyForgetPasswordPageHeadingAndInfoTextAlongWithEmailField() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordPageHeading), \"Recover your password\",\"Recover your password heading is not displaying in forget password page\");\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordInfoText), \"Please enter your email address to reset your password.\",\"Info text is not displaying as expected in forget password page\");\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordEmailInputField), \"Email field is not displaying in forget password page\");\n\t}", "public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}", "public static void main(String[] args) {\n try {\r\n System.out.println(\"We are trying to do something cool\");\r\n System.setProperty(\"webdriver.chrome.driver\", \"C://chromedriver.exe\");\r\n WebDriver driver = new ChromeDriver();\r\n String gmail = \"https://accounts.google.com/signin/v2/identifier?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin\";\r\n\r\n driver.get(gmail);\r\n\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierId\\\"]\")).sendKeys(\"[email protected]\"); //[email protected]\r\n\r\n Thread.sleep(1000);\r\n //This is to click next\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n Thread.sleep(1000);\r\n //This is to put in the password Cairo2000\r\n driver.findElement(By.cssSelector(\".aCsJod.oJeWuf div div input\" )).sendKeys(\"Cairo2000\");\r\n driver.findElement(By.cssSelector(\"#passwordNext\")).click();\r\n //tempGmail.sendKeys(Keys.SHIFT, Keys.TAB);\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"passwordNext\\\"]\")).sendKeys(\"Awad9911677\");\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n\r\n Thread.sleep(1000);\r\n WebElement PageChecker = (new WebDriverWait(driver, 10000)).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\":ha\\\"]/div/div\")));\r\n\r\n System.out.println(\"We should be in the email now to check the stuff\");\r\n\r\n\r\n for(int x = 0; x <= 17; x++){\r\n String ca = \"a\";\r\n\r\n switch (x) {\r\n case 0: ca = \"0\";\r\n break;\r\n case 1: ca = \"1\";\r\n break;\r\n case 2: ca = \"2\";\r\n break;\r\n case 3: ca = \"3\";\r\n break;\r\n case 4: ca = \"4\";\r\n break;\r\n case 5: ca = \"5\";\r\n break;\r\n case 6: ca = \"6\";\r\n break;\r\n case 7: ca = \"7\";\r\n break;\r\n case 8: ca = \"8\";\r\n break;\r\n case 9: ca = \"9\";\r\n break;\r\n case 10: ca = \"a\";\r\n break;\r\n case 11: ca = \"b\";\r\n break;\r\n case 12: ca = \"c\";\r\n break;\r\n case 13: ca = \"d\";\r\n break;\r\n case 14: ca = \"e\";\r\n break;\r\n case 15: ca = \"f\";\r\n break;\r\n case 16: ca = \"g\";\r\n break;\r\n default: ca = \"g\";\r\n break;\r\n }\r\n //This is the innerloop\r\n for(int y = 0; y <= 36; y++){\r\n\r\n String da;\r\n //da = checkYValue(y);\r\n switch (y) {\r\n case 0: da = \"0\";\r\n break;\r\n case 1: da = \"1\";\r\n break;\r\n case 2: da = \"2\";\r\n break;\r\n case 3: da = \"3\";\r\n break;\r\n case 4: da = \"4\";\r\n break;\r\n case 5: da = \"5\";\r\n break;\r\n case 6: da = \"6\";\r\n break;\r\n case 7: da = \"7\";\r\n break;\r\n case 8: da = \"8\";\r\n break;\r\n case 9: da = \"9\";\r\n break;\r\n case 10: da = \"a\";\r\n break;\r\n case 11: da = \"b\";\r\n break;\r\n case 12: da = \"c\";\r\n break;\r\n case 13: da = \"d\";\r\n break;\r\n case 14: da = \"e\";\r\n break;\r\n case 15: da = \"f\";\r\n break;\r\n case 16: da = \"g\";\r\n break;\r\n case 17: da = \"h\";\r\n break;\r\n case 18: da = \"i\";\r\n break;\r\n case 19: da = \"j\";\r\n break;\r\n case 20: da = \"k\";\r\n break;\r\n case 21: da = \"l\";\r\n break;\r\n case 22: da = \"m\";\r\n break;\r\n case 23: da = \"n\";\r\n break;\r\n case 24: da = \"o\";\r\n break;\r\n case 25: da = \"p\";\r\n break;\r\n case 26: da = \"q\";\r\n break;\r\n case 27: da = \"r\";\r\n break;\r\n case 28: da = \"s\";\r\n break;\r\n case 29: da = \"t\";\r\n break;\r\n case 30: da = \"u\";\r\n break;\r\n case 31: da = \"v\";\r\n break;\r\n case 32: da = \"w\";\r\n break;\r\n case 33: da = \"x\";\r\n break;\r\n case 34: da = \"y\";\r\n break;\r\n case 35: da = \"z\";\r\n break;\r\n default: da = \"g\";\r\n break;\r\n }\r\n\r\n // System.out.println(\"Check CA and DA \" + ca + \" X\" );\r\n\r\n if( x >= 3 && y >= 2){ // if ID = 31 skip it duh\r\n\r\n if( driver.findElements(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).size() != 0){\r\n\r\n //System.out.println(\"Check CA and DA\" + ca + \" \" + da);\r\n //*[@id=\":6t\"]\r\n //TODO: Search based on sender of email //*[@id=\\\":\" + ca + da + \"\\\"]\" //*[@id=\":v7\"]/b/text()\r\n\r\n // System.out.println(driver.findElement(By.id(\":\" + ca + da)).getText());\r\n // System.out.println(\"We are here\");\r\n\r\n //if(driver.findElement(By.cssSelector(\".zA.zE\")).getCssValue(gmail)){ //this is to find if it is unread //Old Code .getText().contains(\"Instant payment received from\")\r\n if(driver.findElement(By.id(\":\" + ca + da)).getText().contains(\"Instant payment received from\")) {\r\n WebElement currentEmail = driver.findElement(By.id(\":\" + ca + da));\r\n System.out.println(currentEmail.getCssValue(\"background\"));\r\n if(currentEmail.getCssValue(\"background\").contains(\"rgba(255, 255, 255, 0.9)\")){\r\n //unread click it\r\n System.out.println(\"We are unread now click\");\r\n driver.findElement(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).click();\r\n System.out.println(\"You Luckly basters\");\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n if(x == 16 && y == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n if(x == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n\r\n System.out.println(\"We are in the RIGHT EMAIL ADDRESS\");\r\n Thread.sleep(1000);\r\n WebElement insideEmail = driver.findElement(By.cssSelector(\".acX .aaq, .acX .bsQ\"));\r\n //driver.findElement(By.xpath(\"//*[@id=\\\":k8\\\"]/div[1]/div[2]/div[1]/table/tbody/tr[1]/td[4]/div[1]\")).click();\r\n insideEmail.click();\r\n //insideEmail.sendKeys(\"This is a test\");\r\n driver.findElement(By.cssSelector(\".aO7\")).sendKeys(\"We made it\");\r\n\r\n\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Ebay.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n\r\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMeterReadingGasOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Overlay Links\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\n\t\t.verifyGassitenoWhereCanIfindthisLink(smrProfile);\n\t\t\n}", "@Test\n\tpublic void test04_RefuseARequest(){\n\t\tinfo(\"Test 04: Refuse a request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t//createRequestsConnections();\n\t\t/*Step Number: 1\n\t\t *Step Name: Refuse a request\n\t\t *Step Description: \n\t\t\t- Login as mary\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of Jack(demo)\n\t\t\t- Click on Refuse icon\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- Invitations of root, james are displayed on Invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- The invitation of jack fades out and is permanently removed from the list\n\t\t\t- Requests of James is moved to the top of the gadget*/\n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"Sign in with john account\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tUtils.pause(2000);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_REFUSE_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@Test(enabled = true)\n\tpublic void viewTravelHistoryRegistredCustomerSubAccount() throws Exception {\n\n\t\t// create travel history via soap call\n\t\tSOAPClientSAAJ sClient = new SOAPClientSAAJ();\n\t\tCreditCardNumberGenerator ccGenerator = new CreditCardNumberGenerator();\n\t\tString validCCNumber = ccGenerator.generate(\"4\", 16);\n\t\tString accountID = sClient.travelHistorySOAPCall(validCCNumber);\n\t\tSystem.out.println(\"cc number being used is \" + validCCNumber);\n\t\tSystem.out.println(\"account id being returned is \" + accountID);\n\n\t\t// takes around 6 minutes for travel history to show on cmc\n\t\tUtils.waitTime(360000);\n\n\t\t// create account and link it to cc\n\t\tcoreTest.signIn(driver);\n\t\tcoreTest.createCustomer(driver);\n\t\tBasePage bPage = new BasePage(driver);\n\t\tbPage.clickLinkAccount(driver);\n\t\tLinkAccountPage lPage = new LinkAccountPage(driver);\n\n\t\t// use cc number from soap call to link account\n\t\tlPage.enterBankAccount(driver, validCCNumber);\n\t\tlPage.selectExpMonth(driver);\n\t\tlPage.selectExpYear(driver, 2);\n\t\tlPage.clickSearchToken(driver);\n\t\tlPage.enterNickName(driver, \"adam\");\n\t\tlPage.clickLinkAccount(driver);\n\n\t\t// checking travel history under subaccount page\n\t\tbPage.clickLinkedAccount(driver);\n\t\tTokenSearchSubSystemPage ssPage = new TokenSearchSubSystemPage(driver);\n\t\tssPage.clickTravelHistory(driver);\n\t\n\t\tAssert.assertEquals(ssPage.getLocation(driver), LOCATION);\n\t\tAssert.assertEquals(ssPage.getTravelMode(driver), TRAVEL_MODE);\n\t\tAssert.assertEquals(ssPage.getToken(driver), TOKEN);\n\t\tAssert.assertEquals(ssPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(ssPage.getUnpaidFare(driver), UNPAID_FARE);\n\n\t\tssPage.clickTravelHistoryRow(driver);\n\t\tTravelHistoryDetailPage tdPage = new TravelHistoryDetailPage(driver);\n\n\t\tAssert.assertEquals(tdPage.getLocation(driver), LOCATION);\n\t\tAssert.assertEquals(tdPage.getOperator(driver), OPERATOR);\n\t\tAssert.assertEquals(tdPage.getTransactionStatus(driver), TRANSACTION_STATUS);\n\n\t\tLog.info(\"viewTravelHistoryRegistredCustomerSubAccount Completed\");\n\t\tdriver.close();\n\t}", "@And(\"^Enter user phone and confirmation code$\")\t\t\t\t\t\n public void Enter_user_phone_and_confirmation_code() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.findElement(By.id(\"phoneNumberId\")).sendKeys(\"01116844320\");\n driver.findElement(By.xpath(\"//*[@id='gradsIdvPhoneNext']/content/span\")).click();\n driver.findElement(By.id(\"code\")).sendKeys(\"172978\");\n driver.findElement(By.xpath(\"//*[@id='gradsIdvVerifyNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\t\n }", "public void testMain(Object[] args) \n\t{\n\t\t//----------------------------------------------------------------------\n\t\t// Verify SUCCESS of Journey\n\t\t// Grab Inspection Details and Report\n\t\t//----------------------------------------------------------------------\n\t\ttry {\t\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\thtml_thankYou().waitForExistence(20.0, 0.25);\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\tString sPaymentSuccess_Text = (String)html_thankYou().getProperty(\".text\");\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\tSystem.out.println(\" PAYMENT SUCCESS * * * \"+sPaymentSuccess_Text+\"* * * \");\n\t\t\tlogTestResult(\" PAYMENT SUCCESS * * * \"+sPaymentSuccess_Text+\"* * * \", true);\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t} catch (Exception e) {\t\t\t\n\t\t\tlogTestResult(\" There Is A Problem WIth The CONFIRMATION Page - Quote Text Is NULL, Payment Gateway Issue or The Page Structure Changed?\", false);\t\t\n\t\t}\n\t\t//----------------------------------------------------------------------\t\n\t\tSystem.out.println(\"Test Journey Completed\");\n\t\tSystem.out.println(\"---------------------------------------------------\");\n\t\tiE().close();\n\t\t//stop();\n\t\t//----------------------------------------------------------------------\t\n\t}", "@Test\n\tpublic void verifyAdIdPriceTMVVisitsEmailsAndStatusDetailsAreDisplaying() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\twaitTill(2000);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\t/*switch(i) {\n\t\t\tcase 0: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986865\"),\n\t\t\t\t \"Expected Ad id is not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 0\"),\n\t\t\t\t \"Given currency & price are not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 1st ad in All stock page\");break;\n\t\t\t\t \n\t\t\tcase 1: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986861\"),\n\t\t\t\t \"Expected Ad id is not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 100\"),\n\t\t\t\t \"Given currency & price are not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 2nd ad in All stock page\");\n\t\t\t}*/\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsAdIds.get(i)),\n\t\t\t\t\t \"Expected Ad id is not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsCurrencyAndPrices.get(i)),\n\t\t \t\t\"Given currency & price are not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t \t\t\"Tradus market value is not displaying as no price rating for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsVisits.get(i)),\n\t\t \t\t\"Visits are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t \t\t\"Emails are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsStatus.get(i)),\n\t\t \t\t\"Status is not displaying as active on tradus for \"+i+ \" ad in All stock page\");\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserLinkNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify MumV Navigation Links Manage user page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvAddnewStdUser\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.verifyWhatisthisOverlay()\n\t\t.ManageUserNavigationVerificationLinks(); \t \t \t\n\t}", "public void verifyBillingWithDeliveryAddress(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Both Billing and Delivery address should be same\");\r\n\t\ttry{\r\n\t\t\tString BillingAddress = driver.findElement(locator_split(\"txtBillingAddress\")).getText().toString();\r\n\t\t\tclick(locator_split(\"btnDeliverytab\"));\r\n\t\t\tString DeliveryAddress = driver.findElement(locator_split(\"txtDeliveryAddress\")).getText().toString();\r\n\t\t\tif(BillingAddress.equals(DeliveryAddress)){\r\n\t\t\t\tSystem.out.println(\"Both Billing and Delivery address are same\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Both Billing and Delivery address are same\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- Billing and Delivery address are not same\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element \"+elementProperties.getProperty(\"txtBillingAddress\")+\" \"+elementProperties.getProperty(\"txtDeliveryAddress\")+\" \"+elementProperties.getProperty(\"btnDeliverytab\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtAddtoCartPage\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public InboxPage verifyUiElements(boolean checkChangedDob) {\n\t\tList<WebElement> ele = driver.findElements(By.tagName(\"a\"));\n\t\tfor (WebElement webElement : ele) {\n\t\t\tSystem.out.println(webElement.getText());\n\t\t}\n\n\t\t// Get the xpath of the firstName\n\t\tList<WebElement> ele1 = driver.findElements(By.xpath(\"//section[1]\"));\n\t\tfor (WebElement webElement : ele1) {\n\t\t\tList<WebElement> pTagElements = webElement.findElements(By\n\t\t\t\t\t.tagName(\"p\"));\n\t\t\tfor (int i = 0; i < pTagElements.size(); i++) {\n\t\t\t\tList<WebElement> spanElements = pTagElements.get(i)\n\t\t\t\t\t\t.findElements(By.tagName(\"span\"));\n\t\t\t\tfor (int j = 0; j < spanElements.size(); j++) {\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.ABOUTMEFIRSTNAME)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.ABOUTMENAMEVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.ABOUTMELASTNAME)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.ABOUTMELASTVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText().equals(Constant.LANGUAGE)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.LANGUAGEVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.COUNTRYREGION)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.COUNTRYVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText().equals(Constant.DOB)) {\n\t\t\t\t\t\tif (checkChangedDob) {\n\t\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t\t.equals(Constant.DOBCHANGEDVALUE));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t\t.equals(Constant.DOBVALUE));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}", "public void clickShowReceived() throws UIAutomationException{\t\t\r\n\t\telementController.requireElementSmart(fileName,\"Show Received In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Received In Social Panel\");\r\n\t\tUIActions.click(fileName,\"Show Received In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Received In Social Panel\");\r\n\t\t\t\r\n\t\t/*\t// Check by clicking on 'show sent' it changes to 'show received'\r\n\t\t\telementController.requireElementSmart(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\t\tString linkTextInPage=UIActions.getText(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\t\tString linkTextInXML=dataController.getPageDataElements(fileName,\"Show Received Text\" , \"Name\");\r\n\t\t\tif(!linkTextInPage.contains(linkTextInXML)){\r\n\t\t\t\tthrow new UIAutomationException( \"'\"+linkTextInXML +\"' not found\");\r\n\t\t\t}*/\r\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void VerifyLinkNavigationsOfUploadMeter()\n{\t\t\n\t Report.createTestLogHeader(\"Submit Meter Read\",\"Verify the link navigations of Upload meter reads page\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GlobalSMRMultiDialMetersite\");\n\tnew SubmitMeterReadAction()\n\t.BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .BgbverifyAfterLogin()\n .clickSubmitMeterReadLink()\n .clickUploadMeterReadLinks()\n\t.verifyUploadMeterPageNavigationLinks();\n}", "public void user_details()\n {\n\t boolean userdetpresent =userdetails.size()>0;\n\t if(userdetpresent)\n\t {\n\t\t //System.out.println(\"User details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"User details report is not present\");\n\t }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMultiDialMetersearchBySSupplynumber()\n{\t\t\n\t Report.createTestLogHeader(\"Submit Meter Read\", \"erify Global Meter Read For Gas Account\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GlobalSMRMultiDialMetersite\");\n\tnew SubmitMeterReadAction()\n\t.BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .BgbverifyAfterLogin()\n .clickSubmitMeterReadLink()\n .searchByAccountnumber(smrProfile)\n .enterMeterDialsGlobal(smrProfile)\n //.enterGlobalMeterDials(smrProfile)\n .verifyMeterReadConfirmationTitle()\n\t.verifyAuditLeadTable(smrProfile); \n}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserViewdetails() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Check whether the user can edit details by clicking View details of Active accounts\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.viewDetailsTableViewStduser(userProfile)\n\t\t.ClickEditdetails()\n\t\t.ChangeStandardUserview(userProfile); \t \t \t \t\t\n\t}", "@Test(description = \"Check for KnockPagePage when user enters conflicting Answers in the RTQ\")\n public void VerifyRTQKnockOutPage() throws Exception{\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n DetermineInvestmentStrategyPage displayPage = signupAndOnboard(advisorSplashPage, Constants.LastName.PREMIUM_INDIVIDUAL);\n DetermineInvestmentGoalPage displayGoalPage = displayPage.clickOnStartQuestionnaireBtn();\n //Sign-in and complete RTQ with Conflicting Answer Triggering KnockOut Page\n RTQPage RiskToleranceQuestionPage = displayGoalPage.navigateToRTQ();\n KnockOutTwo knockOutPage = RTQKnockOutSelection(RiskToleranceQuestionPage);\n //Verify that appropriate KnockOut Header and Advisor Info is presented\n softAssert.assertTrue(knockOutPage.isContactAdvisorPageDisplayed());\n softAssert.assertTrue(knockOutPage.verifyBlockedHeaderText());\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySAPElecCustomer()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the SAP SMR page for Electricity customer\");\n//SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\t new SubmitMeterReadAction()\n\t\t .openSMRpage(\"Electricity\")\n\t\t.verifyAnonymousSAPElecCustomersRewrite(smrProfile);\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyYourdetailsElectricityOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Overlay Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricWhyWeNeedThisLink()\n\t\t.verifyElectricAcctnoWhereCanIfindthisLink()\n\t\t.verifyElectricMeterPointWhereCanIfindthisLink()\n\t\t.verifyElectricMeterIDWhereCanIfindthisLink();\n}", "@Test(priority = 2 , retryAnalyzer = Retry.class)\n\tpublic void VPORT_10_VerifyAllTabsPages()\n\t{\n\t\tString districtUser = dependentData.getProperty(\"VPORT_002_DistrictUserName\");\n\t\tvportloginpage.enterLoginCredentials(districtUser, vportData.distUserPassword);\n\t\tdistrictAdminHomepage = (DistrictAdminHomepage) vportloginpage.clickSignInButton(ReturnPage.MYDISTRICPAGE);\n\t\t//\tVerifying all the Pages and links for District user\n\t\tdistrictAdminHomepage.verifyAllTheLinksAndPages(\"DistUser\");\n\t\t//Log out from District user Login\n\t\tvportloginpage=districtAdminHomepage.clickLogoutLink();\n\t\tvportloginpage.verifyLoginPage();\n\n\t\t/*\t ---Verification For Campus User User--- \n\t\tString campusUser = dependentData.getProperty(\"VPORT_002_SchoolUser\");\n\t\tvportloginpage.enterLoginCredentials(campusUser, vportData.schoolUserPassword);\n\t\tdistrictAdminHomepage = (DistrictAdminHomepage) vportloginpage.clickSignInButton(ReturnPage.MYDISTRICPAGE);\n\t\t//\tVerifying all the Pages and links for District user\n\t\tdistrictAdminHomepage.verifyAllTheLinksAndPages(\"CampUser\");\n\t\t//Log out from Campus/School user Login\n\t\tvportloginpage=districtAdminHomepage.clickLogoutLink();\n\t\tvportloginpage.verifyLoginPage();\n\n\t\t ---Verification For Teacher User--- \n\t\tString teacher = dependentData.getProperty(\"VPORT_006_TeacherUserID\");\n\t\tvportloginpage.enterLoginCredentials(teacher, teacher);\n\t\tdistrictAdminHomepage = (DistrictAdminHomepage) vportloginpage.clickSignInButton(ReturnPage.MYDISTRICPAGE);\n\t\t//\tVerifying all the Pages and links for District user\n\t\tdistrictAdminHomepage.verifyAllTheLinksAndPages(\"Teacher\");\n\t\t//Log out from Teacher user Login\n\t\tvportloginpage=districtAdminHomepage.clickLogoutLink();\n\t\tvportloginpage.verifyLoginPage();*/\n\t}", "public static void main(String[] args) {\n\t\tFirefoxDriver driver = new FirefoxDriver();\r\n\t\t\r\n\t\t\r\n\t\t// To load the url\r\n\t\tdriver.get(\"http://demo1.opentaps.org/opentaps/control/main\");\r\n\t\t\r\n\t\t\r\n\t\t//Set implicit wait\r\n\t\t driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\t \r\n\t\t \r\n\t\t //maximize the windos\r\n\t\t driver.manage().window().maximize();\r\n\t\t \r\n\t\t \r\n\t\t //enter user name\r\n\t\t driver.findElementById(\"username\").clear();\r\n\t\t driver.findElementById(\"username\").sendKeys(\"DemoSalesManager\");\r\n\t\t \r\n\t\t //enter user name\r\n\t\t driver.findElementById(\"password\").clear();\r\n\t\t driver.findElementById(\"password\").sendKeys(\"crmsfa\");\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t driver.findElementByXPath(\"//*[@id='login']/p[3]/input\").click();\r\n\t\t \r\n\t\t \t\r\n\t\tdriver.findElementByLinkText(\"CRM/SFA\").click();\r\n\t \r\n\r\n\t}", "@Test(enabled = true)\n\tpublic void viewTravelHistoryUnregistredCustomer() throws Exception {\n\n\t\t// create travel history via soap call\n\t\tSOAPClientSAAJ sClient = new SOAPClientSAAJ();\n\t\tCreditCardNumberGenerator ccGenerator = new CreditCardNumberGenerator();\n\t\tString validCCNumber = ccGenerator.generate(\"4\", 16);\n\t\tString accountID = sClient.travelHistorySOAPCall(validCCNumber);\n\t\tSystem.out.println(\"cc number being used is \" + validCCNumber);\n\t\tSystem.out.println(\"account id being returned is \" + accountID);\n\n\t\t// check cmc for travel history based on cc\n\t\t// takes around 6 minutes for travel history to show on cmc\n\t\tUtils.waitTime(360000);\n\n\t\tcoreTest.signIn(driver);\n\t\tTokenSearchPage tPage = getTokenSearchPage();\n\t\ttPage.selectTokenType(driver, TOKEN_TYPE);\n\t\ttPage.selectSubsystem(driver, SUBSYSTEM);\n\t\ttPage.enterBankNumber(driver, validCCNumber);\n\t\ttPage.selectExpMonth(driver);\n\t\ttPage.selectExpYear(driver);\n\t\ttPage.clickSearchToken(driver);\n\t\ttPage.clickViewDetails(driver);\n\t\ttPage.clickTravelHistory(driver);\n\n\t\tTravelHistoryPage tvPage = new TravelHistoryPage(driver);\n\t\tAssert.assertEquals(tvPage.getLocation(driver), LOCATION_UC);\n\t\tAssert.assertEquals(tvPage.getTravelMode(driver), TRAVEL_MODE);\n\t\tAssert.assertEquals(tvPage.getToken(driver), TOKEN);\n\t\tAssert.assertEquals(tvPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(tvPage.getUnpaidFare(driver), UNPAID_FARE);\n\n\t\t// check travel history details\n\t\ttvPage.clickTiming(driver);\n\t\tTravelHistoryDetailPage tvdPage = new TravelHistoryDetailPage(driver);\n\t\tAssert.assertEquals(tvdPage.getLocation(driver), LOCATION_UC);\n\t\tAssert.assertEquals(tvdPage.getDevice(driver), DEVICE);\n\t\tAssert.assertEquals(tvdPage.getOperator(driver), OPERATOR);\n\t\tAssert.assertEquals(tvdPage.getTransactionStatus(driver), TRANSACTION_STATUS);\n\t\tAssert.assertEquals(tvdPage.getFare(driver), FARE);\n\t\tAssert.assertEquals(tvdPage.getSource(driver), SOURCE_UC);\n\t\ttvdPage.clickClose(driver);\n\n\t\tLog.info(\"viewTravelHistoryUnregistredCustomer\");\n\t\tdriver.close();\n\n\t}", "public static void main(String[] args) throws Exception {\n\t\tWebDriver driver=new FirefoxDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t// open website\r\n\t\tdriver.get(\"https://adminfrontend.b2b-staging.thebestagent.pro/\");\r\n\t\tThread.sleep(2500);\r\n\r\n\t\t// log in\r\n\t driver.findElement(By.id(\"login-email\")).sendKeys(\"[email protected]\");\r\n\t driver.findElement(By.id(\"login-password\")).sendKeys(\"cba321\");\r\n\t\tdriver.findElement(By.cssSelector(\".auth__login .button\")).click();\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\t// open Agencies page\r\n\t\tdriver.findElement(By.linkText(\"Agencies\")).click();\r\n\t\tThread.sleep(1500);\r\n\t\t\r\n\t\t// looking for the ticketing fee preset link and clicking it\r\n\t driver.findElement(By.xpath(\"/html/body/div[2]/section[2]/div/div/table/tbody/tr[2]/td[2]/span/a\")).click();\r\n\t Thread.sleep(2500);\r\n\t \r\n\t\t// Looking for H1 \"Rules\" when clicked link page is opened\r\n\t\ttry {\r\n\t\t\tWebDriverWait h1title = new WebDriverWait(driver,3);\r\n\t\t\th1title.until(ExpectedConditions.textToBePresentInElementLocated(By.className(\"Index__title\"), \"Rules\"));\r\n\t\t\tSystem.out.println(\"H1 title 'Rules' found. As expected. PASS\");\r\n\t\t\t}\r\n\t\t \r\n\t\t catch(Exception fieldname) {\r\n\t\t\t System.out.println(\"H1 title not found. FAIL\");\r\n\t\t }\r\n\r\n\t // Following code captures the screenshot and place it in specified location\r\n\t TakesScreenshot ts = (TakesScreenshot)driver;\r\n\t\tFile scrFile = ts.getScreenshotAs(OutputType.FILE);\r\n\t\t\r\n\t\tString desiredName = \"D:/AlexP/Trash/TicketingFeeNameAsLinkOpensFeePage.png\";\r\n\t\tFile dstFile = new File(desiredName);\r\n\t int i = 0;\r\n\t\twhile (dstFile.exists ()) {\r\n\t\t i += 1;\r\n\t\t desiredName = \"D:/AlexP/Trash/TicketingFeeNameAsLinkOpensFeePage(\" + i + \").png\";\r\n\t\t dstFile = new File(desiredName);\r\n\t\t \r\n\t\t \t}\r\n\t\tSystem.out.println(\"Screenshot is taken, please check the folder D:/AlexP/Trash/\");\r\n\t\tFiles.copy(scrFile, dstFile); \r\n\t \r\n }", "@Test\n public void wrongAddress() {\n LoginUtil.login(ADVERTISER_USERNAME, ADVERTISER_PASSWORD, driver, wait);\n\n final WebElement addAnnouncementLink = driver.findElement(ADD_ANNOUNCEMENT_LINK);\n addAnnouncementLink.click();\n\n // Check if we're on right URL (Adding Announcement Form)\n wait.until(ExpectedConditions.urlToBe(ADDING_ANNOUNCEMENT_URL));\n\n assertThat(driver.getCurrentUrl()).isEqualTo(ADDING_ANNOUNCEMENT_URL);\n\n // Get elements\n final WebElement announcementName = driver.findElement(ANNOUNCEMENT_NAME);\n final WebElement announcementPrice = driver.findElement(ANNOUNCEMENT_PRICE);\n final WebElement announcementPhone = driver.findElement(ANNOUNCEMENT_PHONE);\n final WebElement announcementDateExp = driver.findElement(DATE_PICKER_BUTTON);\n final WebElement announcementTypeSale = driver.findElement(ANNOUNCEMENT_TYPE);\n\n // We need to populate same address for our real estate because our 'algorithm' works on that way.\n final WebElement realEstateArea = driver.findElement(REAL_ESTATE_AREA);\n final WebElement realEstateType = driver.findElement(REAL_ESTATE_TYPE);\n final WebElement realEstateCountry = driver.findElement(REAL_ESTATE_CONUTRY);\n final WebElement realEstateCity = driver.findElement(REAL_ESTATE_CITY);\n final WebElement realEstateRegion = driver.findElement(REAL_ESTATE_REGION);\n final WebElement realEstateStreet = driver.findElement(REAL_ESTATE_STREET);\n final WebElement realEstateStreetNo = driver.findElement(REAL_ESTATE_STREET_NO);\n final Select realEstateHeatingType = new Select(driver.findElement(REAL_ESTATE_HEATING));\n\n // Assert that elements are presented\n assertThat(announcementName).isNotNull();\n assertThat(announcementPrice).isNotNull();\n assertThat(announcementPhone).isNotNull();\n assertThat(announcementDateExp).isNotNull();\n assertThat(announcementTypeSale).isNotNull();\n\n assertThat(realEstateArea).isNotNull();\n assertThat(realEstateCountry).isNotNull();\n assertThat(realEstateCity).isNotNull();\n assertThat(realEstateRegion).isNotNull();\n assertThat(realEstateStreet).isNotNull();\n assertThat(realEstateStreetNo).isNotNull();\n\n // Populate data\n announcementName.sendKeys(ANN_NAME_VALUE);\n // Set Announcement Type to 'SALE'\n announcementTypeSale.click();\n announcementPrice.sendKeys(ANN_PRICE_VALUE);\n announcementPhone.sendKeys(ANN_PHONE_VALUE);\n announcementDateExp.click();\n\n // Mix Inputs because we don't want similar real estates\n realEstateArea.sendKeys(EXISTING_RE_AREA_VALUE);\n realEstateHeatingType.selectByValue(RE_HEATING_TYPE);\n // Set Real Estate type to 'HOUSE'\n realEstateType.click();\n realEstateCountry.sendKeys(WRONG_COUNTRY_VALUE);\n realEstateCity.sendKeys(WRONG_CITY_VALUE);\n realEstateRegion.sendKeys(EXISTING_RE_REGION_VALUE);\n realEstateStreet.sendKeys(WRONG_STREET_VALUE);\n realEstateStreetNo.sendKeys(RE_STREET_NO_VALUE);\n\n final WebElement continueButton = driver.findElement(CONTINUE_BUTTON);\n continueButton.click();\n\n wait.until(ExpectedConditions.visibilityOfElementLocated(ERROR_ADDRESS));\n final WebElement errorToaster = driver.findElement(ERROR_ADDRESS);\n\n assertThat(errorToaster.getText()).isEqualTo(ERROR_ADDRESS_MSG);\n errorToaster.click();\n\n LoginUtil.logout(driver, wait);\n }", "@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "@And(\"^I Launch the Network form with \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void Enter_WirecenterCLLI_and_EngOrdId(String detailsgpon) throws Throwable{\r\n\t\tenduser.fill_fields(detailsgpon);\t\t\r\n\t\tactvtnpage.btn_Netwrkbuildcreate();\r\n\t}", "@Test\n\tpublic void onholdToConfirmSEPA() throws Exception {\n\t\ttry {\n\t\t\t// Launch the browser and load the default URL\n\t\t\tUtility.initConfiguration();\n\t\t\tThread.sleep(3000);\n\t\t\t// Login to back end and check payment method is enabled or disabled\n\t\t\tUtility.wooCommerceBackEndLogin();\n\t\t\tThread.sleep(3000);\n\t\t\tElementLocators element = PageFactory.initElements(driver, ElementLocators.class);\n\t\t\t// Title for HTML report\n\t\t\ttest = extend.createTest(\"Vendor script execution for 'DIRECT_DEBIT_SEPA' onhold to confirm\");\n\t\t\t// Steps\n\t\t\tActions actions = new Actions(driver);\n\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\tThread.sleep(3000);\n\t\t\telement.WooCommerce_Settings.click();\n\t\t\telement.Payment_Tab.click();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Display.click();\n\t\t\tif (!element.Sepa_Enable_Payment_Method_Checkbox.isSelected()) {\n\t\t\t\telement.Sepa_Enable_Payment_Method_Checkbox.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t\t// Read the order completion status\n\t\t\tString OrderCompletionStatus = element.Sepa_Order_Completion_Status_Selectbox.getText();\n\t\t\tThread.sleep(3000);\t\t\t\n\t\t\t// On-hold enabled\n\t\t\tActions action = new Actions(driver);\n\t\t\tThread.sleep(3000);\n\t\t\tWebElement onhold = element.Sepa_Onhold_Payment_Action_Selectbox;\n\t\t\tThread.sleep(5000);\n\t\t\taction.click(onhold).sendKeys(\"Authorize\", Keys.DOWN, Keys.ENTER).build().perform();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Save_Changes.click();\n\t\t\tThread.sleep(3000);\n\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\tThread.sleep(3000);\n\t\t\tUtility.wooCommerceCheckOutProcess();\n\t\t\tThread.sleep(4000);\n\t\t\t// Read the data from excel sheet\n\t\t\tMap<String, String> UserData = new HashMap<String, String>();\n\t\t\tUserData = Data.ExcelReader_PaymentMethods();\n\t\t\t// Check whether payment method is displayed in checkout page\n\t\t\tif (element.Sepa_Label.isDisplayed() == true) {\n\t\t\t\tif (element.Sepa_Radio_button.isDisplayed()) {\n\t\t\t\t\telement.Sepa_Radio_button.click();\n\t\t\t\t}\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\telement.Sepa_Iban_TextBox.sendKeys(UserData.get(\"SEPAIBAN\"));\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);\n\t\t\t\telement.Place_Order.click();\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\t\t\t\t// After order placed successfully verify Thank you message displayed\n\t\t\t\tString thankyoumessage = element.FE_Thank_You_Page_Text.getText();\n\t\t\t\tif (thankyoumessage.equals(\"Thank you. Your order has been received.\")) {\n\t\t\t\t\tSystem.out.println(\"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.INFO, \"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t// Get the amount from order success page front end\n\t\t\t\t\tString totalOrderAmount = element.OrderDetails_TotalAmount.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\t// Get the TID from order success page front end\n\t\t\t\t\tString TID = element.OrderDetails_Note_TID.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\t\t// Go to card portal and check the tid_status\n\t\t\t\t\tdriver.navigate().to(Constant.novalnetcardportalurl);\n\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\telement.Cardportal_TID_Textbox.sendKeys(TID);\n\t\t\t\t\telement.Cardportal_Submit.click();\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\tString tid_status_value = element.Status_Code.getText();\n\t\t\t\t\tint tid_status = Integer.parseInt(tid_status_value);\n\t\t\t\t\t// Check whether the Tid is 99\n\t\t\t\t\tif (tid_status == 99) {\n\t\t\t\t\t\t// Go to callback execution site and enter vendor script URL\n\t\t\t\t\t\tdriver.navigate().to(Constant.vendorscripturl);\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t\telement.Vendor_Script_Url.sendKeys((Constant.shopfrontendurl) + \"?wc-api=novalnet_callback\");\n\t\t\t\t\t\t// Enter required parameter\n\t\t\t\t\t\telement.Vendor_Id.clear();\n\t\t\t\t\t\telement.Vendor_Id.sendKeys(\"4\");\n\t\t\t\t\t\telement.Vendor_Auth_Code.clear();\n\t\t\t\t\t\telement.Vendor_Auth_Code.sendKeys(\"JyEtHUjjbHNJwVztW6JrafIMHQvici\");\n\t\t\t\t\t\telement.Product_Id.clear();\n\t\t\t\t\t\telement.Product_Id.sendKeys(\"14\");\n\t\t\t\t\t\telement.Tariff_Id.clear();\n\t\t\t\t\t\telement.Tariff_Id.sendKeys(\"30\");\n\t\t\t\t\t\telement.Payment_Type_Edit_Button.click();\n\t\t\t\t\t\tSelect selectpaymenttype = new Select(element.Payment_Type_Selectbox);\n\t\t\t\t\t\tselectpaymenttype.selectByVisibleText(\"DIRECT_DEBIT_SEPA\");\n\t\t\t\t\t\telement.Test_Mode.clear();\n\t\t\t\t\t\telement.Test_Mode.sendKeys(\"1\");\n\t\t\t\t\t\telement.Tid_Payment.clear();\n\t\t\t\t\t\telement.Amount.clear();\n\t\t\t\t\t\telement.Amount.sendKeys(totalOrderAmount);\n\t\t\t\t\t\telement.Currency.clear();\n\t\t\t\t\t\telement.Currency.sendKeys(\"EUR\");\n\t\t\t\t\t\telement.Status.clear();\n\t\t\t\t\t\telement.Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid_Status.clear();\n\t\t\t\t\t\telement.Tid_Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid.clear();\n\t\t\t\t\t\telement.Tid.sendKeys(TID);\n\t\t\t\t\t\telement.Execute_Button.click();\n\t\t\t\t\t\tString callback_message = element.callback_message.getText();\n\t\t\t\t\t\tString callback_message_updated = callback_message.substring(9, callback_message.length());\t\t\t\t\t\t\n\t\t\t\t\t\tif (callback_message\n\t\t\t\t\t\t\t\t.contains(\"Novalnet callback received. The transaction has been confirmed\")) {\n\t\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\t\tdriver.navigate().to(Constant.shopbackendurl);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\t\t\telement.WooCommerce_Orders.click();\n\t\t\t\t\t\t\tString BEOrderStatus = element.Backend_Order_Status.getText();\n\t\t\t\t\t\t\telement.Backend_Order_Number.click();\n\t\t\t\t\t\t\tString BEOrderNotesMessage = element.BE_OrderNotes_Message.getText();\n\t\t\t\t\t\t\t// Verify order completion status is updated in shop back end after the execution\n\t\t\t\t\t\t\tSystem.out.println(\"Order completion status: \" + OrderCompletionStatus);\n\t\t\t\t\t\t\tSystem.out.println(\"Back end order status: \" + BEOrderStatus);\n\t\t\t\t\t\t\tif (OrderCompletionStatus.equals(BEOrderStatus)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop back end\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop back end\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated successfully in shop back end\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated successfully in shop back end\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Verify order completion status is updated in front after the execution\n\t\t\t\t\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\telement.MyAccount_Menu.click();\n\t\t\t\t\t\t\telement.MyAccount_Orders.click();\n\t\t\t\t\t\t\tString FEOrderStatus = element.Frontend_Order_Status.getText();\n\t\t\t\t\t\t\tSystem.out.println(\"Front end order status: \" + FEOrderStatus);\n\t\t\t\t\t\t\tif (OrderCompletionStatus.equals(FEOrderStatus)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop front end\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop front end\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated in shop front end\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated in shop front end\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(\"callback execution message: \" + callback_message_updated);\n\t\t\t\t\t\t\tSystem.out.println(\"Back end order note: \" + BEOrderNotesMessage);\n\t\t\t\t\t\t\tif (callback_message_updated.equals(BEOrderNotesMessage)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DIRECT_DEBIT_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DIRECT_DEBIT_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DIRECT_DEBIT_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DIRECT_DEBIT_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t\ttest.log(Status.ERROR, \"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"TC FAILED: Transaction is already confirmed or not in pending status\");\n\t\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Transaction is already confirmed or not in pending status\");\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close browser\n\t\t\tUtility.closeBrowser();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR: Unexpected error from 'onholdToConfirmSEPA' method\");\n\t\t\ttest.log(Status.ERROR, \"ERROR: Unexpected error from 'onholdToConfirmSEPA' method\");\n\t\t}\n\t}", "public void LocationAssesment_Location(){\r\n\t\t//String RFSID = getValue(\"RFSName\");\r\n\t//\tString password = getValue(Password);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tdriver.switchTo().defaultContent();\r\n\t\t\t\t\tsleep(3000);\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget2Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocationAssesment\"));\r\n\t\t\t click(locator_split(\"linkclickLocation\"));\r\n\t\t\t // driver.findElement(By.xpath(\"//*[@tabindex='4']/a/span\")).click();\r\n\t\t\t // driver.findElement(By.xpath(\"//a[@title='Click here to open Location Assessment']\")).click();\r\n\t\t\t driver.switchTo().defaultContent();\r\n\t\t\t System.out.println(\"switched frame\"+ switchframe(\"PegaGadget3Ifr\"));\r\n\t\t\t click(locator_split(\"tabLocation\"));\r\n\t\t\t //driver.findElement(By.xpath(\"//li[@tabindex='0']/a/span\")).click();\r\n\t\t\t System.out.println(\"verification\");\r\n\t\t\t sleep(1000);\r\n\t\t\t\t System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getAttribute(\"value\"));\r\nsleep(2000);\r\n\t\t\t \r\n\t\t\t // verifyTextPresent(locator_split(\"txtLocation\"), getValue(\"Locationname\"),\"Location Name\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtLocation\"), getValue(\"Locationname\")) == false){\r\n\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtLocation\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtLocation\")), getValue(\"Locationname\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t // getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"),\"city\");\r\n\t\t\t // System.out.println(driver.findElement(By.id(\"GRASP_LOCATION_NM\")).getText());\r\n\t\t\t \r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtCity\"), getValue(\"CityName\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtCity\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtCity\")), getValue(\"CityName\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"ListCountry\"), getValue(\"Country\"),\"Country\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"ListCountry\"), getValue(\"Country\"))==false){\r\n\t\t\t\t \r\n\t\t\t \t//clearWebEdit(locator_split(\"ListCountry\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tselectListValue((locator_split(\"ListCountry\")), getValue(\"Country\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIvalue\"),getValue(\"BIValue\"),\"BI Value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIvalue\"), getValue(\"BIValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIvalue\")), getValue(\"BIValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"),\"BI Indemnity period\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBIindemnityperiod\"), getValue(\"BIIndemnityperiod\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBIindemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBIindemnityperiod\")), getValue(\"BIIndemnityperiod\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"),\"Building\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtBuildingValue\"), getValue(\"BuildingValue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtBuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtBuildingValue\")), getValue(\"BuildingValue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"),\"M+EValue\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtMEvalue\"), getValue(\"MandEvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtMEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtMEvalue\")), getValue(\"MandEvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"),\"Content value\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtcontentvalue\"), getValue(\"Contentvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtcontentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtcontentvalue\")), getValue(\"Contentvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //verifyTextPresent(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"),\"Stock inventory\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtstockinventory\"), getValue(\"Stockvalue\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtstockinventory\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtstockinventory\")), getValue(\"Stockvalue\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t // verifyTextPresent(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"),\"Other PD\");\r\n\t\t\t if(getAndVerifyTextvalue(locator_split(\"txtotherPD\"), getValue(\"OtherPD\"))==false){\r\n\t\t\t\t \r\n\t\t\t \tclearWebEdit(locator_split(\"txtotherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t \tsendKeys((locator_split(\"txtotherPD\")), getValue(\"OtherPD\"));\r\n\t\t\t \tsleep(1000);\r\n\t\t\t }\r\n\t\t\t //click(locator_split(\"txtLocationnext\"));\r\n\t\t\t\t//clickbylinktext(\"No\");\r\n\t\t\t\r\n\t\t//switchframe(\"PegaGadget2Ifr\");\r\n\t\tsleep(3000);\r\n\t\t//clickbylinktext(\"No\");*/\r\n\t\t\tif(driver.findElement(By.id(\"SectionCompleted\")).isSelected()==true)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check Box alresy selected\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Check box is not selected\");\r\n\t\t\t\tdriver.findElement(By.id(\"SectionCompleted\")).click();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Report tab is clicked and user is logged in\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Report tab is not clicked in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyNewUserDetailsactivation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Super User Overlay Yes Button Selection\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes(); \t \t \t \t \n\t}", "@Test\n\tpublic void loginToOpentaps() {\n\t\tinvokeApp(\"chrome\", \"http://demo1.opentaps.org\");\n\n\t\t// Step 2: Enter user name\n\t\tenterById(\"username\", \"DemoSalesManager\");\n\n\t\t// Step 3: Enter Password\n\t\tenterById(\"password\", \"crmsfa\");\n\n\t\t// Step 4: Click Login\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\t\t// Step 5: Verify Username\n\t\tverifyTextContainsByXpath(\"//div[@id='form']/h2\", \"Welcome\");\n\t\t\n\t\t// Step 6: Click Logout\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\n\n\n\t}" ]
[ "0.7038108", "0.6343227", "0.6122437", "0.6079466", "0.6078015", "0.5841151", "0.58253187", "0.57718855", "0.57230633", "0.5710952", "0.56770116", "0.56184804", "0.5611596", "0.559899", "0.5576618", "0.5576501", "0.55747813", "0.55651116", "0.55413455", "0.5539279", "0.55265135", "0.5524295", "0.5501446", "0.548137", "0.5477655", "0.54746675", "0.5462354", "0.54517525", "0.54481024", "0.544713", "0.54229605", "0.54222476", "0.5407747", "0.5403773", "0.54034185", "0.540066", "0.54006386", "0.53984344", "0.5394177", "0.53851974", "0.5384955", "0.5378629", "0.53729445", "0.5360307", "0.5358864", "0.53580177", "0.5356087", "0.53351", "0.5322987", "0.5306749", "0.53060836", "0.5298168", "0.5292951", "0.5291146", "0.52886957", "0.52878946", "0.5275507", "0.52728784", "0.5269878", "0.52659523", "0.5265906", "0.5263696", "0.52633536", "0.5256331", "0.5254191", "0.5252503", "0.5245304", "0.52443343", "0.5242525", "0.52411616", "0.5239456", "0.5227687", "0.52206534", "0.5218029", "0.5205047", "0.5204703", "0.520306", "0.520109", "0.51997364", "0.5185692", "0.51835966", "0.5179468", "0.5176241", "0.5175599", "0.51739293", "0.5166606", "0.51654077", "0.5164221", "0.51550037", "0.51513624", "0.51503485", "0.51494", "0.5148975", "0.5147261", "0.5145463", "0.5139332", "0.51365834", "0.513569", "0.5131224", "0.5127387" ]
0.7163331
0
TS_Agent_10_E2E To verify whether the account status of broker is successfully changed by agent
@Test(groups ={Slingshot,Regression,CsaAgent}) public void verifyPartnerServiceAgentLookUpUserFunctionality() throws Exception { Report.createTestLogHeader("CSA", "To verify whether the account status of broker is successfully changed by agent"); UserProfile userProfile = new TestDataHelper().getUserProfile("PSABroker"); /*deregisterinBgbonline(userProfile); //Register a user new PartnerServiceAgentAction() .navigateToPSARegistration() .clickRegisteraUser(userProfile);*/ //verify Lookup User functionality new PartnerServiceAgentAction() .navigateToPSARegistration() .verifyFindUser(userProfile) .updateAndVerifyStatus(userProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "private void updateAccountStatus() {\n\r\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n String string0 = EWrapperMsgGenerator.managedAccounts(\"autionImbalance\");\n assertEquals(\"Connected : The list of managed accounts are : [autionImbalance]\", string0);\n }", "abstract int checkBalance(String accountno) throws RemoteException;", "public void receiveResultcheckServerStatus(\n loadbalance.LoadBalanceStub.CheckServerStatusResponse result\n ) {\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "boolean hasChangeStatus();", "com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();", "public void verifyActivate() {\n // TODO - How to test the EJB passivate?\n throw new RuntimeException(\"Test not implemented yet.\");\n }", "@Then(\"^Mobile: Verify the balance in card before and after switching the mode of transacations$\")\n\tpublic void mobile_Verify_the_balance_in_card_before_and_after_switching_the_mode_of_transacations() throws Throwable {\n\t\tdriver.findElement(By.id(\"HambergerMenuBtn\")).click();\n\t\tThread.sleep(3000);\n\t\tdriver.findElement(By.linkText(\"Log out\")).click();\n\t\tThread.sleep(6000);\n\t}", "@Test\n public void testGetStatus() throws Exception {\n System.out.println(\"getStatus\");\n \n this.bag_PembayaranServiceServer = new Bag_PembayaranServiceServer(tableModelLog);\n String Id_Pembayaran = \"BYR0002\";\n \n String instance = bag_PembayaranServiceServer.getStatus(Id_Pembayaran);\n System.out.println(instance);\n \n String expResult = \"LUNAS DEBIT\";\n \n assertEquals(expResult, instance);\n }", "@Test\n\tpublic void testRecalculateAccountBalance() {\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"1\");\n\t\tsmsAccount.setSakaiSiteId(\"1\");\n\t\tsmsAccount.setMessageTypeCode(\"1\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(10L);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\t\tinsertTestTransactionsForAccount(smsAccount);\n\n\t\tAssert.assertTrue(smsAccount.exists());\n\n\t\tList<SmsTransaction> transactions = hibernateLogicLocator\n\t\t\t\t.getSmsTransactionLogic().getSmsTransactionsForAccountId(\n\t\t\t\t\t\tsmsAccount.getId());\n\n\t\tAssert.assertNotNull(transactions);\n\t\tAssert.assertTrue(transactions.size() > 0);\n\n\t\tsmsBillingImpl.recalculateAccountBalance(smsAccount.getId());\n\n\t\tSmsAccount recalculatedAccount = hibernateLogicLocator\n\t\t\t\t.getSmsAccountLogic().getSmsAccount(smsAccount.getId());\n\t\tAssert.assertNotNull(recalculatedAccount);\n\t\tAssert.assertTrue(recalculatedAccount.getCredits() == 6660);\n\t}", "private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }", "@Override\n\tpublic void checkWayBillRfcStatus(String originalWaybillNo) {\n\t\t\n\t}", "public static void getStatus() {\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tList<Object[]>serverDetails = ServerStatus.getServerDetails();\n\t\t\tfor (Object[] servers:serverDetails){\n\t\t\t\tServerStatus.verifyServerStatus(i,(String)servers[0], (String)servers[1], (String)servers[2]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void verifyPassivate() {\n // TODO - How to test the EJB passivate?\n throw new RuntimeException(\"Test not implemented yet.\");\n }", "@Override\r\n\tpublic void onHeartbeat(int result)\r\n\t{\n\t\tif (result == AirtalkeeAccount.ACCOUNT_RESULT_ERR_SINGLE)\r\n\t\t{\r\n\t\t\tAirServices.iOperator.putString(KEY_PWD, \"\");\r\n\t\t}\r\n\t\tif (accountListener != null)\r\n\t\t{\r\n\t\t\taccountListener.onMmiHeartbeatException(result);\r\n\t\t}\r\n\t}", "@Test(groups = \"slow\", description = \"Can retrieve the account overdue status\")\n public void testOverdueStatus() throws Exception {\n final Account accountJson = createAccountNoPMBundleAndSubscriptionAndWaitForFirstInvoice();\n\n // Get the invoices\n final List<Invoice> invoices = accountApi.getInvoicesForAccount(accountJson.getAccountId(), null, null, null, requestOptions);\n // 2 invoices but look for the non zero dollar one\n assertEquals(invoices.size(), 2);\n\n // We're still clear - see the configuration\n Assert.assertTrue(accountApi.getOverdueAccount(accountJson.getAccountId(), requestOptions).isClearState());\n\n callbackServlet.pushExpectedEvents(ExtBusEventType.INVOICE_CREATION, ExtBusEventType.INVOICE_PAYMENT_FAILED, ExtBusEventType.BLOCKING_STATE, ExtBusEventType.OVERDUE_CHANGE);\n clock.addDays(30);\n callbackServlet.assertListenerStatus();\n Assert.assertEquals(accountApi.getOverdueAccount(accountJson.getAccountId(), requestOptions).getName(), \"OD1\");\n\n callbackServlet.pushExpectedEvents(ExtBusEventType.TAG_CREATION, ExtBusEventType.BLOCKING_STATE, ExtBusEventType.OVERDUE_CHANGE);\n clock.addDays(10);\n callbackServlet.assertListenerStatus();\n Assert.assertEquals(accountApi.getOverdueAccount(accountJson.getAccountId(), requestOptions).getName(), \"OD2\");\n\n callbackServlet.pushExpectedEvents(ExtBusEventType.BLOCKING_STATE, ExtBusEventType.OVERDUE_CHANGE);\n clock.addDays(10);\n callbackServlet.assertListenerStatus();\n Assert.assertEquals(accountApi.getOverdueAccount(accountJson.getAccountId(), requestOptions).getName(), \"OD3\");\n\n // Post external payments, paying the most recent invoice first: this is to avoid a race condition where\n // a refresh overdue notification kicks in after the first payment, which makes the account goes CLEAR and\n // triggers an AUTO_INVOICE_OFF tag removal (hence adjustment of the other invoices balance).\n final Invoices invoicesForAccount = accountApi.getInvoicesForAccount(accountJson.getAccountId(), null, null, false, false, false, true, null, AuditLevel.NONE, requestOptions);\n final List<Invoice> mostRecentInvoiceFirst = invoicesForAccount.stream()\n .sorted(Comparator.comparing(Invoice::getInvoiceDate).reversed())\n .collect(Collectors.toUnmodifiableList());\n for (final Invoice invoice : mostRecentInvoiceFirst) {\n if (invoice.getBalance().compareTo(BigDecimal.ZERO) > 0) {\n final InvoicePayment invoicePayment = new InvoicePayment();\n invoicePayment.setPurchasedAmount(invoice.getAmount());\n invoicePayment.setAccountId(accountJson.getAccountId());\n invoicePayment.setTargetInvoiceId(invoice.getInvoiceId());\n callbackServlet.pushExpectedEvents(ExtBusEventType.INVOICE_PAYMENT_SUCCESS, ExtBusEventType.PAYMENT_SUCCESS);\n invoiceApi.createInstantPayment(invoice.getInvoiceId(), invoicePayment, true, Collections.emptyList(), NULL_PLUGIN_PROPERTIES, requestOptions);\n callbackServlet.assertListenerStatus();\n }\n }\n\n // Wait a bit for overdue to pick up the payment events...\n callbackServlet.pushExpectedEvents(ExtBusEventType.TAG_DELETION, ExtBusEventType.BLOCKING_STATE, ExtBusEventType.OVERDUE_CHANGE);\n callbackServlet.assertListenerStatus();\n\n // Verify we're in clear state\n Assert.assertTrue(accountApi.getOverdueAccount(accountJson.getAccountId(), requestOptions).isClearState());\n }", "@Test\n public void testSuccess() throws Exception {\n\n client.makeBooking(\"Paul\", new Date(System.currentTimeMillis()), false);\n\n BookingStatus bookingStatus = client.getLastBookingStatus();\n Assert.assertTrue(\"Expected booking to be confirmed, but it wasn't: \" + bookingStatus, bookingStatus.equals(BookingStatus.CONFIRMED));\n }", "@Test\n\tpublic void testUpdatePoStatusErrorListenerSuccesTest() {\n\t\ttry{\n\t\t\t//Is used in soap request preparation because value is used in reply soap header.\n\t\t\t final String callbackRefMockUri = mockOsbBusinessService(\n\t\t\t //\"SalesOrderErrorListener/operations/receiveSalesOrderLineErrorMessage/business-service/SalesOrderServiceCallback\",\n\t\t\t PATH_UPDATE_STATUS_CALLBACK,\n\t\t\t updatePoStatusCallbackPortMock);\t\n\t\t\t \n\t\t\t mockOsbBusinessService(\n\t\t\t PATH_RESPONSE_RETRY_WRAPPER,\n\t\t\t responseRetryWrapperMock);\n\t\n\t\t\tfinal String requestString = new ParameterReplacer(readClasspathFile(\"Request_UpdatePOStatusErrorListener.xml\"))\n\t\t\t\t\t.replace(REPLACE_PARAM_CORRELATION_ID, randomCorrelationId)\n\t\t\t\t\t.replace(REPLACE_PARAM_PURCHASE_ORDER_NUMBER, randomPoNumber)\n\t\t\t\t\t.replace(REPLACE_PARAM_COMBOX_ID, randomCoboxId)\n\t\t\t\t\t.replace(REPLY_TO, callbackRefMockUri)\n\t\t\t\t\t.replace(MESSAGE_ID, randomMessageId).build();\n\t\t\t\t\t\n\t\n\t\t\tLOGGER.info(\"+++ request \" + requestString);\n\t\n\t\t\tinvokeOsbProxyService(PATH_SERVICE, requestString);\n\t\n\t\t\t// P1002-ORDER-SENT-ERR must be written once to BAL\n\t\t\tassertThat(\"BAL not written for P1002-ORDER-SENT-ERR\",\n\t\t\t\t\t\t\tgetOtmDao().query(createBALQuery(\"P1002-ORDER-SENT-ERR\",randomCorrelationId)).size() == 1);\n\t\t\t// P1002-ORDER-SENT-ERR must be written once to OTM PO\n\t\t\tassertThat(\"OTM PO not written for P1002-ORDER-SENT-ERR\",\n\t\t\t\t\tgetOtmDao().query(createOSMPOQuery(\"P1002-ORDER-SENT-ERR\",randomCorrelationId)).size() == 1);\n\t\n\t\n\t\t\t\n\t\t\tassertThat(\"updatePoStatusCallbackPortMock is not invocked!\",updatePoStatusCallbackPortMock.hasBeenInvoked());\n\t\t\t//This should not be invoked\n\t\t\tassertThat(\"responseRetryWrapperMock should not be invocked!\",!responseRetryWrapperMock.hasBeenInvoked());\n\t\n\t\t\t\n\t\t\t//Get message from process as it is\n\t\t\tString updatePoStatusCallbackPortMockMsg = updatePoStatusCallbackPortMock.getLastReceivedRequest();\n\t\t\t\n\t\t\t//Get example message and change dynamic used values.\n\t\t\tString updatePoStatusCallbackPortMockMsgExpected = new ParameterReplacer(readClasspathFile(\"Callback_UpdatePOStatusErrorListener.xml\")).replace(REPLACE_PARAM_CORRELATION_ID, randomCorrelationId)\n\t\t\t\t\t.replace(REPLACE_PARAM_PURCHASE_ORDER_NUMBER, randomPoNumber)\n\t\t\t\t\t.replace(REPLACE_PARAM_COMBOX_ID, randomCoboxId)\n\t\t\t\t\t.replace(REPLY_TO, callbackRefMockUri)\n\t\t\t\t\t.replace(MESSAGE_ID, randomMessageId).build();\n\t\t\t\t\t\n\t\t\t\n\t\t\tassertXmlEquals(updatePoStatusCallbackPortMockMsgExpected,\tupdatePoStatusCallbackPortMockMsg);\n\t\t}catch(ServiceException e) {\n\t\t\tfail();\n\t\t}\n\n\t}", "public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}", "@Test\n public void oldNotUpdateSuccessExchangeWithdraw() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, String.valueOf(1), firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n long id = 1;\n //V1 not update\n ExchangeCapsule exchangeCapsule = dbManager.getExchangeStore().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule.getID());\n Assert.assertEquals(1000000, exchangeCapsule.getCreateTime());\n Assert.assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsule.getSecondTokenId()));\n Assert.assertNotEquals(0L, exchangeCapsule.getFirstTokenBalance());\n Assert.assertNotEquals(0L, exchangeCapsule.getSecondTokenBalance());\n //V2\n ExchangeCapsule exchangeCapsule2 = dbManager.getExchangeV2Store().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule2.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule2.getID());\n Assert.assertEquals(1000000, exchangeCapsule2.getCreateTime());\n Assert.assertEquals(0L, exchangeCapsule2.getFirstTokenBalance());\n Assert.assertEquals(0L, exchangeCapsule2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetMap = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(firstTokenQuant, assetMap.get(String.valueOf(1)).longValue());\n Assert.assertEquals(secondTokenQuant, assetMap.get(String.valueOf(2)).longValue());\n\n Assert.assertEquals(secondTokenQuant, ret.getExchangeWithdrawAnotherAmount());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\npublic void cytc_005() throws InterruptedException {\n\t Thread.sleep(3000);\n\t cyclosPOM.cyclosGenericLogin(\"srivalli2\",\"pass12345\");\n\t screenShot.captureScreenShot(\"CYTC00501\");\n\t Thread.sleep(3000);\n\t cyclosPOM.myProfileOption();\n\t screenShot.captureScreenShot(\"CYTC00502\");\n\t Thread.sleep(2000);\n\t cyclosPOM.changeProfileBtn();\n\t screenShot.captureScreenShot(\"CYTC00503\");\n\t Thread.sleep(1000);\n\t cyclosPOM.changeAddress(\"Raidurgam\");\n\t cyclosPOM.saveButton();\n\t screenShot.captureScreenShot(\"CYTC00504\");\n\t System.out.println(driver.switchTo().alert().getText());\n\t driver.switchTo().alert().accept();\n\t screenShot.captureScreenShot(\"CYTC00505\");\n\t String Actual = cyclosPOM.verifyAddress();\n\t String Expected = \"Raidurgam\";\n\t Assert.assertEquals(Actual, Expected);\n}", "public void UpCheck_status1(MajorChange mc) ;", "@Override\r\n\tpublic boolean updateAccountSw(String accId, String activeSw) {\r\n\t\tlogger.debug(\"*** updateAccountSw() method started\");\r\n\t\tString fileName = null, mailSub = null, mailBody = null, password = null;\r\n\t\ttry {\r\n\t\t\t// load existing record using accId\r\n\t\t\tAppAccountEntity entity = appAccRepository.findById(Integer.parseInt(accId)).get();\r\n\t\t\tif (entity != null) {\r\n\t\t\t\t// Setting Account Active Sw (Y|N)\r\n\t\t\t\tentity.setActiveSw(activeSw);\r\n\t\t\t\t// Updating Account\r\n\t\t\t\tappAccRepository.save(entity);\r\n\t\t\t\tlogger.debug(\"*** updateAccountSw() method ended\");\r\n\r\n\t\t\t\tAppAccount accModel = new AppAccount();\r\n\t\t\t\tBeanUtils.copyProperties(entity, accModel);\r\n\r\n\t\t\t\t// TODO:Need to complete email functionality\r\n\t\t\t\tif (activeSw.equals(\"Y\")) {\r\n\t\t\t\t\t// send Email saying account activated\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t// get file name\r\n\t\t\t\t\t\tfileName = appProperties.getProperties().get(AppConstants.ACTIVATE_EMAIL_FILE);\r\n\t\t\t\t\t\t// get mail subject\r\n\t\t\t\t\t\tmailSub = appProperties.getProperties().get(AppConstants.ACTIVATE_EMAIL_SUB);\r\n\t\t\t\t\t\t// decrypt the password\r\n\t\t\t\t\t\tpassword = PasswordUtils.decrypt(accModel.getPassword());\r\n\t\t\t\t\t\t// set decrypted password to accModel object password field\r\n\t\t\t\t\t\taccModel.setPassword(password);\r\n\t\t\t\t\t\t// get email body\r\n\t\t\t\t\t\tmailBody = getEmailBodyContent(accModel, fileName);\r\n\t\t\t\t\t\t// send email to activate registered cw/admin\r\n\t\t\t\t\t\temailUtils.sendEmail(entity.getEmail(), mailSub, mailBody);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\tlogger.error(\"Email Sending is failed : \" + e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t// send Email saying account de-activated\r\n\t\t\t\t\t\t// send account de-activation mail to registered case worker/admin\r\n\t\t\t\t\t\t// get file name\r\n\t\t\t\t\t\tfileName = appProperties.getProperties().get(AppConstants.DE_ACTIVATE_EMAIL_FILE);\r\n\t\t\t\t\t\t// get email subject\r\n\t\t\t\t\t\tmailSub = appProperties.getProperties().get(AppConstants.DE_ACTIVATE_EMAIL_SUB);\r\n\t\t\t\t\t\t// get email body content\r\n\t\t\t\t\t\tmailBody = getDeActivateAccountEmailBodyContent(fileName, accModel);\r\n\t\t\t\t\t\t// send email to registered cw/admin\r\n\t\t\t\t\t\temailUtils.sendEmail(entity.getEmail(), mailSub, mailBody);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\tlogger.error(\"Email Sending is failed : \" + e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception occured in updateAccountSw() method : \" + e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void msgReadyForCheck(Customer customerAgent, String choice) {\n\t\t\n\t}", "@Test\n\tpublic void testSettleCreditDifference() {\n\t\tint creditEstimate = 50;\n\t\tLong originalAccBalance = 150l;\n\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"3\");\n\t\tsmsAccount.setSakaiSiteId(\"3\");\n\t\tsmsAccount.setMessageTypeCode(\"3\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(originalAccBalance);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSenderUserName(\"sakaiUserId\");\n\t\tsmsTask.setSmsAccountId(smsAccount.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.setCreditEstimate(creditEstimate);\n\t\tsmsTask.setGroupSizeActual(0);\n\t\tsmsTask.setMessageTypeId(SmsConstants.MESSAGE_TYPE_SYSTEM_ORIGINATING);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(smsTask.getDateToSend());\n\t\tcal.add(Calendar.SECOND, smsTask.getMaxTimeToLive());\n\t\tsmsTask.setDateToExpire(cal.getTime());\n\t\thibernateLogicLocator.getSmsTaskLogic().persistSmsTask(smsTask);\n\n\t\tsmsBillingImpl.reserveCredits(smsTask);\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\t\tAssert.assertNotNull(smsAccount);\n\n\t\t// Account was credited\n\t\tAssert.assertTrue(smsAccount.getCredits() < originalAccBalance);\n\n\t\tsmsBillingImpl.settleCreditDifference(smsTask, smsTask.getCreditEstimate(), smsTask.getCreditsActual());\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\n\t\t// Account balance was returnd to origional state since the actual\n\t\t// groups size on the task was zero\n\t\tAssert.assertTrue(smsAccount.getCredits() == originalAccBalance);\n\n\t}", "@Test\n public void transStatusTest() {\n assertEquals(\"P\", authResponse.getTransStatus());\n }", "@Test(description = \"Verify node's update reject request with the same responsible for different matching \"\n + \"node_type+External ID (Negative)\", groups = \"smoke\")\n public void updateRegisteredNodeWithSameResponsibleForDifferentMatchingTest() {\n AccountEntity cameraResponsible = new AccountEntityManager().createAccountEntity();\n Response cameraResponsibleResponse =\n AccountEntityServiceMethods.createAccountEntityRequest(cameraResponsible);\n Integer cameraResponsibleId = getAccountId(cameraResponsibleResponse);\n\n //Create responsible for airsensor\n AccountEntity airsensorResponsible = new AccountEntityManager().createAccountEntity();\n Response airsensorResponsibleResponse =\n AccountEntityServiceMethods.createAccountEntityRequest(airsensorResponsible);\n Integer airsensorResponsibleId = getAccountId(airsensorResponsibleResponse);\n\n //LWA Camera registration\n LightWeightAccount.Node node = createDefaultNode();\n\n LightWeightAccount lwa = createDefaultLightWeightAccount(node)\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getCurrentDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START));\n\n LightWeightAccountServiceMethods.newNodeRegistration(lwa).then().statusCode(200);\n\n //LWA Airsensor registration\n LightWeightAccount.Node node2 = createDefaultNode()\n .setNodeType(\"AIRSENSOR\")\n .setAttributes(new HashMap<String, Object>() {{\n put(\"msisdn\", \"value1\");\n put(\"oem\", \"11\");\n put(\"location\", \"12356\");\n put(\"model\", \"1234\");\n }});\n\n LightWeightAccount lwa2 = createDefaultLightWeightAccount(node2)\n .setResponsibleId(airsensorResponsibleId.toString())\n .setStartDate(DateTimeHelper.getCurrentDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START));\n\n LightWeightAccountServiceMethods.newNodeRegistration(lwa2).then().statusCode(200);\n\n //Update camera with same responsible\n LightWeightAccount lwaCameraUpdated = new LightWeightAccount()\n .setExternalId(lwa.getExternalId())\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getTomorrowDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START))\n .setNode(new LightWeightAccount.Node().setNodeType(node.getNodeType()));\n\n //request rejection check\n LightWeightAccountServiceMethods.updateNodeRegistration(lwaCameraUpdated).then().statusCode(428);\n\n //Update airsensor with new responsible\n LightWeightAccount lwaAirsensorUpdated = new LightWeightAccount()\n .setExternalId(lwa2.getExternalId())\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getTomorrowDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START))\n .setNode(new LightWeightAccount.Node().setNodeType(\"AIRSENSOR\"));\n\n //request rejection check\n LightWeightAccountServiceMethods.updateNodeRegistration(lwaAirsensorUpdated).then().statusCode(200);\n }", "public boolean verifyStatus(boolean heartbeat);", "@Test\n\t@Deployment(resources = \"process.bpmn\")\n\tpublic void testCurrentStatus() {\n\t\t\t\n\t\t// Obtain test run of BPMN\n\t\tProcessInstanceWithVariables processInstance = (ProcessInstanceWithVariables)processEngine().getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY);\n\n\t\t// Obtain the value of the deliveryOK variable\n\t\tboolean deliveryOK = (boolean)processInstance.getVariables().get(\"deliveryOK\");\n\t\tSystem.out.println(\"DeliveryOK: \" + deliveryOK);\n\t\t\t\n\t \n\t\t// Obtain a reference to the current task\n\t\tTaskAssert task = assertThat(processInstance).task();\n\n\t\tif (deliveryOK) {\n\t\t\t\tassertThat(processInstance).isWaitingAt(\"Activity_066txhw\");\n\t\t\t\ttask.hasName(\"Checkout 1\");\n\t\t\t\ttask.isNotAssigned();\n\t\t\t} else {\n\t\t\t\tassertThat(processInstance).isWaitingAt(\"Activity_19fouew\");\n\t\t\t\ttask.hasName(\"Checkout 2\");\n\t\t\t\ttask.isNotAssigned();\n\t\t\t}\n\n\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUser() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify updated user details page through Look up user navigation\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\tnew RegistrationAction()\n\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t.verifyThankYouPage()\n\t\t\t\t.clickLoginLink()\n\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t.verifyEmailIdInDb(userProfile);\n\t\t\t\t//verify Lookup User functionality\n*/\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyUpdateUserDetailsPage()\n\t\t\t\t\t.verifyUserAccountInformation(userProfile);\t\t\n\t\t\t\t\t}", "@Override public boolean getOnlineStatus(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getOnlineStatus, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }", "@Then(\"^Movile: Verify the balance after reloading/refresh the balance in card mode of transcations$\")\n\tpublic void movile_Verify_the_balance_after_reloading_refresh_the_balance_in_card_mode_of_transcations() throws Throwable {\n\t\tWebElement login = driver.findElement(By.id(\"UnserlnkLogin\"));\n\t\tString logintext = login.getText();\n\t\tAssert.assertEquals(\"Login\", logintext);\n\t\tSystem.out.println(\"Successfull login has taken after click on logoff button\");\n\t}", "boolean hasStatusChanged();", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyAuditTrailSearch() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyAuditTrail(userProfile);\n\t\t\t\t \n\t\t\t\t}", "@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}", "public void verifyEngagementOverviewStatusChange() {\n String strStepSuccess = \"Verify engagement overview status change when click on archive button\";\n String strStepFail = \"TestScript Failed: Verify engagement overview status does not change when click on archive button\";\n try {\n boolean result;\n waitForVisibleElement(eleEngagementOverViewStatusText, \"Wait engagement overview status\");\n result = engagementOverViewStatusBefore.toLowerCase().equals(eleEngagementOverViewStatusText.getText().trim().toLowerCase());\n // will update to assert false when bug has fixed\n Assert.assertTrue(result, \"Engagement overview status change\");\n NXGReports.addStep(strStepSuccess, LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(strStepFail, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public int Approvedbroker(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set userstatus='approved'where loginid=\"+id+\"\");\r\n\treturn i;\r\n}", "@Test\n public void SameTokenNameOpenSuccessExchangeWithdraw() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n // V1,Data is no longer update\n Assert.assertFalse(dbManager.getExchangeStore().has(ByteArray.fromLong(exchangeId)));\n //V2\n ExchangeCapsule exchangeCapsuleV2 =\n dbManager.getExchangeV2Store().get(ByteArray.fromLong(exchangeId));\n Assert.assertNotNull(exchangeCapsuleV2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsuleV2.getCreatorAddress());\n Assert.assertEquals(exchangeId, exchangeCapsuleV2.getID());\n Assert.assertEquals(1000000, exchangeCapsuleV2.getCreateTime());\n Assert\n .assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getFirstTokenBalance());\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsuleV2.getSecondTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(firstTokenQuant, assetV2Map.get(firstTokenId).longValue());\n Assert.assertEquals(secondTokenQuant, assetV2Map.get(secondTokenId).longValue());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\r\n\r\n\tpublic void testUpdateStatus() {\r\n\t\tString status = \"accept\";\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.findByEmail(\"[email protected]\"))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.save(backgroundverification1))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\tBackgroundverification backgroundverification = backgroundVerificationAndLeaseAdmnServiceImpl\r\n\t\t\t\t.updateStatus(\"[email protected]\", status);\r\n\t\tassertEquals(\"accept\", backgroundverification.getApp_bgc_status());\r\n\r\n\t}", "@Test\n @Order(14)\n void update_account_2() {\n Account first = client.getAccounts().iterator().next();\n\n // mismatch is a copy, but with different client Id\n // we use client2 because it's valid in the database\n Account mismatch = new Account(first.getId(), first.getAmount()+200, client2.getId());\n Account nullCheck = service.updateAccount(mismatch);\n Assertions.assertNull(nullCheck);\n\n // get the account with the id we used to check, should not have changed\n Account check = service.getAccount(client.getId(), mismatch.getId());\n Assertions.assertEquals(first.getAmount(), check.getAmount(), 0.1);\n }", "void reportHeartbeatRpcSuccess();", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "@Test\n\tpublic void testUpdateAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString newName = \"New Name\";\n\t\tString newPassword = \"newPassword\";\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.updateAdminAccount(USERNAME1, newPassword, newName);\n\t\t} catch (InvalidInputException e) {\n\t\t\t// Check that no error occurred\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertEquals(USERNAME1, user.getUsername());\n\t\tassertEquals(newPassword, user.getPassword());\n\t\tassertEquals(newName, user.getName());\n\t}", "@Test\n public void ActivateEnabledLCError() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(0);\n p.getStrongbox().addResource(Resource.SHIELD, 5);\n p.setLeaderCards(0, true);\n c.emptyQueue();\n assertFalse(am.activateLeaderCard(p, message));\n assertEquals(MessageType.MSG_ERROR, c.messages.get(0).getMessageType());\n assertEquals(1, c.messages.size());\n }", "@Test\n\tpublic void testAdminEnable() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"temp\", false, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(9, \"temp\", 00001, 0, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Account Enabled\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to enable account as admin\", testResult);\n\t}", "private boolean checkCanModifyStatus() {\r\n \r\n RequesterBean requesterBean = new RequesterBean();\r\n ResponderBean responderBean = new ResponderBean();\r\n try{\r\n requesterBean.setFunctionType('c');\r\n String connectTo = CoeusGuiConstants.CONNECTION_URL + \"/rolMntServlet\";\r\n AppletServletCommunicator ascomm = new AppletServletCommunicator(connectTo,requesterBean);\r\n ascomm.setRequest(requesterBean);\r\n ascomm.send();\r\n responderBean = ascomm.getResponse(); \r\n \r\n }catch(Exception e) {\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n return (Boolean)responderBean.getDataObject();\r\n }", "@Then(\"^the account should be added successfully$\")\n\tpublic void the_account_should_be_added_successfully() throws Throwable {\n\t assertTrue(\"Verify that the account is saved\",waitforElementPresent(Edit,10));\n\t UIDriver.mystep.write(\"This is a custom message -- Account saved successfully\");\n\t result = AccessibilityDriver.run508OnPage(UIDriver.driver.getPageSource(),\"Successful Account Page\");\n\t UIDriver.mystep.write(result);\n\t}", "public void verifyServerCn(boolean yesno);", "@Test\n public void destiny2SetItemLockStateTest() {\n InlineResponse20019 response = api.destiny2SetItemLockState();\n\n // TODO: test validations\n }", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateAccountValue(\" It does not support Scale orders.\", (String) null, \"?&;oq#e{/\", \"auctionImbalance\");\n assertEquals(\"updateAccountValue: It does not support Scale orders. null ?&;oq#e{/ auctionImbalance\", string0);\n }", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyPasswordResetLink() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew SapCrmAction()\n\t\t\t\t\t .loginDetails(crmuserProfile)\n\t\t\t\t\t .searchByAccountId(crmuserProfile, userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\t//verify Lookup User functionality\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyPasswordLink(userProfile);\t \n\t\t\t\t}", "int updateParticipant(TccTransaction tccTransaction);", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateAccountTime(\"yTci@Ca5ai_xH#X\");\n assertEquals(\"updateAccountTime: yTci@Ca5ai_xH#X\", string0);\n }", "private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }", "@Test(expected = java.rmi.RemoteException.class)\n\tpublic void testGetDatabaseStatus_2()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder();\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder();\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void accuseFailTest() throws Exception {\n assertTrue(\"failure - accused status was not set to true\", target.isAccused());\n\n }", "@Test(timeout = 10000L)\n public void testGetAndSetActiveState() throws Exception {\n CommonDriverAdminTests.testGetAndSetActiveState(client, nbNodes);\n }", "public void CheckRegStatus(long electCode) {\n }", "@Test\n\tpublic void madeOfferHasPendingStatus() {\n\t}", "public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "public void assertMsgCheck() {\r\n\t\tassertEquals(successMsg.getText().substring(0,36), \"Success: You have modified products!\");\r\n\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ successMsg.getText().substring(0,36));\r\n\t}", "@Test (groups = {\"smokeTest\"})\n public void checkTheStatusOfItem() {\n purchases.switchTab(\"Incoming Products\");\n List<WebElement> statusValues = $$(byXpath(\"//td[@class='o_data_cell o_readonly_modifier']\"));\n int totalNumOfStatusValues = statusValues.size();\n //System.out.println(\"The total number of status values: \" + totalNumOfStatusValues);\n int counter =0;\n for (WebElement statusValue : statusValues) {\n String statusText=statusValue.getText();\n counter++;\n Assert.assertTrue((statusText.equals(\"Available\")||statusText.equals(\"Waiting Availability\")) && (!statusText.isEmpty()), \"The status of an item is not displayed.\");\n }\n //System.out.println(\"The number of status values found by counter: \" + counter);\n Assert.assertEquals(totalNumOfStatusValues, counter, \"The total number of status values doesn't match with counter.\");\n\n\n }", "public void assertUpdateChangesMessage() {\r\n\t\tprint(\"Assert Updates Changes Confirmation Message\");\r\n\t\tlocator = Locator.MyTrader.Updated_Changes_Messages.value;\r\n\t\tAssert.assertTrue(isElementPresent(locator));\r\n\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentRegisterUser() throws Exception {\n\t\t\tReport.createTestLogHeader(\"PSA Journey\", \"To verify whether the Partner service agent is able to register a Broker through Partner service agent journey\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetails\"); \n\t\t\tnew PartnerServiceAgentAction()\n\t\t\t.navigateToPSARegistration()\n\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t/*new SapCrmAction()\n\t\t\t .loginDetails(crmuserProfile)\n\t\t\t .searchByAccountId(crmuserProfile, userProfile);*/\n\t\t\tnew RegistrationAction()\n\t\t\t.openEncryptURL(userProfile)\n\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t.verifyThankYouPage()\n\t\t\t.clickLoginLink()\n\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t.verifyEmailIdInDb(userProfile);\n\t\t\t}", "@Test\n public void testAccountSetPassword() {\n try {\n Account newAcc = new Account(1, \"holder\", \"holder\", Credential.ADMIN);\n newAcc.setPassword(\"newPasswordForHolder\");\n Assert.assertEquals(\"Incorrect updated password for account after changing\",\n \"newPasswordForHolder\", newAcc.getPassword());\n } catch (Exception e) {\n Assert.fail(\"Set account password should not have failed here\");\n e.printStackTrace();\n }\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateAcctCheckbox() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether proper error message is displayed when continuing with out enabling the accounts check box\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.ValidateCheckboxerror(userProfile);\t \t \t\t\n\t}", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "public boolean checkAccountAction(String myAppName) {\n\t\tLog.info(\"Checking current account status for app\" + myAppName);\n\t\tboolean currentValue = false;\n\t\tWebElement myAccount = getAccontDetails(myAppName);\n\t\tWebElement Tab = myAccount.findElement(By.className(\"adminTable5\"));\n\t\tString elementPageSource = Tab.getAttribute(\"outerHTML\");\n\t\tif (elementPageSource.contains(\"deactivate.png\")) {\n\t\t\tLog.info(myAppName + \" account is activated\");\n\t\t\tcurrentValue = true;\n\t\t} else {\n\t\t\tLog.info(myAppName + \" account is deactivated\");\n\t\t\tcurrentValue = false;\n\t\t}\n\t\treturn currentValue;\n\t}", "@Test\n public void SameTokenNameOpenSuccessExchangeWithdraw2() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 2;\n String firstTokenId = \"_\";\n long firstTokenQuant = 1_000_000_000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 4_000_000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n // V1,Data is no longer update\n Assert.assertFalse(dbManager.getExchangeStore().has(ByteArray.fromLong(exchangeId)));\n //V2\n ExchangeCapsule exchangeCapsuleV2 = dbManager.getExchangeV2Store()\n .get(ByteArray.fromLong(exchangeId));\n Assert.assertNotNull(exchangeCapsuleV2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsuleV2.getCreatorAddress());\n Assert.assertEquals(exchangeId, exchangeCapsuleV2.getID());\n Assert.assertEquals(1000000, exchangeCapsuleV2.getCreateTime());\n Assert\n .assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getFirstTokenBalance());\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsuleV2.getSecondTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(firstTokenQuant + 10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(10_000_000L, assetV2Map.get(secondTokenId).longValue());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n\t\tprivate void checkJobInstanceStatus() {\r\n \t\r\n \tString checkId = UUID.randomUUID().toString();\r\n \t\r\n \tlogger.info(checkId + \", [LivingTaskManager]: start checkJobInstanceStatus\"\r\n \t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() \r\n \t\t\t+ \", keySet:\" + LoggerUtil.displayJobInstanceId(livingJobInstanceClientMachineMap.keySet()));\r\n \t\r\n \tint checkAmount = 0;\r\n \t\r\n \tIterator iterator = livingJobInstanceClientMachineMap.entrySet().iterator();\r\n \t\twhile(iterator.hasNext()) { \r\n \t\t\tMap.Entry entry = (Map.Entry)iterator.next();\r\n \t\t\tServerJobInstanceMapping.JobInstanceKey key = (ServerJobInstanceMapping.JobInstanceKey)entry.getKey();\r\n \t\t\t\r\n \t\t\tList<RemoteMachine> machineList = (List<RemoteMachine>)entry.getValue();\r\n \t\t\t\r\n \t\t\tif(CollectionUtils.isEmpty(machineList)) {\r\n \t\t\t\tlogger.info(checkId + \", [LivingTaskManager]: checkJobInstanceStatus machineList isEmpty\"\r\n \t \t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() + \", key:\" + key);\r\n \t\t\t\tcontinue ;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tsynchronized(machineList) {\r\n \t\t\t\tIterator<RemoteMachine> iteratorMachineList = machineList.iterator();\r\n \t\t\t\twhile(iteratorMachineList.hasNext()) {\r\n \t\t\t\t\t\r\n \t\t\t\t\tRemoteMachine client = iteratorMachineList.next();\r\n \t\t\t\t\t\r\n \t\t\t\t\tResult<String> checkResult = null;\r\n try {\r\n client.setTimeout(serverConfig.getHeartBeatCheckTimeout());\r\n InvocationContext.setRemoteMachine(client);\r\n checkResult = clientService.heartBeatCheckJobInstance(key.getJobType(), key.getJobId(), key.getJobInstanceId());\r\n handCheckResult(key, checkResult, client);\r\n } catch (Throwable e) {\r\n logger.error(\"[LivingTaskManager]: task checkJobInstanceStatus error, key:\" + key, e);\r\n handCheckResult(key, null, client);\r\n } finally {\r\n \tcheckAmount ++;\r\n }\r\n \t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t\t\r\n \t\tlogger.info(checkId + \", [LivingTaskManager]: finish checkJobInstanceStatus\"\r\n \t\t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() + \", checkAmount:\" + checkAmount);\r\n }", "private String processPaymentStatus() {\n\t\treturn new Random().nextBoolean() ? \"success\" : \"failure\";\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Test\n public void testGetStatus() {\n System.out.println(\"getStatus\");\n Member instance = member;\n \n String expResult = \"APPROVED\";\n String result = instance.getStatus();\n \n assertEquals(expResult, result);\n }", "com.polytech.spik.protocol.SpikMessages.Status getStatus();", "com.polytech.spik.protocol.SpikMessages.Status getStatus();", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "@Test\n public void testReplicatedBm()\n {\n generateEvents(\"repl-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public void testHasPendingChanges() throws RepositoryException{\n boolean result = true;\n \n sessionControl.expectAndReturn(session.hasPendingChanges(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertEquals(jt.hasPendingChanges(), result);\n }", "@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }", "public static boolean verifyAccount(String password, String email, String token){\n Connection connect = null;\n String verifyAccountSQL = \"UPDATE users SET password = ?, verification_token = null, active = 1, verified = 1, verified_on = NOW() \"+\n \"WHERE email =? AND verification_token =?\";\n\n // Verify Account Try Block:\n try{\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(verifyAccountSQL);\n // Set Attributes:\n statement.setString(1, password);\n statement.setString(2, email);\n statement.setString(3, token);\n\n // Execute Statement:\n int rowsAffected = statement.executeUpdate();\n\n // Check For Rows Affected:\n if(rowsAffected == 1){\n return true;\n }\n // Check For Rows Affected.\n\n }catch(SQLException e){\n e.printStackTrace();\n System.out.println(\"Failed to Verify / Update Account\");\n }\n // End Of Verify Account Try Block:\n\n return false;\n\n }", "@Test\n void getAccountBalance() throws JsonProcessingException {\n\n String idAccount = \"14537780\";\n\n Response response = greetingWebClient.getAccountBalance(idAccount);\n assertTrue(response.getPayload().getList().size()>0 && response.getStatus().equals(\"OK\"));\n\n }", "@Override\r\npublic void checkBalance() {\n\t\r\n}", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Test\n public void testUpdateApartmentStatus() {\n System.out.println(\"updateApartmentStatus\");\n String status = \"Unavailable\";\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n instance.updateApartmentStatus(status, apartmentid);\n }", "@Test(priority = 2)\n\tpublic void accountPlan() throws InterruptedException {\n\t\t// log.info(\"Landed on Give Recog page\");\n\t\tselectAccountPlanSideNavbar();\n\t\tThread.sleep(1000L);\n\t\tvalidateBillingPageAssertion();\n\t\tlog.info(\"Testcase-1 passed since application landed on Manage page and Assertion passed\");\n\t}", "public Integer getAccountStatus() {\n return accountStatus;\n }", "@Test\n\t@Transactional\n\tpublic void testAudit() throws Exception {\n\t\tProvider provider = providerRepository.findOne(160L);\n\t\tSystem.out.println(\"Status: \" + provider.getStatus());\n\t\tprovider.setStatus(ProviderStatoEnum.ACCREDITATO_PROVVISORIAMENTE);\n\t\tauditReportProviderService.auditAccreditamentoProvider(provider);\n\n\t}", "@Test\r\n\tpublic void testSenderAndReceiverAccountNumberSame() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(\"123456\");\r\n\t\taccountTransferRequest.setReceiverAccount(\"123456\");\r\n\t\taccountTransferRequest.setTransferAmount(400.0);\t\t\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t\tAssert.fail(\"Exception_Expected\");\r\n\t\t} catch (ValidationException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t\tAssert.assertEquals(\"Invalid_Sender_And_Receiver_AccountNumber\", exception.getMessage());\r\n\r\n\t\t}\r\n\t}", "public void alertTheWaiter(){\n Chef c = (Chef) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = c.getChefID();\n \tstate_fields[1] = c.getChefState();\n\n Message m_toServer = new Message(1, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n \t}\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n c.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "@Test\n public void processTransactionManagerCaseB()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n Assert.assertEquals(true,trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30));\n }", "@Test\n public void testGetIsAccountVerified() {\n System.out.println(\"getIsAccountVerified Test (Passing value)\");\n Boolean expResult = Boolean.TRUE;\n Boolean result = user.getIsAccountVerified();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testAdminChangePlan() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"temp\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(8, \"temp\", 00001, 0, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Plan Changed\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to change plan of account as admin\", testResult);\n\t}", "public boolean checkComplete(){\n return Status;\n }", "@Then(\"^verify if the success message \\\"([^\\\"]*)\\\" is displayed$\")\r\n\tpublic void verifyUpdatedInformation(String successMessage) throws Exception {\n\t assertTrue(new MyPersonalInformation(driver).isInfoUpdated(successMessage));\r\n\t}" ]
[ "0.63202095", "0.6226284", "0.6160395", "0.5972327", "0.5961457", "0.59343547", "0.5810825", "0.56682044", "0.56467474", "0.5642124", "0.56342006", "0.56179726", "0.561708", "0.56096214", "0.55628693", "0.5562115", "0.55521566", "0.554688", "0.55468255", "0.55434847", "0.55139214", "0.5496845", "0.5490386", "0.5477337", "0.5453479", "0.5448506", "0.54479283", "0.54281425", "0.542426", "0.54234576", "0.54232603", "0.54181623", "0.5390571", "0.53840435", "0.5383865", "0.53724116", "0.5372318", "0.5365359", "0.535846", "0.53489023", "0.5343488", "0.533739", "0.5330025", "0.5325765", "0.5320788", "0.5304096", "0.53003055", "0.52967894", "0.52869505", "0.52861947", "0.52798176", "0.5271935", "0.52609026", "0.5260219", "0.52574766", "0.52522326", "0.5246332", "0.5244087", "0.5240839", "0.523924", "0.5239229", "0.5239019", "0.523733", "0.5231509", "0.5230122", "0.52269995", "0.52235407", "0.52115184", "0.5210019", "0.5209828", "0.52089345", "0.52087575", "0.520204", "0.51964694", "0.5192738", "0.5191769", "0.51768273", "0.5167285", "0.5164731", "0.51625735", "0.51625735", "0.51598567", "0.51573753", "0.51483166", "0.51428646", "0.5138592", "0.5133567", "0.5131337", "0.5120726", "0.5119999", "0.5116962", "0.5112903", "0.5112128", "0.5108975", "0.51081175", "0.5105875", "0.50962186", "0.50959134", "0.5087905", "0.50873655" ]
0.64812225
0
TS_Agent_27 To verify whether the "no search results"page is displayed for the following a)search field empty b)no results for the particular search term
@Test(groups ={Slingshot,Regression,CsaAgent}) public void verifyAuditTrailSearch() throws Exception { Report.createTestLogHeader("CSA Journey", "To verify the Password Reset functionality"); UserProfile userProfile = new TestDataHelper().getUserProfile("PSABroker"); //deregisterinBgbonline(userProfile); //Register a user /*new PartnerServiceAgentAction() .navigateToPSARegistration() .clickRegisteraUser(userProfile); new RegistrationAction() .openEncryptURL(userProfile) .fillRegistrationDetails(userProfile) .verifyThankYouPage() .clickLoginLink() .verifyAuditEntry(userProfile) .verifyEmailIdInDb(userProfile);*/ new PartnerServiceAgentAction() .navigateToPSARegistration() .verifyAuditTrail(userProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void executeEmptySearch_noResults() {\n emptySearchFields();\n\n //Even with empty fields, the search should be created and executed\n presenter.doSearch();\n\n //However, with all the search fields empty no results will be found\n Assert.assertFalse(presenter.hasNextResult());\n }", "@Then(\"no results appear in the search list\")\n public void no_results_appear_in_the_search_list() {\n assert true;\n }", "@Test\n\tpublic void testSearchResultUsingEmptyKeyword() {\n\t\tdriver.get(\"http://automationpractice.com\");\n\n\t\t// The expected result\n\t\tString expected = \"Please enter a search keyword\";\n\n\t\t// Find the Search button element by its name\n\t\telement = driver.findElement(By.name(\"submit_search\"));\n\n\t\t// Perform click event\n\t\telement.click();\n\n\t\t// Find the Search result\n\t\telement = driver.findElement(By.className(\"alert-warning\"));\n\n\t\t// Get the text from Search result\n\t\tString actual = element.getText();\n\n\t\t// Compare the expected VS actual result\n\t\tAssert.assertEquals(expected, actual);\n\t}", "@Then(\"no search results are displayed\")\n\t\tpublic void no_search_results_are_displayed() throws Exception {\n\t\t\t//Waits for the result page to load\n\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\n\t\t\t//Saves all results that match our book ID\n\t\t\tList<WebElement> results = driver.findElements(By.xpath(resultsPage));\n\n\t\t\tif(results.size() > 1) {\n\n\t\t\t\t//Verifies that my book id is really among the results\n\t\t\t\tfor(int i = 0; i < results.size(); ++i) {\n\t\t\t\t\tproduto = results.get(i).getAttribute(\"data-product\");\n\t\t\t\t\tif (produto.contains(id)) {\n\t\t\t\t\t\tSystem.out.println(\"\\nA busca encontrou o meu livro!\");\n\t\t\t\t\t\tSystem.out.println(id);\n\t\t\t\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tSystem.out.println(\"Livro não encontrado!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"\\nNenhum resultado encontrado!\\n\");\n\t\t\t}\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\n\t\t}", "public void Verify_Home_error_msg_displayed_on_Empty_Search()\r\n\t{\r\n\t\tString Runtime_text=Home_error_msg.getText();\r\n\t\tif(Runtime_text.contains(Exp_home_err_msg))\r\n\t\t\tSystem.out.println(\"As expected error msg displayed at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected home error message displayed at webpage\");\r\n\t}", "@Test\r\n\tpublic void searchTestFailure() {\r\n\r\n\t\tString searchKeyword = \"Test Automation\";\r\n\t\tLog.startTestCase(\"Search Test Case\");\r\n\t\tHomePage homePage = new HomePage();\r\n\t\tSearchResultsPage firstPage = homePage.searchText(searchKeyword);\r\n\t\tLog.info(\"Searching for \" + searchKeyword);\r\n\r\n\t\tSearchResultsPage secondPage = firstPage.clickNext();\r\n\t\tAssert.assertEquals(secondPage.countSearchResults(), 5);\r\n\r\n\t}", "@Test()\n\tpublic void NoResultsFound() throws InterruptedException {\n\t\theaderObjects=new HeaderObjects(driver);\n\t\theaderObjects.GoToBlog();\n\t\tThread.sleep(3000);\n\t\tblogPage= new BlogPage(driver);\n\t\tblogPage.quickSearch(\"Virgin\");\n\t\tThread.sleep(3000);\n\t\tassertTrue(blogPage.noResultdDisplayed());\n\t}", "boolean hasSearchResponse();", "@Test\n public void executeValidSearch_notAllFields(){\n emptySearchFields();\n view.setFloor(1);\n view.setBedrooms(1);\n view.setBathrooms(1);\n presenter.doSearch();\n Assert.assertTrue(presenter.hasNextResult());\n }", "boolean isSearchOk() {\n return false;\n }", "@Test\n\tpublic void VerifyTheSearchResult() {\n\t\tString searchString = \"The Choice\";\n\t\thomePage.search(searchString);\n\t\tString searchTitle = resultPage.getSearchResultTitle();\n\t\tAssert.assertTrue(searchTitle.contains(searchString));\n\t}", "boolean hasSearchRequest();", "boolean hasLocalSearchResponse();", "boolean getMissingResults();", "private void emptySearchFields() {\n view.setMinPrice(-1);\n view.setMaxPrice(-1);\n view.setMinSQM(-1);\n view.setMaxSQM(-1);\n view.setBedrooms(-1);\n view.setBathrooms(-1);\n view.setFloor(-1);\n view.setHeating(false); //Is supposed to be a checkbox so even unchecked it is false not empty\n view.setLocation(\"Athens\"); //Is supposed to get a string from a dropdown so it wil never be empty\n }", "@Test(priority = 0)\n public void test_Search_Results_Appear_Correct() {\n\n //Create Google Search Page object\n searchPage = new SearchPage(driver);\n\n //Search for QA string\n searchPage.searchStringGoogle(\"QA\");\n\n // go the next page\n resultsPage = new ResultsPage(driver);\n\n Assert.assertTrue(resultsPage.getSearchedResult().contains(\"Quality assurance - Wikipedia\"));\n\n }", "@Override\n\tpublic boolean isSearching() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isSearching() {\n\t\treturn false;\n\t}", "boolean hasDynamicSearchAdsSearchTermView();", "boolean hasSearchValue();", "public boolean empty() {\r\n if (text.equals(\"\") ||\r\n MoreString.indexOfIgnoreCase(text, \"<title>404 Not Found\") >= 0)\r\n return true;\r\n return false;\r\n }", "@java.lang.Override\n public boolean hasSearchResponse() {\n return searchResponse_ != null;\n }", "boolean hasLocalSearchRequest();", "public boolean hasSearchValue() {\n return searchValue_ != null;\n }", "boolean hasSearchTermView();", "boolean getSearchValueNull();", "public boolean isIdxSearchNoHtml() {\n Preferences prefs = getPreferences();\n return prefs.getBoolean(PROP_SEARCH_NO_HTML, false);\n }", "@Test\n public void executeEmptySearch() {\n emptySearchFields();\n\n int counterBefore = AccountDAO.getSearchID();\n\n //Even with empty fields, the search should be created and executed\n presenter.doSearch();\n Assert.assertEquals(counterBefore + 1, AccountDAO.getSearchID());\n }", "@Test\n public void testSearch3() throws Exception\n {\n unauthenticate();\n Assert.isTrue(actorService.search(\"NONEXISTENTUSER\").isEmpty());\n }", "@Test\n public void keywordSearchTest() throws InterruptedException {\n SearchNavigation.gotoSearchResultsPage(index,\"\\\"\"+exact_searchTerm+\"\\\"\");\n System.out.println(AssistanceListingSearchPage.title());\n assertEquals(\"Assistance Title does not match with Search term\",AssistanceListingSearchPage.title(), exact_searchTerm);\n }", "public boolean isSearchPlaceholderPresent() {\r\n\t\treturn isElementVisible(addVehiclesHeader.replace(\"Add Vehicle\", \"Search\"), SHORTWAIT);\r\n\t}", "public boolean hasSearchResponse() {\n return searchResponseBuilder_ != null || searchResponse_ != null;\n }", "public Boolean checkTextPresentInPage(String searchFor){\n waitForPageToLoad();\n return super.checkTextPresentInPage(searchFor);\n }", "@Test\n\tpublic void shouldNotReturnResultFilteredByDocumentType()\n\t{\n\t\tlogin(USER_MARK_RIVERS_RUSTIC_HW_COM);\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createTypeCriteriaObject(UNKNOWN, StringUtils.EMPTY, FILTER_BY_DOCUMENT_TYPE)));\n\n\t\tTestCase.assertEquals(0, result.getResults().size());\n\t}", "@java.lang.Override\n public boolean hasSearchRequest() {\n return searchRequest_ != null;\n }", "@Override\n public boolean onSearchRequested() {\n return !isSearchResultView && super.onSearchRequested();\n }", "public void verifySearchResultsContainsItem(String... terms) {\r\n\t\tString noOfPagesContainer = getDriver()\r\n\t\t\t\t.findElement(\r\n\t\t\t\t\t\tBy.cssSelector(\"div.page-links > span.aui-paginator-current-page-report.aui-paginator-total\"))\r\n\t\t\t\t.getText().trim();\r\n\t\tSystem.out.println(noOfPagesContainer);\r\n\t\tint noOfPages = tools.StringUtils.getAllIntegerNumbersFromString(\r\n\t\t\t\tnoOfPagesContainer).get(1);\r\n\t\tSystem.out.println(noOfPages);\r\n\t\tfor (int i = 0; i < noOfPages; i++) {\r\n\r\n\t\t\tList<WebElement> searchResults1 = getDriver().findElements(\r\n\t\t\t\t\tBy.cssSelector(\".portlet-section-body.results-row\"));\r\n\t\t\tList<WebElement> searchResults3 = getDriver()\r\n\t\t\t\t\t.findElements(\r\n\t\t\t\t\t\t\tBy.cssSelector(\".portlet-section-alternate.results-row.alt\"));\r\n\r\n\t\t\tList<WebElement> searchResults = new ArrayList<WebElement>();\r\n\r\n\t\t\tsearchResults.addAll(searchResults1);\r\n\t\t\tsearchResults.addAll(searchResults3);\r\n\t\t\tsearchResults.remove(0);\r\n\r\n\t\t\tSystem.out.println(\"size: \" + searchResults.size());\r\n\r\n\t\t\tfor (WebElement searchResult : searchResults) {\r\n\r\n\t\t\t\t// boolean found = false;\r\n\r\n\t\t\t\tSystem.out.println(\"element text: \" + searchResult.getText());\r\n\r\n\t\t\t\tfor (String term : terms) {\r\n\t\t\t\t\tSystem.out.println(term);\r\n\r\n\t\t\t\t\tif (term.contains(\"-\")) {\r\n\t\t\t\t\t\tString daysRange = term;\r\n\t\t\t\t\t\tSystem.out.println(daysRange);\r\n\t\t\t\t\t\tdaysRange.trim();\r\n\r\n\t\t\t\t\t\tint lowLimit = tools.StringUtils\r\n\t\t\t\t\t\t\t\t.getAllIntegerNumbersFromString(daysRange).get(\r\n\t\t\t\t\t\t\t\t\t\t0);\r\n\t\t\t\t\t\tSystem.out.println(\"lowLimit = \" + lowLimit);\r\n\t\t\t\t\t\tint highLimit = tools.StringUtils\r\n\t\t\t\t\t\t\t\t.getAllIntegerNumbersFromString(daysRange).get(\r\n\t\t\t\t\t\t\t\t\t\t1);\r\n\t\t\t\t\t\tSystem.out.println(\"highLimit = \" + highLimit);\r\n\t\t\t\t\t\tString days = searchResult.findElement(\r\n\t\t\t\t\t\t\t\tBy.cssSelector(\"td:nth-child(3)\")).getText();\r\n\t\t\t\t\t\tint dayNo = Integer.parseInt(days);\r\n\t\t\t\t\t\tSystem.out.println(dayNo);\r\n\t\t\t\t\t\tif (!(dayNo >= lowLimit && dayNo <= highLimit)) {\r\n\t\t\t\t\t\t\tAssert.fail(String\r\n\t\t\t\t\t\t\t\t\t.format(\"The list doesn't contain the correct data according to the applied filter\"));\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tif (!searchResult.getText().toLowerCase()\r\n\r\n\t\t\t\t\t\t.contains(term.toLowerCase())) {\r\n\t\t\t\t\t\t\tAssert.fail(String\r\n\t\t\t\t\t\t\t\t\t.format(\"The '%s' search result item does not contain '%s'!\",\r\n\t\t\t\t\t\t\t\t\t\t\tsearchResult.getText(), term));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (i < noOfPages - 1) {\r\n\t\t\t\t\tgetDriver()\r\n\t\t\t\t\t\t\t.findElement(\r\n\t\t\t\t\t\t\t\t\tBy.cssSelector(\"div.page-links > a.aui-paginator-link.aui-paginator-next-link\"))\r\n\t\t\t\t\t\t\t.click();\r\n\r\n\t\t\t\t\twaitABit(2000);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testSearchFilter_WithoutQuery() {\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n\n BridgeRequest request = new BridgeRequest();\n request.setStructure(\"user\");\n request.setFields(fields);\n request.setQuery(\"\");\n\n RecordList list = null;\n BridgeError unexpectedError = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "@Test(expected=IllegalArgumentException.class)\r\n\tpublic void emptyFlightSearch() {\r\n\t\tList<FlightAbstract> flightResults = SearchEngine.flightSearch(newFlightSearch);\r\n\t}", "public boolean hasSearchValue() {\n return searchValueBuilder_ != null || searchValue_ != null;\n }", "@Test\n public void enterQueryString_showResults() {\n onView(withId(R.id.page_change_web_search_view)).check(matches(not(isDisplayed())));\n // Check recycler view is not visible at beginning\n onView(withId(R.id.web_search_list)).check(matches(not(isDisplayed())));\n\n // Enter search string and close the keyboard\n onView(allOf(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE),\n isAssignableFrom(EditText.class))).perform(typeText(mSearchQueryString), pressKey(66), closeSoftKeyboard());\n\n // Check if recycler view is visible\n onView(withId(R.id.web_search_list)).check(matches(isDisplayed()));\n // Check if page change view is visible\n onView(withId(R.id.page_change_web_search_view)).check(matches(isDisplayed()));\n }", "@Test(enabled = true, timeOut = 100000, groups = {\"search\", \"home\"})\n public void searchPackage() throws IOException {\n logger.debug(\"Page is initialised.\");\n logger.trace(\"Searching City Name.\");\n// assertThat(driver.getCurrentUrl(), containsString(\"cleartrip\"));\n// home.search(typeofSearch, fromPlace, toPlace, date, numberOfAdults);\n }", "@java.lang.Override\n public boolean hasLocalSearchResponse() {\n return localSearchResponse_ != null;\n }", "@Override\n public String doSearchResult() {\n return null;\n }", "public boolean searchOK(int i){\n if(counts.size() > 0 && counts.get(i) != null &&\n queryKeys.size() > 0 && queryKeys.get(i) != null &&\n webEnvs.size() > 0 && webEnvs.get(i) != null)\n return true;\n else\n return false;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testSearchQuery03() {\n ISearchQuery query = new SearchQuery(null, null, null, null);\n SearchOption option = new SearchOption();\n option.setStrategy(strategy);\n SearchResult result = searchService.search(query, option, raptorContext);\n Assert.assertEquals(result.getResultSize(), 1);\n }", "@java.lang.Override\n public boolean hasSearch() {\n return inputSourceCase_ == 10;\n }", "private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }", "public NotSearch()\n\t\t{\n\t\t}", "@Test\n\tpublic void searchPage() throws Exception {\n\t\tgetRequest().andExpect(content().string(CoreMatchers.containsString(\"searchForm\")));\n\t}", "public boolean getSearchValueNull() {\n return searchValueNull_;\n }", "@java.lang.Override\n public boolean hasSearch() {\n return inputSourceCase_ == 10;\n }", "public boolean isSetSearchTerms()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(SEARCHTERMS$6) != null;\n }\n }", "boolean getPageNoNull();", "public String verifySearch(String object, String data) {\n\t\ttry {\n\t\t\tlogger.debug(\"Checking the search results...\");\n\n\t\t\tfinal String SEARCH_RESULT_LIST = OR.getProperty(object);\n\t\t\tfinal String SEARCH_CRITERIA = data.trim();\n\n\t\t\t// validate the parameters\n\t\t\tif (SEARCH_RESULT_LIST == null || SEARCH_RESULT_LIST == \"\" || SEARCH_RESULT_LIST.equals(\"\")) {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" Xpath is null. Please check the xpath\";\n\t\t\t}\n\t\t\tif (SEARCH_CRITERIA == null || SEARCH_CRITERIA == \"\" || SEARCH_CRITERIA.equals(\"\")) {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" Data is either null empty. Please check the data\";\n\t\t\t}\n\n\t\t\tList<WebElement> searchedElements = driver.findElements(By.xpath(SEARCH_RESULT_LIST));\n\t\t\tlogger.debug(\"Search criteria is \" + SEARCH_CRITERIA);\n\t\t\tlogger.debug(searchedElements.size() + \" elements Searched on the bases of \" + SEARCH_CRITERIA);\n\t\t\tString actualResult;\n\t\t\t/*\n\t\t\t * following loop checks each searched element whether it is\n\t\t\t * according to search criteria or not\n\t\t\t */\n\n\t\t\tfor (int i = 0; i < searchedElements.size(); i++) {\n\t\t\t\tactualResult = searchedElements.get(i).getText();\n\t\t\t\tif (!actualResult.contains(SEARCH_CRITERIA)) {\n\t\t\t\t\treturn Constants.KEYWORD_FAIL + \"---\" + actualResult + \" is not according to \" + SEARCH_CRITERIA;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint paginationLastLink = driver.findElements(By.linkText(OR.getProperty(\"last_link\"))).size();\n\t\t\t// if pagination links present then check the last page for the\n\t\t\t// search results.\n\t\t\tif (paginationLastLink != 0) {\n\t\t\t\t// click on Last pagination link.\n\t\t\t\tlogger.debug(\"checking the last page for the search results...\");\n\t\t\t\tdriver.findElement(By.linkText(OR.getProperty(\"last_link\"))).click();\n\t\t\t\tThread.sleep(1500);\n\t\t\t\treturn verifySearch(object, data);\n\t\t\t}\n\t\t\treturn Constants.KEYWORD_PASS + \" All the search Results are according to search Criteria i.e. \" + SEARCH_CRITERIA;\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn Constants.KEYWORD_FAIL + \" following Exception occured \\n\" + e;\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Following Exception occured \\n\" + e;\n\n\t\t}\n\t}", "@Test\n\tpublic void shouldNotReturnResultForServicesEastFilteredByDocumentType()\n\t{\n\t\tlogin(USER_MARK_RIVERS_RUSTIC_HW_COM);\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getPagedDocumentsForUnit(\"Services East\",\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createTypeCriteriaObject(UNKNOWN, StringUtils.EMPTY, FILTER_BY_DOCUMENT_TYPE)));\n\n\t\tTestCase.assertEquals(0, result.getResults().size());\n\t}", "public boolean getSearchValueNull() {\n return searchValueNull_;\n }", "@Test\n\tpublic void testSearchBoxExists() {\n\t\telement = driver.findElement(By.id(\"searchbox\"));\n\n\t\t// Asserts that the element isn't null\n\t\tAssert.assertNotNull(element);\n\t}", "public void onShowPopupNoSearchCriteria() {\n int left = view.getSearchContent().getElement().getAbsoluteLeft();\n int top = view.getSearchContent().getElement().getAbsoluteTop() + 40;\n VerticalPanel vp = new VerticalPanel();\n vp.addStyleName(StyleResource.INSTANCE.modal().suggestModal());\n vp.add(new Label(Storage.MSGS.searchNoSearchingCriteria()));\n PopupPanel popup = new PopupPanel(true);\n popup.setWidget(vp);\n popup.setPopupPosition(left, top);\n popup.show();\n }", "public boolean hasSearchRequest() {\n return searchRequestBuilder_ != null || searchRequest_ != null;\n }", "public boolean isSearchResultTextPresent() throws IOException{\n\t\treturn getObjectFromSelector(\"SearchResult_text\").isDisplayed();\n\n\t}", "private void checkSearchViewExists() {\n onView(withId(R.id.searchView)).check(matches(isDisplayed()));\n }", "public boolean hasLocalSearchResponse() {\n return localSearchResponseBuilder_ != null || localSearchResponse_ != null;\n }", "@Test\n public void testAdvancedSearchResult() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n WebElement searchCassette = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"input\"));\n WebElement searchButton = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.className(\"btn-standard\"));\n searchCassette.click();\n searchCassette.clear();\n log.info(\"Click in Search Casetter and introduce search term sculpture\" );\n searchCassette.sendKeys(\"sculpture\");\n log.info(\"Click on search Button \" );\n searchButton.click();\n log.info(\"Confirm Adavanced Search Page by keywords=sculpture is displayed in browser\" );\n assertTrue(driver.getCurrentUrl().contains(\"keywords=sculpture\"));\n }", "@Test\r\n\tpublic void test_3and4_Search() {\n\t\tdriver.findElement(By.id(\"twotabsearchtextbox\")).sendKeys(searchKey);\r\n\t\t// click on search button\r\n\t\tdriver.findElement(By.id(\"nav-search-submit-text\")).click();\r\n\t\t// use JavaScriptExecutor to scroll on page\r\n\t\t// cast driver to JavaScriptExecutor\r\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\r\n\t\t// try to get \"results for\" text on web page \r\n\t\t// if it is found then search is successful \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='s-result-count']\"));\r\n\t\tString resultFound = element.getText();\r\n\t\tAssert.assertTrue(resultFound.contains(\"results for\"));\r\n\t\tSystem.out.println(\"Search for Samsung is passed\");\r\n\t}", "boolean hasPaidOrganicSearchTermView();", "@Test(priority=9)\r\n public void tu_009()\r\n {\n \t\r\n \tWebElement e5= d.findElement(By.xpath(\"html/body/div[1]/div[3]/div[1]/div[2]/form/fieldset/ol/li[1]/input\"));\r\n \te5.sendKeys(\"maggi1\");\r\n \tWebElement e6= d.findElement(By.xpath(\"html/body/div[1]/div[3]/div[1]/div[2]/form/fieldset/ol/li[3]/input[1]\"));\r\n \te6.sendKeys(\"John Smith1\");\r\n \td.findElement(By.id(\"searchBtn\")).click();\r\n \tWebElement table =d.findElement(By.id(\"resultTable\"));\r\n \t List<WebElement> cols=table.findElements(By.tagName(\"td\"));\r\n \t for(WebElement e:cols)\r\n \t {\r\n \t\t if(e.getText().equals(\"No Records Found\"))\r\n \t\t {\r\n \t\t\t Assert.assertTrue(true);\r\n \t\t\t return;\r\n \t\t\t \r\n \t\t }\r\n \t }\r\n \t Assert.assertTrue(false);\r\n \t\t \r\n }", "public Boolean verifySearchResult(String location) {\r\n\t\tBoolean flag = false;\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\tWebElement confirmation = wait.setExplicitWait(driver, By.xpath(\"//div[@class='row searchWidgetRow propertySection']\"), 25);\r\n\t\tList<WebElement> searchConfirmation = confirmation.findElements(By.xpath(\".//strong\"));\r\n\t\tfor(WebElement eachElement: searchConfirmation){\r\n\t\t\tif(location.contains(eachElement.getText())){\r\n\t\t\t\tSystem.out.println(\"Search locality \"+location+\" contains the text \"+eachElement.getText());\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Test\n\tpublic void notPhraseGrepTest() throws Exception {\n\t\t// phrase is \"I am forced\"\n\t\tHashSet<String> grepFound = loadGrepResults(\"!i+am+forced\");\n\t\tCollection<Page> index = queryTest.query(\"! \\\"I am Forced\\\"\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\tassertEquals(grepFound, indexFound);\n\t}", "public void noSearch() {\n\t\tprintMsg(\"검색결과없음\");\n\t\t//굳이 필요는 없지만 편의성\n\t\t//System.out.println(\"검색결과없음\");\n\t}", "public void assertSearchInputHasLabelText() {\n this.assertElementHasText(By.xpath(SEARCH_INIT_TEXT),\n \"Search Wikipedia\",\n \"Search wikipedia input has not label text 'Search Wikipedia'\");\n }", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "@Ignore\n @Test\n public void testSearchDocument() {\n System.out.println(\"searchDocument\");\n Client client = null;\n String indexName = \"\";\n String queryStr = \"\";\n String filterStr = \"\";\n int maxExpectedHits = 0;\n List expResult = null;\n // List result = ESUtil.searchDocument(client, indexName, queryStr, filterStr, maxExpectedHits);\n // assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@ActionTrigger(action=\"KEY-ENTQRY\", function=KeyFunction.SEARCH)\n\t\tpublic void spriden_Search()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"QUERY\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "public void firstSearch() {\n\n\t\tif ((workspaceSearchField.getText() == null) || \"\".equals(workspaceSearchField.getText())) {\n\t\t\tworkspaceSearchField.setText(mainGUI.getSearchFieldText());\n\t\t\tsearchInWorkspaceFor(workspaceSearchField.getText());\n\t\t}\n\t}", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }", "public abstract boolean isSearchInProgress();", "boolean getUseSearchResult();", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "public void initSearchInput() {\n this.waitForElementAndClick(By.xpath(SEARCH_INIT_ELEMENT),\n \"Cannot find and click element\", 5);\n this.waitForElementPresent(By.xpath(SEARCH_INPUT),\n \"Cannot find search input after clicking init search element\");\n }", "abstract public boolean performSearch();", "@Test(expected = IllegalArgumentException.class)\n public void testSearchQuery04() {\n ISearchQuery query = new SearchQuery(null, null, null, null);\n SearchOption option = new SearchOption();\n option.setStrategy(strategy);\n SearchResult result = searchService.search(query, option, deployContext);\n Assert.assertEquals(8, result.getResultSize());\n }", "@Test\n public void searchForCourse(){\n UoMSearchPage page = new UoMSearchPage(driver);\n page.get();\n page.searchForStudies(\"Software Development\");\n assertTrue(page.isSoftwareDevelopmentComponentPresent());\n }", "protected void checkContainsNone(final String msg,\n final NullnessAnnotation... search) {\n if (!violationFound && !containsAny(search)) {\n violation(msg);\n }\n }", "@Test\n\tpublic void testSearchBasedOnRequest4() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"Flavorful\", null, true);\n\t\tassertTrue(sugg.size() == 0);\n\t}", "@Test\n public void paginationTest() throws InterruptedException {\n SearchNavigation.gotoSearchResultsPage(index, \" \");\n assertTrue(\"Pagination does not Exist\", AssistanceListingSearchPage.resultsPageCount() > 1);\n System.out.println(\"Search results and Pagination exists\");\n }", "public void clearResultEntries() {\n sp_searchEntries.removeAll();\n }", "public boolean getMissingResults() {\n return missingResults_;\n }", "@Override\n public SearchResult search_hunter(String keyword, int page, int rows ,int search_type) throws Exception{\n\n return null;\n }", "@Test\n\tpublic void testSearchButtonExists() {\n\t\telement = driver.findElement(By.name(\"submit_search\"));\n\n\t\t// Asserts that the element isn't null\n\t\tAssert.assertNotNull(element);\n\t}", "@Test\n public void saveSearch_noExecutedSearch() {\n fillSearchFields();\n int accountID = new AccountDAO().findAccount(\"[email protected]\").getId();\n\n int savedSearchesSize = new AccountDAO().findAccount(accountID).getStoredSearches().size();\n //Trying to save a search without actually executing one should do nothing\n presenter.saveSearch();\n Assert.assertEquals(savedSearchesSize, new AccountDAO().findAccount(accountID).getStoredSearches().size());\n }", "public String fn_searchResultcount() throws Exception {\r\n\t\ttry {\r\n\r\n\t\t\tString count =BreadCrum.getText();\r\n\t\t\tif(count != null) \r\n\t\t\r\n\t\t\treport.logPortalExtentreport(Driver.getDriver(), logger, \"PASS\", \"Expectd :search result should be displayed successfully Actual :search result displayed successfully and values is \"+count, \"search result screen\");\r\n\t\t\treturn count;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treport.logPortalExtentreport(Driver.getDriver(), logger, \"FAIL\", \"search result not displayed \" , \"seach result screen\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n public boolean hasErrorResults() {\n return false;\n }", "public void searchKeyword() throws Exception {\n\t\t\n\t\tString keyword = dataHelper.getData(DataColumn.Keyword);\n\n\t\twh.sendKeys(CommonElements.searchTxtBox, keyword);\n\t\twh.clickElement(CommonElements.searchBtn);\n\n\t\tif (wh.isElementPresent(PLPUI.VerifyPLPPage, 4)\n\t\t\t\t&& wh.getText(CommonElements.breadCumb).contains(\n\t\t\t\t\t\tkeyword)) {\n\n\t\t\treport.addReportStep(\"Type '\" + keyword\n\t\t\t\t\t+ \"' in search text box and click on search button\",\n\t\t\t\t\t\"User navigated to search plp page.\", StepResult.PASS);\n\t\t} else {\n\n\t\t\treport.addReportStep(\"Type '\" + keyword\n\t\t\t\t\t+ \"' in search text box and click on search button\",\n\t\t\t\t\t\"User is not navigated to search plp page.\",\n\t\t\t\t\tStepResult.FAIL);\n\n\t\t\tterminateTestCase(\"search plp page\");\n\t\t}\n\t\t\n\t}", "public void performNoFilterSearch() throws InterruptedException {\n\t\tString methodID = \"performNoFilterSearch\";\n\t\t\n\t\tMyActivityViewsElements activitiesListView = PageFactory.initElements(driver, MyActivityViewsElements.class);\n\t\tHeaderButton headerButton = PageFactory.initElements(driver, HeaderButton.class); \n\t\t\t\t\n\t\t//Step: execute a filter-free search\n\t\theaderButton.showRightContextMenu();\n\t\tactivitiesListView.myActivitiesSearchTxtBox.click();\n\t\tThread.sleep(500);\n\t\tactivitiesListView.myActivitiesSearchClearBtn.click();\n\t\tThread.sleep(1000);\n\t\tactivitiesListView.myActivitiesSearchLookupBtn.click();\n\t\tThread.sleep(3000);\n\t}", "public static void displayNoResults()\n {\n tableData.add(new Company(null, \"No results found\"));\n tableView.setItems(tableData); \n }", "boolean isNilSearchWindowStart();", "@Override\r\npublic String popupSearch(String criteria) {\n\treturn null;\r\n}", "@Test\n\tpublic void testSearchResultUsingValidKeyword() {\n\t\tString keyword = \"Dress\";\n\n\t\t// The expected result\n\t\tString expected = \"\\\"\" + keyword.toUpperCase() + \"\\\"\";\n\n\t\t// Find the Search box element by its name\n\t\telement = driver.findElement(By.name(\"search_query\"));\n\n\t\t// Enter keyword to search for\n\t\telement.sendKeys(keyword);\n\n\t\t// Now submit the form\n\t\telement.submit();\n\n\t\t// Find the Search result\n\t\telement = driver.findElement(By.className(\"lighter\"));\n\n\t\t// Get the text from Search result\n\t\tString actual = element.getText();\n\n\t\t// Compare the expected VS actual result\n\t\tAssert.assertEquals(expected, actual);\n\t}", "public void ValidateProductSearchIsSuccessfull(){\n\t if (driver.findElement(search_refinement_categories_segment).isDisplayed()){\n\t Assert.assertTrue(true);\n\t logger.info(\"Search Page is displayed because refinement category is displayed\");\n\t }\n\t else{\n\t logger.fatal(\"Search Page is not displayed because refinement category is not displayed\");\n\t Assert.fail(\"Search Page is not displayed because refinement category is not displayed\");\n\t }\n\t }" ]
[ "0.7262135", "0.70837504", "0.7004089", "0.69073564", "0.69072086", "0.6824967", "0.6723117", "0.66938245", "0.66673726", "0.6661169", "0.6582567", "0.65451974", "0.64308566", "0.6353113", "0.6316916", "0.6287722", "0.6280769", "0.6280769", "0.62716824", "0.6260818", "0.6195295", "0.6190657", "0.61455256", "0.6144684", "0.6113586", "0.6090877", "0.6087603", "0.608634", "0.6048564", "0.6017661", "0.60173094", "0.60102755", "0.6004558", "0.5925711", "0.59155345", "0.5894027", "0.5891849", "0.586911", "0.58553505", "0.58304775", "0.5829611", "0.58187747", "0.57669735", "0.5762757", "0.57514185", "0.5749533", "0.57464", "0.5746111", "0.5742575", "0.5728842", "0.57279056", "0.572435", "0.57216156", "0.57135683", "0.56939876", "0.56911314", "0.5683962", "0.5679542", "0.5675532", "0.56736577", "0.56736207", "0.5664364", "0.56589204", "0.5658706", "0.5655021", "0.56457573", "0.5640272", "0.5630783", "0.56283194", "0.56238425", "0.56192344", "0.5615141", "0.5615141", "0.55950534", "0.5594791", "0.5594584", "0.5594086", "0.5589515", "0.5579932", "0.5561294", "0.5556384", "0.5555985", "0.5550156", "0.55409634", "0.55259794", "0.5520015", "0.5507688", "0.5506078", "0.5502394", "0.55007285", "0.54992753", "0.54972845", "0.54940754", "0.5488448", "0.5484023", "0.54756165", "0.5469038", "0.54687685", "0.54679435", "0.5460068", "0.5456772" ]
0.0
-1
TS_Broker_Agent_17_E2E To verify whether the reset password link has been sent to the broker and "reset password" process (E2E) flow is checked in the update user details page.
@Test(groups ={Slingshot,Regression,CsaAgent}) public void verifyPasswordResetLink() throws Exception { Report.createTestLogHeader("CSA Journey", "To verify the Password Reset functionality"); UserProfile userProfile = new TestDataHelper().getUserProfile("PSABroker"); //deregisterinBgbonline(userProfile); //Register a user /*new PartnerServiceAgentAction() .navigateToPSARegistration() .clickRegisteraUser(userProfile); new SapCrmAction() .loginDetails(crmuserProfile) .searchByAccountId(crmuserProfile, userProfile); new RegistrationAction() .openEncryptURL(userProfile) .fillRegistrationDetails(userProfile) .verifyThankYouPage() .clickLoginLink() .verifyAuditEntry(userProfile) .verifyEmailIdInDb(userProfile);*/ //verify Lookup User functionality new PartnerServiceAgentAction() .navigateToPSARegistration() .verifyFindUser(userProfile) .verifyPasswordLink(userProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }", "@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}", "private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }", "public void validateResetPassword()\r\n {\r\n boolean flag = this.hasErrors();\r\n if (userProfile == null || userProfile.getLoginId() == null\r\n || \"\".equals(userProfile.getLoginId().trim()))\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0809\"));\r\n }\r\n else\r\n {\r\n try\r\n {\r\n log.info(this.getText(\"B2BPC0802\", new String[] {\r\n userProfile.getLoginId(),\r\n this.getRequest().getRemoteAddr() }));\r\n String loginId = userProfile.getLoginId();\r\n userProfile = userProfileService\r\n .getUserProfileByLoginId(userProfile.getLoginId());\r\n if (userProfile == null)\r\n {\r\n log.info(this.getText(\"B2BPC0810\", new String[] { loginId,\r\n this.getRequest().getRemoteAddr() }));\r\n this.setErrorMsg(this.getText(\"B2BPC0811\",\r\n new String[] { loginId }));\r\n flag = true;\r\n }\r\n if (!flag)\r\n {\r\n if (!flag && !userProfile.getActive())\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0824\",\r\n new String[] { userProfile.getLoginId() }));\r\n flag = true;\r\n }\r\n if (!flag && userProfile.getBlocked())\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0825\",\r\n new String[] { userProfile.getLoginId() }));\r\n flag = true;\r\n }\r\n }\r\n if (!flag)\r\n {\r\n previousResetPwdRecord = new ResetPasswordRequestHistoryHolder();\r\n previousResetPwdRecord.setLoginId(userProfile.getLoginId());\r\n previousResetPwdRecord.setValid(Boolean.TRUE);\r\n List<? extends Object> resetPasswordRequestHistorys = resetPasswordRequestHistoryService\r\n .select(previousResetPwdRecord);\r\n if (resetPasswordRequestHistorys == null\r\n || resetPasswordRequestHistorys.isEmpty())\r\n {\r\n previousResetPwdRecord = null;\r\n }\r\n else\r\n {\r\n previousResetPwdRecord = (ResetPasswordRequestHistoryHolder) resetPasswordRequestHistorys\r\n .get(0);\r\n int reqInvl = controlParameterService\r\n .selectCacheControlParameterBySectIdAndParamId(\r\n SECT_ID_CTRL, \"REQ_INVL\").getNumValue();\r\n Date canResetDate = new Date(previousResetPwdRecord\r\n .getRequestTime().getTime()\r\n + reqInvl * 60L * 1000);\r\n if ((new Date()).before(canResetDate))\r\n {\r\n log.info(this.getText(\"B2BPC0812\", new String[] {\r\n String.valueOf(reqInvl),\r\n DateUtil.getInstance().convertDateToString(\r\n previousResetPwdRecord\r\n .getRequestTime(),\r\n DATA_FORMAT),\r\n DateUtil.getInstance().convertDateToString(\r\n new Date(), DATA_FORMAT) }));\r\n this\r\n .setErrorMsg(this\r\n .getText(\r\n \"B2BPC0812\",\r\n new String[] {\r\n String\r\n .valueOf(reqInvl),\r\n DateUtil\r\n .getInstance()\r\n .convertDateToString(\r\n previousResetPwdRecord\r\n .getRequestTime(),\r\n DATA_FORMAT),\r\n DateUtil\r\n .getInstance()\r\n .convertDateToString(\r\n new Date(),\r\n DATA_FORMAT) }));\r\n flag = true;\r\n }\r\n }\r\n\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n try\r\n {\r\n this\r\n .setErrorMsg(this\r\n .getText(\r\n \"B2BPC0814\",\r\n new String[] { controlParameterService\r\n .selectCacheControlParameterBySectIdAndParamId(\r\n SECT_ID_CTRL,\r\n PARAM_ID_HELPDESK_NO)\r\n .getStringValue() }));\r\n }\r\n catch (Exception e1)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e1);\r\n }\r\n }\r\n }\r\n }", "public void forgotPasswordValidate()\r\n\t{\n\t\tString expectedMessage = \"An email with a confirmation link has been sent your email address.\";\r\n\t\tString actualMessage=this.forgotPasswordSuccessMessage.getText();\r\n\t\tAssert.assertEquals(expectedMessage,actualMessage);\r\n\t}", "private void getResetPassword() {\n\t\t// TODO Auto-generated method stub\n\t\tdialog = new ZProgressHUD(ChangePasswordActivity.this);\n\t\tdialog.setMessage(\"Pls wait ...\");\n\t\tdialog.show();\n\t\t\n\t\tNetworkEngine.setIP(\"starticketmyanmar.com\");\n\t\tNetworkEngine.getInstance().GetResetPassword(email, code, new_password, new Callback<ForgotPassword>() {\n\t\t\t\n\t\t\tpublic void success(ForgotPassword arg0, Response arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (arg0 != null) {\n\t\t\t\t\t\n\t\t\t\t\tif (arg0.getStatus() == 400) {\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Your account has already been reset password\", SKToastMessage.ERROR);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (arg0.getStatus() == 200) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Change Password Success\", SKToastMessage.SUCCESS);\n\t\t\t\t\t\tcloseAllActivities();\n\t\t\t\t\t\tstartActivity(new Intent(ChangePasswordActivity.this, SaleTicketActivity.class));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t\t\n\t\t\tpublic void failure(RetrofitError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.dismissWithFailure();\n\t\t\t}\n\t\t});\n\t}", "boolean hasResetPasswordRequest();", "@Test\n\tpublic void checkconfirmpasswordfieldpresent()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.password.sendKeys(\"password\");\n\t\tResetpassword.confirm_password.sendKeys(\"confirm password\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"Password should match with confirm password.\");\n\t\t\n\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyImpersonateUserLink() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"ViewBillPartner\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew SapCrmAction()\n\t\t\t\t\t .loginDetails(crmuserProfile)\n\t\t\t\t\t .searchByAccountId(crmuserProfile, userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\t//verify Lookup User functionality\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyImpersonateLink(smrProfile);\t \n\t\t\t\t}", "@Test\n\tpublic void verifyForgetPasswordPageHeadingAndInfoTextAlongWithEmailField() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordPageHeading), \"Recover your password\",\"Recover your password heading is not displaying in forget password page\");\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordInfoText), \"Please enter your email address to reset your password.\",\"Info text is not displaying as expected in forget password page\");\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordEmailInputField), \"Email field is not displaying in forget password page\");\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset Link Sent To Your Email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error ! Reset Link is Not Sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void verificationFor2fa() throws MessagingException, IOException {\n\t\tverifyMailPage engine2fa = new verifyMailPage(driver);\n\t\tengine2fa.clickSendBackupCodeToMail();\n\t\tString recoveryCode =engine2fa.goToRecoveryCodeMail();\n\t\tengine2fa.enterRecoveryCode(recoveryCode);\n\t\tengine2fa.clickSubmit();\n\t}", "public void recoverPassword(String vEID) {\n\t\tmyD.findElement(By.linkText(\"Forgot Password\")).click();\n\t\t\n\t\t//4\tEnter Email ID EmailID\n\t\tmyD.findElement(By.id(\"forgot_email\")).clear();\n\t\tmyD.findElement(By.id(\"forgot_email\")).sendKeys(vEmailID);\n\t\t\n\t\t//5\tClick on Recover Button\t\t\t\n\t\tmyD.findElement(By.name(\"submit\")).click();\n\t\t\n\t}", "private boolean checkValidation(Reset reset, String confirmPassword) {\n if (reset.getPassword().isEmpty()) {\n mValidateLiveData.setValue(new FailureResponse(\n AppConstants.UIVALIDATIONS.NEW_PASSWORD_EMPTY, ResourceUtils.getInstance()\n .getString(R.string.new_password_empty)\n ));\n return false;\n } else if (reset.getPassword().length() < 6) {\n mValidateLiveData.setValue(new FailureResponse(\n AppConstants.UIVALIDATIONS.INVALID_PASSWORD, ResourceUtils.getInstance()\n .getString(R.string.enter_valid_password)\n ));\n return false;\n } else if (confirmPassword.isEmpty()) {\n mValidateLiveData.setValue(new FailureResponse(\n AppConstants.UIVALIDATIONS.CONFIRM_PASSWORD_EMPTY, ResourceUtils.getInstance()\n .getString(R.string.confirm_password_empty)\n ));\n return false;\n } else if (confirmPassword.length() < 6) {\n mValidateLiveData.setValue(new FailureResponse(\n AppConstants.UIVALIDATIONS.INVALID_PASSWORD, ResourceUtils.getInstance()\n .getString(R.string.enter_valid_password)\n ));\n return false;\n\n } else if (!reset.getPassword().equals(confirmPassword)) {\n mValidateLiveData.setValue(new FailureResponse(\n AppConstants.UIVALIDATIONS.PASSWORD_NOT_MATCHED, ResourceUtils.getInstance()\n .getString(R.string.password_not_matched)\n ));\n return false;\n }\n return true;\n }", "@Test(priority=1)\n public void resetPasswordTest() throws InterruptedException {\n\t teacherPOM.clickLostPassword(); \n\t teacherPOM.enterUsername(\"swapna18\");\n\t teacherPOM.clickSendMsgBtn();\n\t teacherPOM.checkMsg();\n\t try {\n\t\tscreenShot.captureScreenShot(\"Fourth\");\n\t} catch (Exception e) {\n\t \te.printStackTrace();\n\t}\n\t Thread.sleep(10000);\n\t driver.get(\"https://gmail.com\");\n\t teacherPOM.loginMyGmailid(\"testpurpose774\");\n\t teacherPOM.clickNext1();\n\t teacherPOM.loginMyGmail(\"Gautham@143\");\n\t teacherPOM.clickNext2();\n\t teacherPOM.checkMailForPassword();\n\t teacherPOM.checkPasswordLink();\n\t Thread.sleep(10000);\n\t driver.navigate().to(\"https://gmail.com\");\n\t teacherPOM.checkMailForPassword();\n\t teacherPOM.getPassword();\n\t \n\t }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n mAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LoginActivity.this,\"Reset Link sent to your Email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LoginActivity.this,\"Error ! Reset Link is Not Sent.\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}", "@Test\n\tpublic void verifyBackToLoginButtonInForgetPasswordPageAndItsNavigation() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordLoginPageLink), \"Back to login link isn't present in forgot password page\");\n\t\ttry {\n\t\t\tclick(forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}catch (Exception e) {\n\t\t\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.emailTextField);\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(verifyElementPresent(loginPage.emailTextField), \"User isn't landing on login page on clicking back to login button from forgot password page\");\n\t}", "private void resetPassAction(){\n edtResetPassword = (EditText) findViewById(R.id.edtResetPassword);\n edtResetConfirmPassword = (EditText) findViewById(R.id.edtResetConfirmPassword);\n\n strResetPassword = edtResetPassword.getText().toString().trim();\n strResetConfirmPassword = edtResetConfirmPassword.getText().toString().trim();\n if(resetValidate()){\n CommonUtils.clearErrorFromView(resetForm);\n if(InternetConnect.isConnected(ResetPasswordActivity.this)) {\n mProgressDialog.show();\n resetWebService();\n }else{\n CommonUtils.showAlertMessage(ResetPasswordActivity.this,getString(R.string.error),getString(R.string.net_connection_error_title),getString(R.string.net_connection_error_msg),getString(R.string.net_connection_error_btn));\n }\n }\n }", "private boolean resetValidate(){\n if(strResetPassword.equals(\"\")){\n CommonUtils.setErrorOnView(edtResetPassword, getString(R.string.error_field_required));\n }else if(strResetConfirmPassword.equals(\"\")){\n CommonUtils.setErrorOnView(edtResetConfirmPassword, getString(R.string.error_field_required));\n }else if(!strResetPassword.equals(strResetConfirmPassword)){\n CommonUtils.setErrorOnView(edtResetConfirmPassword, getString(R.string.error_match_password));\n }else{\n return true;\n }\n return false;\n }", "private String processResetIPassword(\n\t\t\tChangePasswordFormBean changePasswordFormBean,\n\t\t\tHttpServletRequest request)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started...\");\n\t\tHttpSession session = request.getSession();\n\t\tUserSessionContext userSessionContext = (UserSessionContext) session\n\t\t\t\t.getAttribute(Constants.AUTHENTICATED_USER);\n\t\tlogger.info(\" Request to reset Password by user \"\n\t\t\t\t+ userSessionContext.getId());\n\t\tActionErrors errors = new ActionErrors();\n\t\ttry {\n\t\t\t\t\n\t\t\tGSDService gSDService = new GSDService();\n\t\t\t/* call gsdService to check password history and gsd compliance. */\n\t\t\tlogger.info(\" Calling GSD to validate reset password.\");\n\t\t\n\t\t\tgSDService.validateChangePwd(changePasswordFormBean.getLoginName(),\n\t\t\t\t\tchangePasswordFormBean.getNewPassword(),\n\t\t\t\t\tchangePasswordFormBean.getOldPassword());\n\t\t\tlogger.info(\" GSD validation successful for reset password.\");\n\t\t\t/* Encrypt passwords entered by the user */\n\t\t\tIEncryption encrypt = new Encryption();\n\t\t\tString newDigest = encrypt.generateDigest(changePasswordFormBean\n\t\t\t\t\t.getNewPassword());\n\t\t\tString oldDigest = encrypt.generateDigest(changePasswordFormBean\n\t\t\t\t\t.getOldPassword());\n\t\t\tAuthenticationService authenticationService = new AuthenticationServiceImpl();\n\t\t\t\n\t\t\t/* call changePassword method of ChangePasswordService */\n\t\t\tauthenticationService.changePassword(userSessionContext.getId(),\n\t\t\t\t\toldDigest, newDigest);\n\t\t\t\n\t\t\t/* show message for successful password change */\n\t\t\terrors.add(\"message\", new ActionError(\n\t\t\t\t\t\"message.changepassword.success\"));\n\t\t\tsaveErrors(request, errors);\n\t\t\tlogger.info(\" Change password successful.\");\n\n\t\t\t\n\n\t\t} catch (ValidationException valExp) {\n\t\t\tif (\"msg.security.id02\".equalsIgnoreCase(valExp.getMessageId())) {\n\t\t\t\terrors.add(\"validationerror\", new ActionError(\n\t\t\t\t\t\t\"msg.security.id02\"));\n\t\t\t\treturn PASSWORD_EXPIRED;\n\n\t\t\t} else {\n\t\t\t\tString application_user = ResourceReader.getWebResourceBundleValue(\"application.user\");\n\t\t\t\terrors.add(\"validationerror\", new ActionError(valExp\n\t\t\t\t\t\t.getMessageId(), application_user));\n\t\t\t}\n\t\t} catch (VirtualizationServiceException virtualSerExp) {\n\t\t\tlogger.error(\" VirtualizationException occured for \"\n\t\t\t\t\t+ userSessionContext.getId());\n\t\t\terrors.add(\"error\", new ActionError(virtualSerExp.getMessage()));\n\t\t\tsaveErrors(request, errors);\n\t\t}\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveErrors(request, errors);\n\t\t}\n\t\treturn \"\";\n\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n auth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, R.string.reset_sent, Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, getString(R.string.reset_not_sent) + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "@Test (priority=2)\n\tpublic synchronized void resetPasswordOnLive() throws InterruptedException, IOException, AWTException {\n\t\t\n\t\tif (resetLive == true)\n\t\t{\n\t\t\n\t\t\tRemoteWebDriver driver = DriverFactory.getInstance().getDriver();\n\t\t\t\n\t\t\t/********************************************************************************\n\t\t\t * \n\t\t\t * CREATE USER ON LIVE\n\t\t\t * \n\t\t\t ********************************************************************************/\n\t\t\t\n\t\t\t// Environment\n\t\t\tString env = \"Live\";\n\t\t\t\n\t\t\t// Go to Live Secure site\n\t\t\tdriver.get(\"https://secure.mercuryvmp.com/\");\n\t\t\t\n\t\t\t// Create the user\n\t\t\tresetPassword(driver, env);\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tExtentTest test = ExtentTestManager.getTest();\n\t\t\t// Skip test\n\t\t\tSystem.out.println(\"Skipped resetting the password for the user on Live becuase the boolean was set to false\");\n\t\t\t// Log a skip in the extent report\n\t\t\ttest.log(LogStatus.SKIP, \"<span class='label info'>SKIPPED</span>\", \"<pre>Skipped resetting the password for the user on Live becuase the boolean was set to false</pre>\");\n\t\t} // end else\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n if (currentPwd.getText().toString().equals(MainActivity.pwd)) {\n Toast.makeText(ResetPassword.this, \"Correct password\", Toast.LENGTH_SHORT).show();\n FirebaseAuth auth = FirebaseAuth.getInstance();\n auth.sendPasswordResetEmail(MainActivity.email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(ResetPassword.this, \"Email sent\", Toast.LENGTH_SHORT).show();\n changeActivity(ResetPassword.this, Settings.class);\n } else {\n Toast.makeText(ResetPassword.this, \"Error occurred\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n Toast.makeText(ResetPassword.this, \"Incorrect password\", Toast.LENGTH_SHORT).show();\n }\n }", "@Test(priority=1)\n\tpublic void verifyPasswordsMatch() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"[email protected]\");\n\t\tsignup.enterPassword(\"abcd\");\n\t\tsignup.reenterPassword(\"1235\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Passwords do not match; please enter a password and reenter to confirm.\\nPasswords must contain at least 6 characters and no spaces.\"));\n\t}", "HasClickHandlers getResetPasswordButton();", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset link sent to your email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error! Reset link was not sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "public void clickForgotPassword() {\r\n\t\tutilities.clickOnElement(aForgotPassword);\r\n\t}", "@Test\r\n\tpublic void TC_09_verify_Passowrd_Does_Not_Match_with_confirm_password() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with both password and confirm password do'nt match\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"test12345\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password and confirm\r\n\t\t// password do'nt match is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getpswdErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"The password you entered does not match\");\r\n\r\n\t}", "public String Signup_logout_and_click_forgetpassword() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", ForgetPasswordButton );\n\tString text=signupPage.Email_value_of_the_user();\n\twait.SingleElementWait(\"//input[@id='resetemail']\");\n\tForgetPasswordTextbox.sendKeys(text);\n\tResetButton.click();\n\twait.SingleElementWait(\"//div[@class='alert alert-success']\");\n\tString successmessage=ForgetPasswordResetSuccessMessage.getText();\n\treturn successmessage;\n\t}", "public void verifyFalseLogin() {\n alertElement.waitForState().present(30);\n alertElement.assertContains().text(\"Please Enter a Valid User ID\");\n }", "public void v_Verify_Guest2_Displayed(){\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String mail = resetMail.getText().toString();\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogIn.this,\"Reset Link sent.\",Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogIn.this,\"Error | Reset Link not sent.\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "public synchronized void resetPassword(RemoteWebDriver driver, String env) throws InterruptedException, IOException, AWTException {\n\t\t\t\n\t\t// Enter Email\n\t\tperform.type(driver, SLogin.email_txtbx(driver), \"automation\" + env + user + \"@dntest.net\");\n\t\t\n\t\t// Enter Password\n\t\tperform.type(driver, SLogin.password_txtbx(driver), password);\n\t\t\n\t\t// Click Sign In\n\t\tperform.click(driver, SLogin.signIn_btn(driver));\n\t\t\n\t\t// Wait for Find textbox\n\t\tperform.waitForElementToBeClickable(driver, SOrders.find_txtbx(driver));\n\t\t\n\t\t// Go to Users\n\t\tsecure.goToUsers(driver);\n\t\t\n\t\t// Change the password 5 times\n\t\tfor (int a = 1; a <=5; a++)\n\t\t{\n\t\t\t\n\t\t\tString pw = perform.randomLetters(driver, 10);\n\t\t\n\t\t\t// Wait for the Password Gear Icon\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Click the Password Gear icon\n\t\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be visible\n\t\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\t\n\t\t\t// Wait for New\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\t\n\t\t\t// Enter New PW\n\t\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Confirm New PW\n\t\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Click Save\n\t\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be hidden\n\t\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t} // end for loop\n\t\t\n\t\t// Change the password to T3sting1\n\t\t// Wait for the Password Gear Icon\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Click the Password Gear icon\n\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Wait for overlay to be visible\n\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\n\t\t// Wait for New\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\n\t\t// Enter New PW\n\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Confirm New PW\n\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Click Save\n\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\n\t\t// Wait for overlay to be hidden\n\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t// Save the settings\n\t\tsecure.saveUsersSettings(driver);\n\t\t\n\t}", "public void resetpassword(){\n resetpasswordlocal.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final EditText resetpass = new EditText(view.getContext());\n AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());\n passwordResetDialog.setTitle(\"Reset Password ?\");\n passwordResetDialog.setMessage(\"Enter the new password\");\n passwordResetDialog.setView(resetpass);\n\n passwordResetDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Extract the email and set reset link\n String newpass = resetpass.getText().toString();\n user.updatePassword(newpass).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Profile.this, \"Password reset successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, \"Password reset failed\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n\n passwordResetDialog.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Close the dialog box\n dialogInterface.cancel();\n }\n });\n passwordResetDialog.create().show();\n\n }\n });\n }", "private void resetPassword() {\n EditText etEmail = findViewById(R.id.etResetEmail);\n final String email = etEmail.getText().toString();\n\n if (email.isEmpty()) {\n etEmail.setError(\"Email field is required.\");\n etEmail.requestFocus();\n } else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n etEmail.setError(\"Valid email address required.\");\n etEmail.requestFocus();\n } else {\n mAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(\"PASSWORD_RESET\", \"Email sent.\");\n Toast.makeText(LoginActivity.this,\n \"An email has been sent to \" + email\n + \". Please check your inbox.\", Toast.LENGTH_LONG).show();\n changeForm(R.id.btnSignInForm);\n } else {\n //TODO: add some error notification for user here.\n Log.d(\"PASSWORD_RESET\", \"Failure.\");\n }\n }\n });\n }\n }", "@Test\n\t\tvoid givenPassword_CheckForValidationForPasswordRule4_RetrunTrue() {\n\t\t\tboolean result =ValidateUserDetails.validatePassword(\"Srewoirfjkbh#3\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "public void verifyUser() {\n\t\toutMessage.setAction(1);\n\t\toutMessage.setObject(this.getUser());\n\t\tmodelCtrl.sendServerMessage(outMessage);\n\t\tinMessage = modelCtrl.getServerResponse();\n\t\t//user is verified\n\t\tif (inMessage.getAction() == 1) {\n\t\t\taccept();\n\t\t}\n\t\t//user is not verified, return to start\n\t\telse {\n\t\t\tSystem.out.println(\"User is not verified\");\n\t\t\tdeny();\n\t\t\t\n\t\t}\n\t}", "@Test\n public void RediffAlerts() \n {\n\t \n\t \n\t WebDriver driver=new ChromeDriver();\n\t \n\t driver.manage().window().maximize();\n\t driver.get(\"https://mail.rediff.com/cgi-bin/login.cgi\");\n\t driver.findElement(By.xpath(\"//input[@value='Go']\")).click();\n\t \n\t Alert alert = driver.switchTo().alert();\n\t \n\t System.out.println(\"Alert message if user is not entering user details: \"\n\t +alert.getText());\n\t\t\n\t String text = alert.getText();\n\t\t\n\t\t\n\t\tif(text.equals(\"Please enter a valid user name\"))\n\t\t{\n\t\t\tSystem.out.println(\"correct alert messg\");\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\tSystem.out.println(\"in-correct alert messg\");\n\t\t\t}\n\t\t\n\t\talert.accept(); //click on OK btn\n\t\t\n\t\t//alert.dismiss(); //click on cancel btn\n\t\t\n\t}", "@Then(\"^Password should be updated$\")\n public void password_should_be_updated() throws Throwable {\n changepassword.verifyPasswordIsSuccessfull(\"Success\",\"Congratulations!\",\"You have successfully updated your password.\");\n changepassword.closeSuccessPwdUpdate();\n\n /* long numeric=Test.faker.number().randomNumber(2,true);\n PropertyReader.dynamicWriteTestDataOf(\"change_password\",PropertyReader.dynamicReadTestDataOf(\"new_Password\"));\n PropertyReader.dynamicWriteTestDataOf(email,PropertyReader.dynamicReadTestDataOf(\"new_Password\"));\n\n PropertyReader.dynamicWriteTestDataOf(\"new_Password\",\"update\"+numeric+\"@123\");\n PropertyReader.dynamicWriteTestDataOf(\"confirm_new_Password\",\"update\"+numeric+\"@123\");\n */\n }", "@Test\n\tpublic void PasswordManagement_20018_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\t\t\n\t\tFieldSet customFS = testData.get(testName).get(0);\n\t\t\n\t\t// Go to Admin > PasswordManagement\n\t\tsugar().navbar.navToAdminTools();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\"); \n\t\tsugar().admin.adminTools.getControl(\"passwordManagement\").click();\n\n\t\t// TODO: VOOD-948\n\t\tVoodooControl forgotPasswordCheckbox = new VoodooControl(\"input\", \"id\", \"forgotpassword_checkbox\");\n\t\tif(!forgotPasswordCheckbox.isChecked())\n\t\t\t// If uncheck then check \"Enable System-Generated Passwords Feature\"\n\t\t\tforgotPasswordCheckbox.click();\n\t\t\n\t\t// Check \"Enable Forgot Password feature\"\n\t\tnew VoodooControl(\"input\", \"id\", \"SystemGeneratedPassword_checkbox\").click();\n\t\t\n\t\t// Verify that message displays with black font for \"Enable System-Generated Passwords Feature\"\n\t\tnew VoodooControl(\"td\", \"id\", \"SystemGeneratedPassword_warning\").queryContains(customFS.get(\"warningMsg\"), true);\n\t\t\n\t\t// Verify that message displays with black font for \"Enable Forgot Password feature\"\n\t\tnew VoodooControl(\"td\", \"id\", \"SystemGeneratedPassword_warning2\").queryContains(customFS.get(\"warningMsg\"), true);\n\t\t\n\t\t// Save updation of PasswordManagement settings \n\t\tnew VoodooControl(\"input\", \"css\", \"input[title='Cancel']\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "@Test(dataProviderClass = Data_Provider_A6.class ,dataProvider=\"ForgetPasswordDataProvider\")\n\tpublic void forgetPasswordTest(String url ,String usname,String password) throws InterruptedException, IOException{\n\t\tWebElement loginbutton = elementCssSelector(\"a[href='https://login.xero.com/']\");\n\t\t((JavascriptExecutor)driver).executeScript(\"arguments[0].click();\" , loginbutton);\n\t\t\n\t\tThread.sleep(6000);\n\t\t//clicking on the forget password? link\n\t\tWebElement forgetPasswordLink = elementCssSelector(\"a[href='/ForgottenPassword']\");\n\t\tforgetPasswordLink.click();\n\t\t\t\t\n\t\tThread.sleep(8000);\n\t\tWebElement email = elementXpath(\"//*[@id='UserName']\");\n\t\tenterText(email,usname ,\"email\");\n\t\t\n\t\tThread.sleep(5000);\n\t\t//clicking on the email button\n\t\tWebElement senLinkButton = elementXpath(\"//*[@id='submitButton']/a/span\");\n\t\tclickBUtton(senLinkButton ,\"sen link Button\");\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\tpublic void AnonymousElecSmrCR_Multipleregister_newuser_emailurl(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verifies the anonymous SMR page for Gas customer\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"Anonymousnonalertbpcp\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageforemailurl(smrProfile)\n\t\t\t .verifyAnonymousSAPElecCus_CR_Multiplereg_newuser_emailurl(smrProfile);\n\t\t\t // .VerifySAPCRM_SMR_noalret(smrProfile,crmuserProfile,userProfile);\n\t\t\t }", "private void ensureChangePasswd(String userid, String rslMsg)\n/* */ {\n/* 252 */ WebContext webContext = LfwRuntimeEnvironment.getWebContext();\n/* 253 */ HttpSession session = null;\n/* 254 */ String challlid = UUID.randomUUID().toString();\n/* 255 */ if (webContext != null) {\n/* 256 */ HttpServletRequest httpServRequest = webContext.getRequest();\n/* 257 */ if (httpServRequest != null) {\n/* 258 */ session = httpServRequest.getSession();\n/* 259 */ if (session != null) {\n/* 260 */ session.setAttribute(\"USER_SESSION_ID\", userid);\n/* */ }\n/* */ }\n/* */ }\n/* 264 */ StringBuffer urlBuf = new StringBuffer();\n/* 265 */ urlBuf.append(\"/portal/app/mockapp/passwordmng?model=nc.uap.portal.mng.pwdmng.PasswordManagerModel\");\n/* 266 */ urlBuf.append(\"&otherPageUniqueId=\" + LfwRuntimeEnvironment.getWebContext().getWebSession().getWebSessionId());\n/* 267 */ AppLifeCycleContext.current().getApplicationContext().popOuterWindow(urlBuf.toString(), rslMsg, \"480\", \"280\", \"TYPE_DIALOG\");\n/* */ }", "@Test (priority=1)\n\tpublic synchronized void resetPasswordOnBeta() throws InterruptedException, IOException, AWTException {\n\t\t\n\t\tif (resetBeta == true)\n\t\t{\n\t\t\n\t\t\tRemoteWebDriver driver = DriverFactory.getInstance().getDriver();\n\t\t\t\n\t\t\t/********************************************************************************\n\t\t\t * \n\t\t\t * CREATE USER ON BETA\n\t\t\t * \n\t\t\t ********************************************************************************/\n\t\t\t\n\t\t\t// Environment\n\t\t\tString env = \"Beta\";\n\t\t\t\n\t\t\t// Go to Beta Secure site\n\t\t\tdriver.get(\"https://secure.mercuryvmpbeta.com/\");\n\t\t\t\n\t\t\t// Create the user\n\t\t\tresetPassword(driver, env);\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tExtentTest test = ExtentTestManager.getTest();\n\t\t\t// Skip test\n\t\t\tSystem.out.println(\"Skipped resetting the password for the user on Beta becuase the boolean was set to false\");\n\t\t\t// Log a skip in the extent report\n\t\t\ttest.log(LogStatus.SKIP, \"<span class='label info'>SKIPPED</span>\", \"<pre>Skipped resetting the password for the user on Beta becuase the boolean was set to false</pre>\");\n\t\t} // end else\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n\n mAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(TAG, \"Email sent.\");\n messageDisplay.setText(\"Reset Email Sent Successfully!\");\n Toast.makeText(ForgotPasswordActivity.this, \"Reset Email Sent Successfully!\", Toast.LENGTH_SHORT).show();\n }\n\n else {\n //display some message here\n messageDisplay.setText(\"User Does Not Exist\");\n Toast.makeText(ForgotPasswordActivity.this, \"User Does Not Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void verifyDeAndReactivateUser(){\n\t\tReport.createTestLogHeader(\"Multi User Multi View\", \"Verifies whether Deactivate link is displayed for active users in view users landing page\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"DeleteAndReactivate\");\n\t\tnew LoginAction()\t\t\t \t\t\t \n\t\t.BgbloginDetails(userProfile)\n\t\t.BgbverifyAfterLogin();\n\t\tnew MultiUserMultiViewAction()\n\t\t.manageUsersLink()\t;\t \n\t//\t.verifyReAndDeActiavtionUser(userProfile);\t\t\t \t\t\t \n\t}", "public String resetPassword(){\n\t\twrongDetails=true;\r\n\t\treturn \"login?faces-redirect=true\";\r\n\t}", "@Override\n public void onClick(View view) {\n final EditText emailField = new EditText(view.getContext());\n AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());\n passwordResetDialog.setIcon(android.R.drawable.ic_dialog_email)\n .setTitle(\"Reset password\")\n .setMessage(\"Enter your email to receive the reset link\")\n .setView(emailField)\n .setNegativeButton(\"NO\",null)\n .setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n /**\n * Confirms password reset request\n * Sends an email to user to reset password\n * @param dialogInterface interface\n * @param i index\n */\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Extract email address\n String mail = emailField.getText().toString();\n if (mail.length()==0){\n Toast.makeText(LogInActivity.this, \"Enter a valid email\", Toast.LENGTH_SHORT).show();\n return;\n }\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n /**\n * Displays toast when password reset email is successfully sent\n * @param aVoid VarArgs\n */\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n /**\n * Displays email when password reset email fails to send\n * @param e exception\n */\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n passwordResetDialog.create().show();\n }", "public void onResetPassword(final String email) {\n eventBus.setLoadingProgress(0, Storage.MSGS.loggingVerifyAccount());\n loginService.getBusinessUserByEmail(email.trim(), new SecuredAsyncCallback<BusinessUserDetail>(eventBus) {\n @Override\n public void onSuccess(final BusinessUserDetail user) {\n if (user == null) {\n eventBus.setErrorMessage(Storage.MSGS.wrongEmailWhenReseting());\n return;\n }\n if (user.isVerified()) {\n eventBus.setLoadingProgress(30, null);\n loginService.resetPassword(user.getUserId(), new SecuredAsyncCallback<String>(eventBus) {\n @Override\n public void onSuccess(String newPassword) {\n sendEmailWithNewPassword(user, newPassword);\n }\n });\n }\n }\n\n @Override\n protected void onServiceFailure(Throwable caught, int errorResponse, String errorId) {\n super.onServiceFailure(caught, errorResponse, errorId);\n eventBus.hideView();\n }\n });\n }", "public String getForgottenPasswordAnswer2() {\n\t\treturn forgottenPasswordAnswer2;\n\t}", "@Test\n public void withRightDates() {\n Assert.assertEquals(createUserChecking.creationChecking(randomLogin,email, By.xpath(\"//div[@align='center']\")),\"Created user \"+randomLogin+\" with an access level of reporter\\n[ Proceed ]\");\n log.info(\"login \"+randomLogin+\" and email \"+email+\" were typed\");\n\n passConfirm=mailRuReader.letterActivation();\n String randomPassword=random.getNewRandomName();\n Assert.assertEquals(passConfirm.passwordEntering(randomPassword),\"Password successfully updated\\n\" +\"Operation successful.\\n\" + \"[ Proceed ]\");\n log.info(\"Password \"+randomPassword+ \" was successfully typed and user was created correctly\");\n mailRuReader.letterDeleting();\n\n }", "private boolean doCheckNewPassword() {\n\t\tif (!newPassword.equals(confirmPassword)) return false;\n\t\trecord(\"new password checked\");\n\t\treturn true;\n\t}", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(Resetpasswordpage.this, \"Email Sent\", Toast.LENGTH_SHORT).show();\n Intent resetpasswordintent = new Intent(Resetpasswordpage.this, Loginpage.class);\n startActivity(resetpasswordintent);\n //close activity when done\n finish();\n } else {\n //otherwise create new toast (error)\n Toast.makeText(Resetpasswordpage.this, \"Please enter correct details\", Toast.LENGTH_SHORT).show();\n }\n }", "public void handleForgotPassword() {\n\t\tAlert alert = new Alert(AlertType.WARNING);\n\t\talert.initOwner(mainApp.getPrimaryStage());\n\t\talert.setTitle(\"Under building\");\n\t\talert.setHeaderText(\"Under construction.\");\n\t\talert.setContentText(\"At the moment you can not get your password. Thanks for being patient.\");\n\t\talert.showAndWait();\n\t}", "boolean additionalPayerInfoVerification(final String email) {\n return Log.altVerify(email, lblEMail().getText(), true, \"E-mail address\");\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n String action = request.getParameter(\"action\");\n if(action != null && action.equalsIgnoreCase(\"confirm\")){\n String email = request.getParameter(\"changed-email\");\n String password = request.getParameter(\"changed-password\");\n String pswdConfirm = request.getParameter(\"changed-confirmPassword\");\n \n System.out.println(\"Mail: \" + email + \";\\nPassword: \" + password);\n \n if(password.equals(pswdConfirm)){\n ModelloUtente utente = daoUtente.selectUserByEmail(email);\n String hexPassword = \"\";\n try {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n byte[] newPassword = md.digest(password.getBytes());\n password = newPassword.toString();\n hexPassword = new String(Hex.encodeHex(newPassword));\n \n System.out.println(\"Stringa in esadecimale \" + hexPassword);\n } catch (NoSuchAlgorithmException ex) {\n }\n \n if(hexPassword.length() != 0){\n utente.setPassword(hexPassword);\n daoUtente.updateUserPasswordByUserID(utente);\n System.out.println(\"Conferma, modifica password avvenuta\");\n request.setAttribute(\"changedPassword\", 1);\n RequestDispatcher view = request.getRequestDispatcher(HOME_PAGE);\n view.forward(request, response);\n }else{\n System.out.println(\"Errore: problema durante la conversione della password in esadecimale\");\n String basePage = request.getHeader(\"referer\");\n response.sendRedirect(basePage);\n }\n }else{\n System.out.println(\"Errore: le due password non corrispondono\");\n String basePage = request.getHeader(\"referer\");\n response.sendRedirect(basePage);\n }\n }else{\n String basePage = request.getHeader(\"referer\");\n\n String email = request.getParameter(\"resetting-email\");\n String link = \"http://localhost:8080/ProgettoWeb/PasswordResetRequest?token=\";\n\n Key key = MacProvider.generateKey();\n\n Claims claims = Jwts.claims().setSubject(email);\n claims.put(\"mailID\", email);\n Date expire = new Date();\n expire.setTime(expire.getTime() + (tokenExpiration * 60 * 60 * 1000));\n String token = Jwts.builder().setClaims(claims).setExpiration(expire).signWith(SignatureAlgorithm.HS512, key).compact();\n link = link + token;\n Date scadenza = new Date(expire.getTime());\n\n String encodedKey = Base64.getEncoder().encodeToString(key.getEncoded());\n daoUtente.setKey(token, encodedKey);\n\n\n SendEmail.passwordForget(email, link);\n\n /*try (PrintWriter out = response.getWriter()) {\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet PasswordReset</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Servlet PasswordReset at \" + request.getContextPath() + \"</h1>\");\n out.println(\"<p>L'email a cui resettare la password è: \" + email + \"<p>\");\n out.println(\"<p>Il token che ho generato è: \" + token + \"<p>\");\n out.println(\"<p>Il link che invierò è: \" + link + \"<p>\");\n out.println(\"<p>Il link scadrà il: \" + scadenza + \"<p>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }*/\n\n response.sendRedirect(basePage);\n }\n }", "@Test (priority=0)\n\tpublic synchronized void resetPasswordOnQA() throws InterruptedException, IOException, AWTException {\n\t\n\t\tif (resetQA == true)\n\t\t{\n\t\t\n\t\t\tRemoteWebDriver driver = DriverFactory.getInstance().getDriver();\n\t\t\t\n\t\t\t/********************************************************************************\n\t\t\t * \n\t\t\t * CREATE USER ON QA\n\t\t\t * \n\t\t\t ********************************************************************************/\n\t\t\t\n\t\t\t// Environment\n\t\t\tString env = \"QA\";\n\t\t\t\n\t\t\t// Go to QA Secure site\n\t\t\tdriver.get(\"https://secure.mercuryvmpqa.com/\");\n\t\t\t\n\t\t\t// Create the user\n\t\t\tresetPassword(driver, env);\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tExtentTest test = ExtentTestManager.getTest();\n\t\t\t// Skip test\n\t\t\tSystem.out.println(\"Skipped resetting the password for the user on QA becuase the boolean was set to false\");\n\t\t\t// Log a skip in the extent report\n\t\t\ttest.log(LogStatus.SKIP, \"<span class='label info'>SKIPPED</span>\", \"<pre>Skipped resetting the password for the user on QA becuase the boolean was set to false</pre>\");\n\t\t} // end else\n\t\t\n\t}", "public void sendForgotPasswordDetails(String emailAddress)\r\n\t{\n\t\tthis.emailAddress.clear();\r\n\t\t//send email address\r\n\t\tthis.emailAddress.sendKeys(emailAddress);\r\n\t\t//click on continue button\r\n\t\tcontinueBtn.click();\r\n\t}", "@PostMapping(\"/resetpassword\")\n\tpublic int oldPasswordCheck(@RequestParam(\"empid\") int empid,\n\t\t\t@RequestParam(\"newpassword\") String newpassword,\n\t\t\t@RequestParam(\"oldpassword\") String oldpassword)\n\t\t\t\t\tthrows InvalidPasswordException {\n\n\t\tint resetStatus = 0;\n\t\tEmployee employee = new Employee();\n\t\temployee.setId(empid);\n\t\temployee.setPassword(oldpassword);\n\t\tvalidator.passwordValidation(employee);\n\t\temployee.setPassword(newpassword);\n\t\tresetStatus = authenticationDAO.resetPassword(employee);\n\t\treturn resetStatus;\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Extract email address\n String mail = emailField.getText().toString();\n if (mail.length()==0){\n Toast.makeText(LogInActivity.this, \"Enter a valid email\", Toast.LENGTH_SHORT).show();\n return;\n }\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n /**\n * Displays toast when password reset email is successfully sent\n * @param aVoid VarArgs\n */\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n /**\n * Displays email when password reset email fails to send\n * @param e exception\n */\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public String getResetPassword() { return password; }", "public void v_Verify_Guest12_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyAuditTrailSearch() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyAuditTrail(userProfile);\n\t\t\t\t \n\t\t\t\t}", "@Test\r\n\tpublic void testIsWeakPassword()\r\n\t{\r\n\t\ttry{\r\n\t\t\tassertTrue(PasswordCheckerUtility.isValidPassword(\"Light@6\"));\r\n\t\t}\r\n\t\tcatch(WeakPasswordException e)\r\n\t\t{\r\n\t\t\tassertTrue(\"Successfully threw a WeakPasswordExcepetion\",true);\r\n\t\t}\r\n\t}", "public static void sendResetPassword(Context context, String email) {\n FirebaseAuth.getInstance().sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) { // Reset email password successfully sent\n Log.d(\"RecipeFinderAuth\", \"Email Sent!\");\n Toast.makeText(context, \"Email Sent!\", Toast.LENGTH_SHORT).show();\n ((AppCompatActivity)(context)).finish();\n } else { // Failed to send reset email password\n Toast.makeText(context, \"Failed to Send Email!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }", "@Override\r\n\tpublic String forgotPassword(String emailId) {\r\n\t\tlogger.debug(\"***AdminServiceImpl::forgotPassword() is started***\");\r\n\t\tAppAccountEntity entity = appAccRepository.findByEmail(emailId);\r\n\t\tif (entity == null) {\r\n\t\t\tlogger.debug(emailId + \" email is not registered!!\");\r\n\t\t\treturn appProperties.getProperties().get(AppConstants.EMAIL_NOT_REG);\r\n\t\t} else {\r\n\t\t\tif (entity.getActiveSw().equals(\"N\")) {\r\n\t\t\t\tlogger.debug(emailId + \" account not in active\");\r\n\t\t\t\treturn appProperties.getProperties().get(AppConstants.ACCOUNT_DE_ACTIVATE_MSG);\r\n\t\t\t} else {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAppAccount appAccountModel = new AppAccount();\r\n\t\t\t\t\tBeanUtils.copyProperties(entity, appAccountModel);\r\n\t\t\t\t\tappAccountModel.setPassword(PasswordUtils.decrypt(appAccountModel.getPassword()));\r\n\t\t\t\t\tlogger.debug(\"***Password is decryted***\");\r\n\t\t\t\t\tString mailBody = getEmailBodyContent(appAccountModel,\r\n\t\t\t\t\t\t\tappProperties.getProperties().get(AppConstants.FORGOT_PASSWORD_EMAIL_FILE_NAME));\r\n\t\t\t\t\temailUtils.sendEmail(appAccountModel.getEmail(),\r\n\t\t\t\t\t\t\tappProperties.getProperties().get(AppConstants.FORGOT_PASSWORD_EMAIL_SUB), mailBody);\r\n\t\t\t\t\tlogger.debug(\"password is sent to \" + emailId + \" succussfully\");\r\n\t\t\t\t\tlogger.info(\"AdminServiceImpl::forgotPassword() is completed\");\r\n\t\t\t\t\treturn appProperties.getProperties().get(AppConstants.PWD_EMAIL_SENT_SUCC_MSG);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tlogger.error(\"password is failed to sent to \" + emailId);\r\n\t\t\t\t\treturn appProperties.getProperties().get(AppConstants.PWD_EMAIL_SENT_FAIL_MSG);\r\n\t\t\t\t}\r\n\r\n\t\t\t} // else\r\n\r\n\t\t} // top else\r\n\r\n\t}", "public LoginPage verifyWrongPassword() {\n string errorText = driver.findElement(By.id(\"errorMessage\")).text(); \n Assert.equals(\"Ooops, seems you have the wrong credentials there! :(\", errorText);\n return this;\n }", "public void success(ForgotPassword arg0, Response arg1) {\n\t\t\t\tif (arg0 != null) {\n\t\t\t\t\t\n\t\t\t\t\tif (arg0.getStatus() == 400) {\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Your account has already been reset password\", SKToastMessage.ERROR);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (arg0.getStatus() == 200) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Change Password Success\", SKToastMessage.SUCCESS);\n\t\t\t\t\t\tcloseAllActivities();\n\t\t\t\t\t\tstartActivity(new Intent(ChangePasswordActivity.this, SaleTicketActivity.class));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "public boolean mustChangePassword() {\n\t\t\t\t\n\t\t\t\t\tPasswordStatus.Value v = getPasswordStatus();\n\t\t\t\t\tif (v == DatabasePasswordComposite.INVALID || v == DatabasePasswordComposite.FIRST) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tHash algorithm = getAlgorithm();\n\t\t\t\t\tif( CHANGE_OLD_HASH.isEnabled(getContext()) && ( algorithm == null || algorithm.isDeprecated(getContext()))) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif( periodicResetRequired()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif( passwordFailsExceeded()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "public void confirmPasswordRequest() {\n\t\tStreamObserver<BoolValue> responseObserver = new StreamObserver<BoolValue>() {\t//\tUsed for sending orreceiving stream messages\n\t\t\t\n\t\t\t//\tStreamObserver methods\n\t\t\tpublic void onNext(BoolValue boolValue) {\t//\tReceives value from stream\n\t\t\t\tif (boolValue.getValue()) {\n\t\t\t\t\tlogger.info(\"Entered password is correct\");\n\t\t\t\t} else {\n\t\t\t\t\tlogger.info(\"Entered password is incorrect\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpublic void onError(Throwable throwable) {\n\t\t\t\tlogger.info(throwable.getLocalizedMessage());\n\t\t\t}\n\n\t\t\tpublic void onCompleted() {\n\t\t\t\tlogger.info(\"Completed\");\n\t\t\t}\n\t\t};\n\n\t\t\tasyncPasswordStub.validate(ConfirmPasswordRequest.newBuilder()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .setPassword(password)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .setSalt(salt)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .setHashedPassword(hashedPassword)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .build(), responseObserver);\t\n\t}", "public void v_Verify_Guest5_Displayed(){\n\t}", "public boolean reconcilePassword(){\r\n if((signup.getFirstPassword()).equals(signup.getSecondPassword())){\r\n \r\n return true;\r\n \r\n }\r\n else{\r\n \r\n return false;\r\n }\r\n }", "@Test\n void resetPasswordRequest() throws Exception {\n ResetPasswordForm request = mockModel.generateResetPasswordForm();\n\n MvcResult mvcResult = mockMvc.perform(post(PATH + \"reset/password/request\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(asJsonString(request)))\n .andExpect(status().is2xxSuccessful())\n .andExpect(view().name(\"login\"))\n .andExpect(model().attributeExists(\"success\"))\n .andExpect(model().attribute(\"success\", is(\"Email has been send!\")))\n .andReturn();\n\n verify(userService, times(1)).sendEmailWithLinkAndResetPassword(any());\n }", "boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUserFunctionality() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify whether the account status of broker is successfully changed by agent\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t/*deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);*/\n\t\t\t\t\n\t\t\t\t//verify Lookup User functionality\n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.updateAndVerifyStatus(userProfile);\n\t\t}", "boolean hasPassword2();", "private String getSendMailResetPasswordContent(UserForm userForm) {\n return \"\";\n }", "public static URL getUrlForForgotPassword()\r\n {\r\n String strUrl = getBaseURL() + \"account_services/api/1.0/account/forgot_password\";\r\n return str2url( strUrl );\r\n }", "boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;", "private void sendEmailWithNewPassword(final BusinessUserDetail user, final String newPassword) {\n eventBus.setLoadingProgress(60, null);\n ContactUsDetail dialogDetail = new ContactUsDetail();\n dialogDetail.setRecipient(user.getEmail());\n dialogDetail.setMessage(Storage.MSGS.resetPasswordEmail(user.getPersonFirstName(), newPassword));\n dialogDetail.setSubject(Storage.MSGS.resetPasswordEmailSubject());\n mailService.sendMail(dialogDetail, new SecuredAsyncCallback<Boolean>(eventBus) {\n @Override\n public void onSuccess(Boolean result) {\n eventBus.setLoadingProgress(100, Storage.MSGS.resetPasswordInfoStatus());\n }\n });\n }", "@OnClick(R.id.tdk_menerima_kata_sandi)\n public void kirimUlangnkatasandi(){\n resetpassword(email);\n }", "public void resetPass(View view) {\n\n\t\tfinal Firebase myFirebaseRef = new Firebase(\"https://glowing-inferno-4690.firebaseio.com/\");\n\n\t\tfinal EditText resetEmail = (EditText)findViewById(R.id.emailText);\n\n\t\tSystem.out.println(\"EMAIL TO RESET: \" + resetEmail.getText().toString());\n\n\t\tmyFirebaseRef.resetPassword(resetEmail.getText().toString(), new Firebase.ResultHandler() {\n\n\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess() {\n\n\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\"A new password has been emailed to you.\", Toast.LENGTH_LONG).show();\n\t\t\t\tmyFirebaseRef.unauth();\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(FirebaseError firebaseError){\n\n\n\t\t\t\tSystem.out.println(\"FIREBASE ERROR: \" + firebaseError);\n\t\t\t\tSystem.out.println(\"FIREBASE CODE: \" + firebaseError.getCode());\n\t\t\t\tSystem.out.println(\"FIREBASE Details: \" + firebaseError.getDetails());\n\t\t\t\tSystem.out.println(\"FIREBASE Message: \" + firebaseError.getMessage());\n\t\t\t\tSystem.out.println(\"FIREBASE STATIC NAME: \" + FirebaseError.INVALID_EMAIL);\n\n\n\t\t\t\tswitch (firebaseError.getCode()) {\n\t\t\t\t\tcase -18:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\tfirebaseError.getMessage() + \" Try using a different email or resetting your account.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase -24:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\t\"We can't log you in, please check your internet connection.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase -17:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\tfirebaseError.getMessage() + \" Create an account! It's free.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\tfirebaseError.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\n\n\t\t\t}\n\n\n\t\t});\n\n\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }", "@When(\"^User should see Review Confirmation Message$\")\n\tpublic void user_should_see_Review_Confirmation_Message() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getreviewconfirmmsg(), 70);\n\t\treviewConfirmationPageObjects.verifyreviewconfirmation();\n\t}", "@When(\"^I Enter old password, Nominate and confirm new password$\")\n public void i_Enter_old_password_Nominate_and_confirm_new_password() throws Throwable {\n changepassword.enterPwdDetails(PropertyReader.testDataOf(\"change_password\"),PropertyReader.testDataOf(\"new_Password\"),PropertyReader.testDataOf(\"new_Password\"));\n\n //changepassword.enterPwdDetails(PropertyReader.dynamicReadTestDataOf(\"change_password\"),PropertyReader.dynamicReadTestDataOf(\"new_Password\"),PropertyReader.dynamicReadTestDataOf(\"confirm_new_Password\"));\n\n }", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUser() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify updated user details page through Look up user navigation\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\tnew RegistrationAction()\n\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t.verifyThankYouPage()\n\t\t\t\t.clickLoginLink()\n\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t.verifyEmailIdInDb(userProfile);\n\t\t\t\t//verify Lookup User functionality\n*/\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyUpdateUserDetailsPage()\n\t\t\t\t\t.verifyUserAccountInformation(userProfile);\t\t\n\t\t\t\t\t}", "private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }", "@Test\n public void testResetPassword() {\n System.out.println(\"resetPassword\");\n School instance = new School();\n LocalDate dob = new LocalDate(1960, 9, 6);\n Manager m1 = new Manager(\"admin\", \"Lamasia2*\", \"quang\", \"\", \"tran\",\n \"[email protected]\", \"0909941192\", dob, \"hcmc\", null, true);\n instance.addUser(m1);\n instance.resetPassword(m1);\n\n assertEquals(Constants.DEFAULT_PASSWORD, m1.getPassword());\n\n System.out.println(\"PASS ALL\");\n }", "public boolean VerifyOrderDetails_OrderConfirmation(){\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PAYMENTCONFIRMATION_LABEL).isDisplayed();\n\tif(flag){extentLogs.passWithCustom(\"VerifyOrderDetails\", \"PAYMENTCONFIRMATION_LABEL\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERNUMBER_LABEL).isDisplayed();\n\t\tif(flag){\n\t\t\textentLogs.passWithCustom(\"VerifyOrderDetails\", \"OrderNumberLabelIsDisplayed\");\n\t\t}else{extentLogs.fail(\"VerifyOrderDetails\", \"OrderNumberLabelIsNotDisplayed\");}\n\t}else{extentLogs.fail(\"VerifyOrderDetails\", \"PAYMENTCONFIRMATION_LABEL\");}\n\t\n\treturn flag;\n\t}", "public void sendResetEmail(User user, HttpServletRequest request) {\r\n try {\r\n VerificationToken token = new VerificationToken(user);\r\n verificationTokenRepo.save(token);\r\n\r\n String appUrl = request.getScheme() + Constants.SERVER_URL + \"register/reset-password/\" + token.getToken();\r\n\r\n UserDTO userDTO = new UserDTO();\r\n userDTO.setFirstName(user.getFirstName());\r\n userDTO.setUsername(user.getUsername());\r\n\r\n // Build message body\r\n Map<String, Object> modelObject = null;\r\n modelObject = ImmutableMap.of(\r\n \"name\", userDTO.getFirstName(),\r\n \"appUrl\", appUrl\r\n );\r\n\r\n // Send email with required info\r\n sendMimeEmailWithFreemarker(Constants.PASSWORDSUBJECT, Constants.PASSWORDTEMPLATE,\r\n userDTO, modelObject);\r\n } catch (UnsupportedEncodingException | CannotSendEmailException | URISyntaxException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void forgotPasswordDialog() {\n mForgotPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);\n builder.setTitle(\"Reset Password\");\n final EditText emailInput = new EditText(LoginActivity.this);\n emailInput.setHint(\"Enter email of forgotten account.\");\n emailInput.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(emailInput);\n builder.setPositiveButton(\"Send Reset Instructions\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String email = emailInput.getText().toString().trim();\n if (email.isEmpty()) {\n Toast.makeText(LoginActivity.this, \"Please type an email\", Toast.LENGTH_SHORT).show();\n } else {\n mAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LoginActivity.this, \"Password reset instructions sent\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(LoginActivity.this, \"Invalid email entered. Please try again\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n }\n });\n\n }", "public void v_Verify_Guest7_Displayed(){\n\t}", "public void v_Verify_Guest11_Displayed(){\n\t}", "private void showForgotPasswordDialog() {\n LayoutInflater inflater = LayoutInflater.from(this);\n View dialogView = inflater.inflate(R.layout.dialog_forgot_password, null);\n final TextInputEditText emailEditText = dialogView.findViewById(R.id.dialog_forgot_password_value_email);\n //endregion\n\n //region Building the dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.password_reset);\n\n builder.setPositiveButton(R.string.reset, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n String email = emailEditText.getText().toString();\n\n mFirebaseAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(SignInActivity.this, R.string.sent_reset_password_email, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, R.string.failed_to_reset_email, Toast.LENGTH_SHORT).show();\n }\n }\n });\n dialog.dismiss();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n //endregion\n\n builder.setView(dialogView);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void verifyServerCn(boolean yesno);", "private void sendEmailVerification() {\n final FirebaseUser user = mAuth.getCurrentUser();\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // [START_EXCLUDE]\n // Re-enable button\n\n if (task.isSuccessful()) {\n Toast.makeText(LoginCombActivity.this,\n \"Verification email sent to \" + user.getEmail(),\n Toast.LENGTH_SHORT).show();\n } else {\n Log.e(TAG, \"sendEmailVerification\", task.getException());\n Toast.makeText(LoginCombActivity.this,\n \"Failed to send verification email.\",\n Toast.LENGTH_SHORT).show();\n }\n // [END_EXCLUDE]\n }\n });\n // [END send_email_verification]\n }" ]
[ "0.69018114", "0.67840016", "0.66576755", "0.66516966", "0.6380102", "0.6357227", "0.6349867", "0.62461096", "0.6211311", "0.60953695", "0.60814494", "0.6079711", "0.6068159", "0.6028526", "0.5995445", "0.5974284", "0.5922682", "0.58953863", "0.58573526", "0.5841018", "0.58175075", "0.5769542", "0.5748279", "0.5727458", "0.5712581", "0.5705774", "0.5697987", "0.5682255", "0.5626584", "0.5622625", "0.5600039", "0.55990875", "0.55846673", "0.55839294", "0.5582375", "0.5577361", "0.557198", "0.5565144", "0.55622303", "0.5542033", "0.55391496", "0.5519858", "0.55078524", "0.54844534", "0.5482972", "0.5482427", "0.5481092", "0.5480084", "0.54516894", "0.5447218", "0.54405636", "0.5439775", "0.5434149", "0.54339993", "0.5418718", "0.54048365", "0.5404523", "0.5400499", "0.538718", "0.53843427", "0.5383079", "0.53757346", "0.53714263", "0.5369413", "0.5359419", "0.5357553", "0.5356679", "0.53533983", "0.53510374", "0.5347955", "0.5343342", "0.5332006", "0.5319373", "0.5315186", "0.5313991", "0.53131837", "0.53116715", "0.5311618", "0.5301203", "0.5291107", "0.52905923", "0.52837634", "0.5283314", "0.5281622", "0.527728", "0.5274656", "0.5274109", "0.527385", "0.5270224", "0.5269851", "0.52677566", "0.52646565", "0.5262045", "0.5258328", "0.52567446", "0.52528006", "0.5252266", "0.52443326", "0.5243581", "0.52426624" ]
0.747372
0
TS_Broker_Agent_47_E2E To verify whether the Partner service agent is able to do view bill journey by impersonating the partner and check the E2E flow
@Test(groups ={Slingshot,Regression,CsaAgent}) public void verifyImpersonateUserLink() throws Exception { Report.createTestLogHeader("CSA Journey", "To verify the Password Reset functionality"); UserProfile userProfile = new TestDataHelper().getUserProfile("PSABroker"); SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile("ViewBillPartner"); //deregisterinBgbonline(userProfile); //Register a user /*new PartnerServiceAgentAction() .navigateToPSARegistration() .clickRegisteraUser(userProfile); new SapCrmAction() .loginDetails(crmuserProfile) .searchByAccountId(crmuserProfile, userProfile); new RegistrationAction() .openEncryptURL(userProfile) .fillRegistrationDetails(userProfile) .verifyThankYouPage() .clickLoginLink() .verifyAuditEntry(userProfile) .verifyEmailIdInDb(userProfile);*/ //verify Lookup User functionality new PartnerServiceAgentAction() .navigateToPSARegistration() .verifyFindUser(userProfile) .verifyImpersonateLink(smrProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUserFunctionality() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify whether the account status of broker is successfully changed by agent\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t/*deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);*/\n\t\t\t\t\n\t\t\t\t//verify Lookup User functionality\n\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.updateAndVerifyStatus(userProfile);\n\t\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentLookUpUser() throws Exception {\n\t\t\tReport.createTestLogHeader(\"CSA\", \"To verify updated user details page through Look up user navigation\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t//Register a user \n\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\tnew RegistrationAction()\n\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t.verifyThankYouPage()\n\t\t\t\t.clickLoginLink()\n\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t.verifyEmailIdInDb(userProfile);\n\t\t\t\t//verify Lookup User functionality\n*/\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyUpdateUserDetailsPage()\n\t\t\t\t\t.verifyUserAccountInformation(userProfile);\t\t\n\t\t\t\t\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyRBPAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the RBP user is able to perform journey\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifyRBPuserjourneyverification();\n\t\n\t}", "public boolean isTransferRequestValid(Customer fromCustomer,Customer toCustomer,RewardCurrency fromRewardCurrency, RewardCurrency toRewardCurrency,TransferPointSetting transferPointSetting) throws InspireNetzException {\n\n MessageWrapper messageWrapper = generalUtils.getMessageWrapperObject(\"\",fromCustomer.getCusLoyaltyId(),\"\",\"\",\"\",fromCustomer.getCusMerchantNo(),new HashMap<String, String>(0),MessageSpielChannel.ALL,IndicatorStatus.YES);\n\n // Check if the customer status is active\n if ( fromCustomer.getCusStatus() != CustomerStatus.ACTIVE ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> The fromCustomer account is not active\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_FROM_CUSTOMER_INACTIVE);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(), CustomerActivityType.TRANSFER_POINT, \"Failed , source customer not active\", fromCustomer.getCusMerchantNo(), \"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_PARTY_NOT_ACTIVE);\n\n }\n\n\n // Check if the toCustomer is active\n if ( toCustomer.getCusStatus() != CustomerStatus.ACTIVE ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> The toCustomer account is not active\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_TO_CUSTOMER_INACTIVE);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , destination customer not active\",fromCustomer.getCusMerchantNo(),\"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_PARTY_NOT_ACTIVE);\n\n }\n\n\n // Check if the both fromCustomer and toCustomer are same\n if ( fromCustomer.getCusCustomerNo().longValue() == toCustomer.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> sourceCustomer and destCustomer cannot be same\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_CUSTOMERS_SAME);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , source and destination customers are same\",fromCustomer.getCusMerchantNo(),\"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_OPERATION_NOT_ALLOWED);\n\n }\n\n\n // Check if the transferPointSetting is valid\n if ( transferPointSetting == null ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> No TransferPointSetting object found\");\n\n messageWrapper.setSpielName(MessageSpielValue.GENERAL_ERROR_MESSAGE);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , no transfer point setting found\",fromCustomer.getCusMerchantNo(),\"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_OPERATION_FAILED);\n\n }\n\n\n // Check the validity for the location compatibility\n if ( fromCustomer.getCusLocation().longValue() != toCustomer.getCusLocation().longValue() &&\n transferPointSetting.getTpsTransferCompatibility() != TransferPointSettingCompatibility.ACROSS_LOCATIONS ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> Transfer request across locations are not allowed\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_ACROSS_LOCATION);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , transfer request across mega brands not allowed\",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_OPERATION_NOT_ALLOWED);\n\n\n }\n\n\n // check if the customer tier is valid\n boolean isTierValid = isCustomerTierValid(fromCustomer);\n\n // If not valid, then throw exception\n if ( !isTierValid ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> Customer tier does not allow transfer\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_CUSTOMER_TIER_NOT_VALID);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , customer tier doesn't allow transfer \",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_TRANSFER_REQUEST_TIER_NOT_VALID);\n\n }\n\n\n\n\n // Check if the customer has reached max transfer limit\n boolean isMaxTransferValid = isMaxTransfersValid(fromCustomer,transferPointSetting);\n\n // Check if the max transfer condition is valid\n if ( !isMaxTransferValid ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> Customer exceeded maximum limit\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_MAX_TRANSFER_LIMIT_REACHED);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , customer exceeded maximum transfer limit \",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_MAX_TRANSFER_POINT_COUNT_EXCEEDED);\n\n }\n\n\n // Check if the parties involved are part of a linking\n boolean isPartOfLinking = isCustomersLinked(fromCustomer, toCustomer);\n\n // Check if the customers are part of linking\n if ( isPartOfLinking ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> From customer and to customer are linked\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_CUSTOMER_LINKED);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , source and destination customers are linked \",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_TRANSFER_PARTIES_LINKED);\n\n }\n\n\n // Check if the customer\n return true;\n\n }", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\tpublic void verifyPartnerServiceAgentRegisterUser() throws Exception {\n\t\t\tReport.createTestLogHeader(\"PSA Journey\", \"To verify whether the Partner service agent is able to register a Broker through Partner service agent journey\");\n\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"SlingshotCrmDetails\"); \n\t\t\tnew PartnerServiceAgentAction()\n\t\t\t.navigateToPSARegistration()\n\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t/*new SapCrmAction()\n\t\t\t .loginDetails(crmuserProfile)\n\t\t\t .searchByAccountId(crmuserProfile, userProfile);*/\n\t\t\tnew RegistrationAction()\n\t\t\t.openEncryptURL(userProfile)\n\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t.verifyThankYouPage()\n\t\t\t.clickLoginLink()\n\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t.verifyEmailIdInDb(userProfile);\n\t\t\t}", "@Test(groups=\"SMR1137\")\r\n\tpublic void smr1137(){\r\n\t\ttry {\r\n\t\t\t//final String firstName=testDataOR.get(\"mono_first_name\"),lastName=testDataOR.get(\"mono_last_name\"); \r\n\t\t\t//login(\"URLEportal\",testDataOR.get(\"mono_user_login\"),firstName,lastName);\r\n\t\t\teportalCust=testDataOR.get(\"customer\");\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEportal\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t//login(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t/*logger.info(\"SMR1137 execution started\");\r\n\t\t\tfinal String customerName=testDataOR.get(\"customer\");\r\n\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 1 :\");\r\n\t\t\tlogger.info(\"Access eportal with superuser\");\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 2,3,4:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Disable ‘ePayment’ module and validate\r\n\t\t\tlogger.info(\"Step 5:\");\r\n\t\t\tdisableModNVal(\"ep_ckbx_id\", EPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Disable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tdisableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Access ePortal with a superuser and select customer\r\n\t\t\t//In Store Payment menu should not be available\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tAssert.assertFalse(selUtils.isElementPresentCommon(\"instorepay_tab_xpath\"),INSTOREPAY+\" menu is available\");\r\n\t\t\tlogger.info(\"In store payment menu is not available\");\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 8,9:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Enable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 10\");\r\n\t\t\tenableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\r\n\t\t\t\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 11\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);*/\r\n\t\t\tlogger.info(\"SMR1137 execution started\");\r\n\t\t}catch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "private TransferPointRequest checkTransferRequestEligibility(TransferPointRequest transferPointRequest) {\n Customer fromAccount = transferPointRequest.getFromCustomer();\n\n //get destination account\n Customer toAccount = transferPointRequest.getToCustomer();\n\n //check if account is linked\n transferPointRequest = isAccountLinked(transferPointRequest);\n\n //set request customer no as from account customer no\n transferPointRequest.setRequestorCustomerNo(fromAccount.getCusCustomerNo());\n\n //if accounts are not linked , requestor is eligible for transfer\n if(!transferPointRequest.isAccountLinked()){\n\n //set transfer eligibility to ELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n } else {\n\n //if linked , get the transfer point settings\n TransferPointSetting transferPointSetting = transferPointRequest.getTransferPointSetting();\n\n //check redemption settings\n switch(transferPointSetting.getTpsLinkedEligibilty()){\n\n case TransferPointSettingLinkedEligibity.NO_AUTHORIZATION:\n\n //if authorization is not needed set eligibity to ELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.PRIMARY_ONLY:\n\n //check the requestor is primary\n if(!transferPointRequest.isCustomerPrimary()){\n\n //if not primary , then set eligibility to INELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.INELIGIBLE);\n\n } else {\n\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n }\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.SECONDARY_WITH_AUTHORIZATION:\n\n //if customer is secondary , set eligibility to APRROVAL_NEEDED and set approver\n //and requestor customer no's\n if(!transferPointRequest.isCustomerPrimary()){\n\n //set eligibility status as approval needed\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.APPROVAL_NEEDED);\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getParentCustomerNo());\n\n } else {\n\n //set eligibility to eligible\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n }\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.ANY_ACCOUNT_WITH_AUTHORIZATION:\n\n //set eligibility to approval needed\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.APPROVAL_NEEDED);\n\n if(transferPointRequest.isCustomerPrimary()){\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getChildCustomerNo());\n\n } else {\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getParentCustomerNo());\n\n }\n\n return transferPointRequest;\n\n }\n }\n\n return transferPointRequest;\n\n }", "public void v_Verify_Guest2_Displayed(){\n\t}", "@Then(\"the Booking page shows correct booking details\")\n public void bookingpage_verify_booking_details(){\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyRPAccessJourneys() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the RB user is able to perform journeys\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.bgbloginDetails(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.ManageAccountLink(userProfile)\n\t\t.verifyRPuserjourneyverification();\n\t\n\t}", "@PlanBody\n public boolean body(){\n ICenterService ser = agent.getComponentFeature\n (IRequiredServicesFeature.class).searchService(ICenterService.class,RequiredServiceInfo.SCOPE_GLOBAL).get();\n\n ser.collectBallot(voter).addResultListener(new IResultListener<Boolean>() {\n @Override\n public void exceptionOccurred(Exception exception) {\n exception.printStackTrace();\n System.out.println(exception);\n }\n @Override\n public void resultAvailable(Boolean result) {\n System.out.println(voter.getId()+ \" submit result: \"+result);\n }\n });\n return true;\n }", "public void verifyPassivate() {\n // TODO - How to test the EJB passivate?\n throw new RuntimeException(\"Test not implemented yet.\");\n }", "public void waitingForPartner();", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "@Then(\"^I can see Journey Details$\")\n public void iCanSeeJourneyDetails() throws Throwable {\n throw new PendingException();\n }", "public void v_Verify_Guest12_Displayed(){\n\t}", "@Test(priority = 2)\n\tpublic void accountPlan() throws InterruptedException {\n\t\t// log.info(\"Landed on Give Recog page\");\n\t\tselectAccountPlanSideNavbar();\n\t\tThread.sleep(1000L);\n\t\tvalidateBillingPageAssertion();\n\t\tlog.info(\"Testcase-1 passed since application landed on Manage page and Assertion passed\");\n\t}", "public boolean findAgentExistForServicePoint(long servicePointId);", "@Test\n public void testRBIPaymentStrategy() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n /***\n * Create loan product with RBI strategy\n */\n final Integer loanProductID = createLoanProduct(\"100\", \"0\", LoanProductTestBuilder.RBI_INDIA_STRATEGY);\n Assertions.assertNotNull(loanProductID);\n\n /***\n * Apply for loan application and verify loan status\n */\n final String savingsId = null;\n final String principal = \"12,000.00\";\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanID = applyForLoanApplicationWithPaymentStrategy(clientID, loanProductID, null, savingsId, principal,\n LoanApplicationTestBuilder.RBI_INDIA_STRATEGY, collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"3200\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n /***\n * Make payment for installment #1\n */\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"3200\"), loanID);\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"0.00\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n /***\n * Verify 2nd and 3rd repayments dues before making excess payment for installment no 2\n */\n HashMap secondInstallment = loanSchedule.get(2);\n HashMap thirdInstallment = loanSchedule.get(3);\n\n validateNumberForEqual(\"3200\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"3200\", String.valueOf(thirdInstallment.get(\"totalOutstandingForPeriod\")));\n\n validateNumberForEqual(\"3000\", String.valueOf(secondInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"3100\", String.valueOf(thirdInstallment.get(\"principalOutstanding\")));\n\n /***\n * Make payment for installment #2\n */\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3200\"), loanID);\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n /***\n * Verify 2nd and 3rd repayments after making excess payment for installment no 2\n */\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0.00\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n /***\n * According to RBI Excess payment should go to principal portion of next installment, but as interest\n * recalculation is not implemented, it wont make any difference to schedule even though if we made excess\n * payment, so excess payments will behave the same as regular payment with the excess amount\n */\n thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"3200\", String.valueOf(thirdInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"3100\", String.valueOf(thirdInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"0\", String.valueOf(thirdInstallment.get(\"principalPaid\")));\n validateNumberForEqual(\"0\", String.valueOf(thirdInstallment.get(\"interestPaid\")));\n validateNumberForEqual(\"100.00\", String.valueOf(thirdInstallment.get(\"interestOutstanding\")));\n\n /***\n * Make payment with due amount of 3rd installment on 4th installment date\n */\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"3200\"), loanID);\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n\n /***\n * Verify overdue interests are deducted first and then remaining amount for interest portion of due installment\n */\n thirdInstallment = loanSchedule.get(3);\n HashMap fourthInstallment = loanSchedule.get(4);\n\n validateNumberForEqual(\"100\", String.valueOf(thirdInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"100\", String.valueOf(thirdInstallment.get(\"principalOutstanding\")));\n\n validateNumberForEqual(\"2900\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"100\", String.valueOf(fourthInstallment.get(\"interestPaid\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"interestOutstanding\")));\n\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"3000\"), loanID);\n\n /***\n * verify loan is closed as we paid full amount\n */\n loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanAccountIsClosed(loanStatusHashMap);\n\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n String string0 = EWrapperMsgGenerator.managedAccounts(\"autionImbalance\");\n assertEquals(\"Connected : The list of managed accounts are : [autionImbalance]\", string0);\n }", "@Ignore\n\t@Test\n\tpublic void testAgentAccepts() {\n\t\tparty.connect(connection);\n\t\tparty.notifyChange(settings);\n\n\t\tBid bid = makeBid(\"1\", \"1\");// best pssible\n\t\tparty.notifyChange(new ActionDone(new Offer(otherparty, bid)));\n\t\tparty.notifyChange(new YourTurn());\n\t\tassertEquals(1, connection.getActions().size());\n\t\tassertTrue(connection.getActions().get(0) instanceof Accept);\n\n\t}", "boolean hasAdvertisingPartner();", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void v_Verify_Guest11_Displayed(){\n\t}", "@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyAuditTrailSearch() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyAuditTrail(userProfile);\n\t\t\t\t \n\t\t\t\t}", "@Override\n public void preVerify() throws Exception{\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \"Validating Input File Parameters.\");\n validateInputParams();\n // Validate OIM managed server is up and running. \n try{\n OIMClient client = getOIMClient();\n // This step is done as client.login migth not throw LoginException based on authenticator configured control param.\n client.getService(SchedulerService.class).getStatus();\n }catch(Exception e){\n throw new Exception(\"Either OIM server is not running or OIM input parameters are incorrect. Please verify values for \" +\n \"[OIM_WLS_MANAGED_SERVER_HOST, OIM_WLS_MANAGED_SERVER_PORT, OIM_ADMIN_USERNAME, OIM_ADMIN_USER_PASSWORD]\");\n }\n // TODO Validate IT resource configuration\n validateITResource();\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \"PreVerify Validation Successful.\");\n }", "@Then(\"Assert the success of Access & exfiltrate data within the victim's security zone\")\npublic void assaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "@Test\n public void creditApproved() throws Exception {\n Application app = new Application();\n app.setName(\"phil garfield\");\n app.setCreditScore(600);\n Offer offer = new Offer();\n offer.setApplication(app);\n\n Application result = service.operation(\"checkCredit\").sendInOut(offer).getContent(Application.class);\n\n // validate the results\n Assert.assertTrue(result.isApproved());\n }", "@Test\n\tpublic void onholdToConfirmSEPA() throws Exception {\n\t\ttry {\n\t\t\t// Launch the browser and load the default URL\n\t\t\tUtility.initConfiguration();\n\t\t\tThread.sleep(3000);\n\t\t\t// Login to back end and check payment method is enabled or disabled\n\t\t\tUtility.wooCommerceBackEndLogin();\n\t\t\tThread.sleep(3000);\n\t\t\tElementLocators element = PageFactory.initElements(driver, ElementLocators.class);\n\t\t\t// Title for HTML report\n\t\t\ttest = extend.createTest(\"Vendor script execution for 'DIRECT_DEBIT_SEPA' onhold to confirm\");\n\t\t\t// Steps\n\t\t\tActions actions = new Actions(driver);\n\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\tThread.sleep(3000);\n\t\t\telement.WooCommerce_Settings.click();\n\t\t\telement.Payment_Tab.click();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Display.click();\n\t\t\tif (!element.Sepa_Enable_Payment_Method_Checkbox.isSelected()) {\n\t\t\t\telement.Sepa_Enable_Payment_Method_Checkbox.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t\t// Read the order completion status\n\t\t\tString OrderCompletionStatus = element.Sepa_Order_Completion_Status_Selectbox.getText();\n\t\t\tThread.sleep(3000);\t\t\t\n\t\t\t// On-hold enabled\n\t\t\tActions action = new Actions(driver);\n\t\t\tThread.sleep(3000);\n\t\t\tWebElement onhold = element.Sepa_Onhold_Payment_Action_Selectbox;\n\t\t\tThread.sleep(5000);\n\t\t\taction.click(onhold).sendKeys(\"Authorize\", Keys.DOWN, Keys.ENTER).build().perform();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Save_Changes.click();\n\t\t\tThread.sleep(3000);\n\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\tThread.sleep(3000);\n\t\t\tUtility.wooCommerceCheckOutProcess();\n\t\t\tThread.sleep(4000);\n\t\t\t// Read the data from excel sheet\n\t\t\tMap<String, String> UserData = new HashMap<String, String>();\n\t\t\tUserData = Data.ExcelReader_PaymentMethods();\n\t\t\t// Check whether payment method is displayed in checkout page\n\t\t\tif (element.Sepa_Label.isDisplayed() == true) {\n\t\t\t\tif (element.Sepa_Radio_button.isDisplayed()) {\n\t\t\t\t\telement.Sepa_Radio_button.click();\n\t\t\t\t}\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\telement.Sepa_Iban_TextBox.sendKeys(UserData.get(\"SEPAIBAN\"));\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);\n\t\t\t\telement.Place_Order.click();\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\t\t\t\t// After order placed successfully verify Thank you message displayed\n\t\t\t\tString thankyoumessage = element.FE_Thank_You_Page_Text.getText();\n\t\t\t\tif (thankyoumessage.equals(\"Thank you. Your order has been received.\")) {\n\t\t\t\t\tSystem.out.println(\"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.INFO, \"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t// Get the amount from order success page front end\n\t\t\t\t\tString totalOrderAmount = element.OrderDetails_TotalAmount.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\t// Get the TID from order success page front end\n\t\t\t\t\tString TID = element.OrderDetails_Note_TID.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\t\t// Go to card portal and check the tid_status\n\t\t\t\t\tdriver.navigate().to(Constant.novalnetcardportalurl);\n\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\telement.Cardportal_TID_Textbox.sendKeys(TID);\n\t\t\t\t\telement.Cardportal_Submit.click();\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\tString tid_status_value = element.Status_Code.getText();\n\t\t\t\t\tint tid_status = Integer.parseInt(tid_status_value);\n\t\t\t\t\t// Check whether the Tid is 99\n\t\t\t\t\tif (tid_status == 99) {\n\t\t\t\t\t\t// Go to callback execution site and enter vendor script URL\n\t\t\t\t\t\tdriver.navigate().to(Constant.vendorscripturl);\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t\telement.Vendor_Script_Url.sendKeys((Constant.shopfrontendurl) + \"?wc-api=novalnet_callback\");\n\t\t\t\t\t\t// Enter required parameter\n\t\t\t\t\t\telement.Vendor_Id.clear();\n\t\t\t\t\t\telement.Vendor_Id.sendKeys(\"4\");\n\t\t\t\t\t\telement.Vendor_Auth_Code.clear();\n\t\t\t\t\t\telement.Vendor_Auth_Code.sendKeys(\"JyEtHUjjbHNJwVztW6JrafIMHQvici\");\n\t\t\t\t\t\telement.Product_Id.clear();\n\t\t\t\t\t\telement.Product_Id.sendKeys(\"14\");\n\t\t\t\t\t\telement.Tariff_Id.clear();\n\t\t\t\t\t\telement.Tariff_Id.sendKeys(\"30\");\n\t\t\t\t\t\telement.Payment_Type_Edit_Button.click();\n\t\t\t\t\t\tSelect selectpaymenttype = new Select(element.Payment_Type_Selectbox);\n\t\t\t\t\t\tselectpaymenttype.selectByVisibleText(\"DIRECT_DEBIT_SEPA\");\n\t\t\t\t\t\telement.Test_Mode.clear();\n\t\t\t\t\t\telement.Test_Mode.sendKeys(\"1\");\n\t\t\t\t\t\telement.Tid_Payment.clear();\n\t\t\t\t\t\telement.Amount.clear();\n\t\t\t\t\t\telement.Amount.sendKeys(totalOrderAmount);\n\t\t\t\t\t\telement.Currency.clear();\n\t\t\t\t\t\telement.Currency.sendKeys(\"EUR\");\n\t\t\t\t\t\telement.Status.clear();\n\t\t\t\t\t\telement.Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid_Status.clear();\n\t\t\t\t\t\telement.Tid_Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid.clear();\n\t\t\t\t\t\telement.Tid.sendKeys(TID);\n\t\t\t\t\t\telement.Execute_Button.click();\n\t\t\t\t\t\tString callback_message = element.callback_message.getText();\n\t\t\t\t\t\tString callback_message_updated = callback_message.substring(9, callback_message.length());\t\t\t\t\t\t\n\t\t\t\t\t\tif (callback_message\n\t\t\t\t\t\t\t\t.contains(\"Novalnet callback received. The transaction has been confirmed\")) {\n\t\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\t\tdriver.navigate().to(Constant.shopbackendurl);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\t\t\telement.WooCommerce_Orders.click();\n\t\t\t\t\t\t\tString BEOrderStatus = element.Backend_Order_Status.getText();\n\t\t\t\t\t\t\telement.Backend_Order_Number.click();\n\t\t\t\t\t\t\tString BEOrderNotesMessage = element.BE_OrderNotes_Message.getText();\n\t\t\t\t\t\t\t// Verify order completion status is updated in shop back end after the execution\n\t\t\t\t\t\t\tSystem.out.println(\"Order completion status: \" + OrderCompletionStatus);\n\t\t\t\t\t\t\tSystem.out.println(\"Back end order status: \" + BEOrderStatus);\n\t\t\t\t\t\t\tif (OrderCompletionStatus.equals(BEOrderStatus)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop back end\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop back end\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated successfully in shop back end\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated successfully in shop back end\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Verify order completion status is updated in front after the execution\n\t\t\t\t\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\telement.MyAccount_Menu.click();\n\t\t\t\t\t\t\telement.MyAccount_Orders.click();\n\t\t\t\t\t\t\tString FEOrderStatus = element.Frontend_Order_Status.getText();\n\t\t\t\t\t\t\tSystem.out.println(\"Front end order status: \" + FEOrderStatus);\n\t\t\t\t\t\t\tif (OrderCompletionStatus.equals(FEOrderStatus)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop front end\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop front end\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated in shop front end\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated in shop front end\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(\"callback execution message: \" + callback_message_updated);\n\t\t\t\t\t\t\tSystem.out.println(\"Back end order note: \" + BEOrderNotesMessage);\n\t\t\t\t\t\t\tif (callback_message_updated.equals(BEOrderNotesMessage)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DIRECT_DEBIT_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DIRECT_DEBIT_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DIRECT_DEBIT_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DIRECT_DEBIT_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t\ttest.log(Status.ERROR, \"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"TC FAILED: Transaction is already confirmed or not in pending status\");\n\t\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Transaction is already confirmed or not in pending status\");\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close browser\n\t\t\tUtility.closeBrowser();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR: Unexpected error from 'onholdToConfirmSEPA' method\");\n\t\t\ttest.log(Status.ERROR, \"ERROR: Unexpected error from 'onholdToConfirmSEPA' method\");\n\t\t}\n\t}", "public void v_Verify_Guest1_Displayed(){\n\t}", "public void ejbPassivate() {\n testAllowedOperations(\"ejbPassivate\");\n }", "boolean hasAgent();", "@Then(\"^user is on Your Account page$\")\r\n public void user_is_on_Your_Account_page() throws Throwable {\n throw new PendingException();\r\n }", "@Test\n public void testWrongPartner() {\n /* Set up scenario. As one might see, no partnership was registered hence we throw an\n error.\n */\n this.quotes = Controller.getQuotes(desiredBikes, this.dateRange,\n this.customer.getLocation(),\n true);\n Quote chosenQuote = this.quotes.get(0);\n Provider originalProvider = chosenQuote.provider;\n Payment orderInfo = BookingController.bookQuote(chosenQuote, this.customer);\n deliveryService.carryOutPickups(this.bookingDate);\n deliveryService.carryOutDropoffs();\n assertThrows(AssertionError.class, () ->\n {\n this.provider2.registerReturn(orderInfo.getOrderNumber());\n });\n }", "public static void verifyCriteo_inapp_v2_Call(String sheetName) throws Exception {\n\t\n\tString[][] data = read_excel_data.exceldataread(\"Criteo\");\n\t\n\t//readExcelValues.excelValues( sheetName);\n\tString host = data[2][1];\n\tSystem.out.println(host);\n\t\n\tString path = data[3][1];\n\tSystem.out.println(path);\n\tboolean flag = verifyAPICalWithHostandPath(host, path);\n\tif (flag) {\n\t\tSystem.out.println(host + path + \" call is present in Charles session\");\n\t\tlogStep(host + path + \" call is present in Charles session\");\n\n\t} else {\n\t\tSystem.out.println(host + path + \" call is not present in Charles session\");\n\t\tlogStep(host + path + \" call is not present in Charles session\");\n\n\t\tAssert.fail(host + path + \" call is not present in Charles session\");\n\n\t}\n}", "@Test\r\n public void testReceivePallets() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sscc:0614142.0000000010\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(REICEIVE_PALLET_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n assertNotNull(event);\r\n }", "public void v_Verify_Guest5_Displayed(){\n\t}", "public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }", "@Test(enabled=false)\n\tpublic void loanDetails(){\n\t\n\t\ttry{\n\t\tHomePage homePage=new HomePage(driver);\n\t\thomePage.clickOnSignIn();\n\t\t\n\t\tLoginActions loginAction=new LoginActions();\n\t\tloginAction.login(driver, \"username\", \"password\");\n\t\t\n\t\tAccountSummaryPage accountsummary= new AccountSummaryPage(driver);\n\t\taccountsummary.isAccountSummary();\n\t\t\n\t\tAccountActivityPage accountActivity=new AccountActivityPage(driver);\n\t\taccountActivity.clickOnAccountActivity();\n\t\t\n\t\taccountActivity.selectLoanAccount();\n\t\t\n\t\taccountActivity.getRowdata();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getRowdata(), \"RENT\");\t\n\t\t\n\t\tSystem.out.println(accountActivity.getRowdata());\n\t\t\n\t\t// Test case no - AccActShow_04 -no results for credit card are verified under this test only\n\t\n\t\taccountActivity.getCreditCard();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getCreditCard(), \"No Results\");\n\t\t}\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.getMessage();\n\t\t}\n\t}", "@Test\n\tpublic void test03_AcceptARequest(){\n\t\tinfo(\"Test03: Accept a Request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t/*Step Number: 1\n\t\t *Step Name: Accept a request\n\t\t *Step Description: \n\t\t\t- Login as John\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of mary\n\t\t\t- Click on Accept button\n\t\t *Input Data: \n\t\t/*Expected Outcome: \n\t\t\t- The invitation of root, mary is shown on the invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- John is connected to mary and the invitation fades out and is permanently removed from the list\n\t\t\t- Request of root are moving to the top of the gadget if needed*/ \n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_ACCEPT_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\n public void testCreateOnBehalfUser_asTechnologyManager() throws Exception {\n container.login(supplierAdminUser.getKey(), ROLE_TECHNOLOGY_MANAGER);\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), \"abcdef\");\n checkCreatedUser(result, customer, \"abcdef\", false);\n checkUserRoleAssignment(result, ROLE_ORGANIZATION_ADMIN);\n }", "public void v_Verify_Guest3_Displayed(){\n\t}", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "public void verifyBillingWithDeliveryAddress(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Both Billing and Delivery address should be same\");\r\n\t\ttry{\r\n\t\t\tString BillingAddress = driver.findElement(locator_split(\"txtBillingAddress\")).getText().toString();\r\n\t\t\tclick(locator_split(\"btnDeliverytab\"));\r\n\t\t\tString DeliveryAddress = driver.findElement(locator_split(\"txtDeliveryAddress\")).getText().toString();\r\n\t\t\tif(BillingAddress.equals(DeliveryAddress)){\r\n\t\t\t\tSystem.out.println(\"Both Billing and Delivery address are same\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Both Billing and Delivery address are same\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- Billing and Delivery address are not same\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element \"+elementProperties.getProperty(\"txtBillingAddress\")+\" \"+elementProperties.getProperty(\"txtDeliveryAddress\")+\" \"+elementProperties.getProperty(\"btnDeliverytab\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtAddtoCartPage\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "public void v_Verify_Guest4_Displayed(){\n\t}", "@Then(\"^the user can view their booking entry$\")\n public void the_user_can_view_their_booking_entry() throws Throwable {\n throw new PendingException();\n }", "@Test\r\n public void testCommissionPallets() throws Exception\r\n {\r\n String epcToCheck = \"urn:epc:id:sscc:0614141.0000000001\";\r\n XmlObjectEventType event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNull(event);\r\n\r\n runCaptureTest(COMMISSION_PALLETS_XML);\r\n\r\n event = dbHelper.getObjectEventByEpc(epcToCheck);\r\n Assert.assertNotNull(event);\r\n }", "private boolean isPartyApprovedTransfer(TransferPointRequest transferPointRequest) {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n // Check if there is a entry in the LinkingApproval table\n PartyApproval partyApproval = partyApprovalService.getExistingPartyApproval(approver, requestor, PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST, transferPointRequest.getPtrId());\n\n // If the partyApproval is not found, then return false\n if ( partyApproval == null) {\n\n // Log the information\n log.info(\"isPartyApproved -> Party has not approved linking\");\n\n // return false\n return false;\n\n } else {\n\n return transferPointRequest.isApproved();\n }\n\n }", "public void testOneDeposit(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Host sends the teller a new account for the incoming customer\n\t\tteller.msgHereIsAccount(new BankAccount(deposit,0));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\tdeposit.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to deposit 100 dollars, instead it is for \" + teller.pendingTransactions.get(deposit), \n\t\t\t\t100.0, teller.pendingTransactions.get(deposit));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 0.0 dollars, leaving bank.\\\", instead it reads: \" + deposit.log.getLastLoggedEvent().toString(),\n\t\t\t\tdeposit.log.containsString(\"Got 0.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 100.0, instead it has \" + teller.accountsListed.get(0).getBalance(), 100.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "public void v_Verify_Guest7_Displayed(){\n\t}", "@Override\n\tpublic boolean approvePartner(Partner partner) {\n\t\treturn false;\n\t}", "public void v_Verify_Guest10_Displayed(){\n\t}", "@Step\n\tpublic void verify_AWB_and_RWO_pages_after_pipeline_for_the_captured_data(String sChange, String sDisposition, String DpType,String user) throws Throwable{\n\t\t\n\t\tExcelUtils.LoadEllData();\n\t\t\n\n\t\tHashMap<Integer, HashMap<String, String>> sEllData = ProjectVariables.sSubsequentEllData;\n\t\t\n\t\tSerenity.setSessionVariable(\"user\").to(user);\n\n\t\tint iRowCount = sEllData.size();\n\t\tint i =1;\n\t\tboolean blnRows = false;\n\n\t\tfor (i=1;i<=iRowCount;i++){\n\t\t\t\n\t\t\tString sExecution = sEllData.get(i).get(\"Execution\");\n\t\t\t\n\t\t\tif (sExecution.equalsIgnoreCase(\"Y\")){\n\t\t\t\tSerenity.setSessionVariable(\"client\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Client\"));\n\t\t\t\tSerenity.setSessionVariable(\"user\").to(user);\n\t\t\t\tSerenity.setSessionVariable(\"Medicalpolicy\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Medical_Policy\"));\n\t\t\t\tSerenity.setSessionVariable(\"Topic\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Topic\"));\n\t\t\t\tSerenity.setSessionVariable(\"DPkey\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"i_DP Key\"));\n\t\t\t\tSerenity.setSessionVariable(\"Disposition\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Disposition_captured\"));\t\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_Set_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"NotRFP_Presentation\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"Prstn_NotSet_RFP\"));\n\t\t\t\tSerenity.setSessionVariable(\"RFP_Savings\").to(ProjectVariables.sSubsequentEllData.get(i).get(\"O_Savings_NotSet_RFP\"));\n\t\t\t\tString sClientkey=CPWPage.RetrieveTheClientkeyfromgivenClientthroughservice(Serenity.sessionVariableCalled(\"client\").toString());\n\t\t\t\tSerenity.setSessionVariable(\"clientkey\").to(sClientkey);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\n\t\toCPWPage.SelectPayer(\"\", Serenity.sessionVariableCalled(\"client\").toString());\n\t\tswitch(sChange.toUpperCase()){\n\t\tcase \"DP RETIRE\":\n\t\t\toCPWPage.SelectPolicySelectionAndApplyFilters(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\tAssert.assertFalse(\"'No results found that meet the search criteria.' message is displayed in the AWB Grid for the Medical policy ==>\"+\"Medicaid - New York State Policy\",objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Div_contains_text, \"value\", \"No results found that meet the search criteria.\")));\n\t\t\tArrayList<String> DPKeylist = new ArrayList();\n\t\t\tDPKeylist.add(Serenity.sessionVariableCalled(\"DPkey\").toString());\n\n\t\t\toCPWPage.verify_the_captured_data_is_not_displayed_in_the_given(DPKeylist, \"DPkey\", DpType);//mp no need\n\t\t\t///\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPkey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+DPKeylist, objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPKey ===>\"+DPKeylist+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC RETIRE\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"DP DESCRIPTION\":\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the DPKey in the search field of Reviewwoked Opportunity Page, DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"DPkey\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\n\t\t\tAssert.assertTrue(\"Captured DPKey is not displaying in the Review Worked Opp Grid,Captured DPkey ===>\"+Serenity.sessionVariableCalled(\"DPkey\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tAssert.assertTrue(\"Unable to click the DPKey in Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(StringUtils.replace(oCPWPage.ButtonContainsText, \"value\",Serenity.sessionVariableCalled(\"DPkey\").toString())));\n\t\t\tAssert.assertTrue(\"Captured DP description is not displaying in the Review Worked Opp Grid,Captured discription ===>\"+Serenity.sessionVariableCalled(\"DPDesc\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.Span_contains_text, \"value\",Serenity.sessionVariableCalled(\"DPDesc\").toString())));\n\t\t\tbreak;\n\t\tcase \"TOPIC NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Topic\").toString(),\"Topic\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the Topic in the search field of Reviewwoked Opportunity Page, Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Topic\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured Topic is not displaying in the Review Worked Opp Grid,Captured Topic ===>\"+Serenity.sessionVariableCalled(\"Topic\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Topic\").toString())));\n\t\t\tbreak;\n\t\tcase \"MP NAME\":\n\t\t\toCPWPage.selectgivenFiltersMP_Topic(Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(),\"MP\");\n\t\t\toCPWPage.verifygridcolumnsinAWBPae(DpType);\n\t\t\toCPWPage.Open_the_Review_Worked_Opportunity_Page();\n\t\t\tAssert.assertTrue(\"Unable to enter the MP in the search field of Reviewwoked Opportunity Page, MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString(), objSeleniumUtils.Enter_given_Text_Element(oCPWPage.sSearchField_RWOpp,Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()));\n\n\t\t\tAssert.assertTrue(\"Unable to click the search icon beside search box in the Reviewwoked Opportunity Page\", objSeleniumUtils.clickGivenXpath(oCPWPage.AWBgriSearchbutton));\n\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_5_Seconds);\t\t\t\n\t\t\tAssert.assertTrue(\"Captured MP is not displaying in the Review Worked Opp Grid,Captured MP ===>\"+Serenity.sessionVariableCalled(\"Medicalpolicy\").toString()+\",Disposition ==>\", objSeleniumUtils.is_WebElement_Displayed(StringUtils.replace(oCPWPage.labelcontainstext, \"value\",Serenity.sessionVariableCalled(\"Medicalpolicy\").toString())));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tAssert.assertTrue(\"case not found::\"+sChange, false);\n\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\t\n\t}", "boolean hasDataPartner();", "private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }", "public void testOneWithdrawal(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Teller has an account for this customer already \n\t\tteller.accountsListed.add(new BankAccount(withdraw,100));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 100, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t100.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\twithdraw.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to withdraw 100 dollars, instead it is for \" + teller.pendingTransactions.get(withdraw), \n\t\t\t\t-100.0, teller.pendingTransactions.get(withdraw));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 100.0 dollars, leaving bank.\\\", instead it reads: \" + withdraw.log.getLastLoggedEvent().toString(),\n\t\t\t\twithdraw.log.containsString(\"Got 100.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 0.0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }", "@Given(\"prepare to Access & exfiltrate data within the victim's security zone\")\npublic void preaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "public String isValidAgentLogin(String userName, String password, String txn);", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySAPElectricCustomer_old()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the SAP SMR page for Electric customer\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\n\t\t//.verifyAnonymousSAPElecCustomersRewrite(smrProfile)\n\t\t.verifyAnonymousSAPElectricCustomers(smrProfile)\n\t\t.verifyLeadTable(smrProfile);\n\t\n}", "private EditPlanDirectToManaged signUpAndReachEditPlan() throws Exception{\n //Initializing investment strategy object used to keep track of Glidepath investment strategy in relation to age to retirement and RTQ\n //Default User has age of 35 and 30 years to retirement\n InvestmentStrategyObject.initAllStrategies();\n //Login and create Premium Gaslamp User\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n DetermineInvestmentStrategyPage displayPage = signupAndOnboard(advisorSplashPage,\n Constants.LastName.PREMIUM_INDIVIDUAL);\n //Enter Random RTQ Selections\n gaslamp.directToManaged.InvestmentStrategyPage investmentStrategyPage = EnterAndEditRTQ(RTQAnswerTypes.RANDOM,displayPage);\n PortfolioAnalysisPage portfolioAnalysisPage = investmentStrategyPage.navigateToPortfolioAnalysisPage();\n\n LinkedAccountsPage linkedAccountsPage = linkDAGAccount(portfolioAnalysisPage);\n portfolioAnalysisPage = linkedAccountsPage.clickOnNextButton();\n verifyPortfolioElements(portfolioAnalysisPage);\n\n //Edit the plan and re-do the RTQ\n Reporter.log(\"Editing Plan and Assumptions.\", true);\n EditPlanDirectToManaged editPlanPage = portfolioAnalysisPage.clickOnEditInPlaceTrigger();\n softAssert.assertTrue(editPlanPage.verifyEditPlanElements());\n return editPlanPage;\n }", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "ReturnMessageDto checkAbsences(ReturnMessageDto srm, Integer idAgent,\r\n\t\t\tList<Pointage> pointages);", "@Test\n void test50IdsAllowed() throws Exception {\n setEppInput(\"host_check_50.xml\");\n runFlow();\n }", "@Override\r\n\tpublic void testPrivateBelongsToOtherUser() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateBelongsToOtherUser();\r\n\t\t}\r\n\t}", "@Test\n public void testRentApartmentToTenantSuccess() {\n Mockito.when(iRentalAgreementService.isRentalAgreementInForce(Mockito.any())).thenReturn(Boolean.TRUE);\n\n // Simulate an apartment that is not already rented.\n Apartment apartment = Apartment.builder()\n .apartmentNumber(\"2E\")\n .isRented(false)\n .floor(new Floor())\n .build();\n\n RentalTransaction rentalTransaction = propertyRentalService.rentApartmentToTenant(new RentalAgreement(), new UserRecord(), apartment);\n Assert.assertTrue(rentalTransaction.isTransactionSuccessful());\n }", "public void v_Verify_Guest2_Hidden(){\n\t}", "public void verifyActivate() {\n // TODO - How to test the EJB passivate?\n throw new RuntimeException(\"Test not implemented yet.\");\n }", "public static boolean activatePortedNumberOnSmileNetwork(PortInEvent context) throws Exception {\n log.debug(\"MNP In activatePortedNumberOnSmileNetwork\");\n try {\n // 1. Add the ported numbers on SmileDB's ported_number Table;\n // AddressManager am = new AddressManager();\n log.debug(\"Number of number ranges to port in = {}\", context.getRoutingInfoList().getRoutingInfo().size());\n for(RoutingInfo routingInfo : context.getRoutingInfoList().getRoutingInfo()) {\n log.debug(\"Adding ported number range [{}, {}] from donor network {} to the database.\", new Object[]{\n routingInfo.getPhoneNumberRange().getPhoneNumberStart(), \n routingInfo.getPhoneNumberRange().getPhoneNumberEnd(), \n context.getDonorId()});\n \n PortingData portingData = new PortingData();\n portingData.setPlatformContext(new PlatformContext());\n portingData.getPlatformContext().setTxId(context.getPlatformContext().getTxId());\n portingData.setStartE164(Long.parseLong(Utils.getFriendlyPhoneNumberKeepingCountryCode(routingInfo.getPhoneNumberRange().getPhoneNumberStart())));\n portingData.setEndE164(Long.parseLong(Utils.getFriendlyPhoneNumberKeepingCountryCode(routingInfo.getPhoneNumberRange().getPhoneNumberEnd())));\n \n portingData.setInterconnectPartnerCode(context.getRecipientId()); // Number is now hosted by Smile ...\n SCAWrapper.getAdminInstance().updatePortingData_Direct(portingData);\n \n String impu = Utils.getPublicIdentityForPhoneNumber(routingInfo.getPhoneNumberRange().getPhoneNumberStart());\n \n // 2. Add the ported numbers to available_numbers table.\n if(MnpHelper.isEmergencyRestore(context)) {\n //Free-up the original number so it can be reused to the new product below.\n PlatformString numToIssue = new PlatformString();\n numToIssue.setString(impu);\n SCAWrapper.getAdminInstance().freeNumber_Direct(numToIssue);\n\n } else {\n AvailableNumberRange availableNumberRange = new AvailableNumberRange();\n availableNumberRange.setOwnedByCustomerProfileId(context.getCustomerProfileId());\n // availableNumberRange.setOwnedByOrganisationId(context.getOrganisationId());\n com.smilecoms.commons.sca.direct.am.PhoneNumberRange phoneNumberRange = \n new com.smilecoms.commons.sca.direct.am.PhoneNumberRange();\n phoneNumberRange.setPhoneNumberEnd(routingInfo.getPhoneNumberRange().getPhoneNumberEnd());\n phoneNumberRange.setPhoneNumberStart(routingInfo.getPhoneNumberRange().getPhoneNumberStart());\n \n availableNumberRange.setPhoneNumberRange(phoneNumberRange);\n availableNumberRange.setPriceCents(0);\n if(context.getCustomerType().equalsIgnoreCase(MnpHelper.MNP_CUSTOMER_TYPE_INDIVIDUAL)) {\n availableNumberRange.setOwnedByCustomerProfileId(context.getCustomerProfileId());\n }\n \n if(context.getCustomerType().equalsIgnoreCase(MnpHelper.MNP_CUSTOMER_TYPE_CORPORATE)) {\n availableNumberRange.setOwnedByOrganisationId(context.getOrganisationId());\n }\n \n // am.addAvailableNumberRange(availableNumberRange);\n SCAWrapper.getAdminInstance().addAvailableNumberRange_Direct(availableNumberRange);\n }\n \n // 3. If not a range, then modify Service Instance Here ...\n if(routingInfo.getServiceInstanceId() == -1) {\n log.warn(\"Porting of a number range ({} - {}) into Smile - added into the available_number table, no need to activate services.\", routingInfo.getPhoneNumberRange().getPhoneNumberStart(), routingInfo.getPhoneNumberRange().getPhoneNumberEnd());\n } else {\n \n if(MnpHelper.isEmergencyRestore(context)) {\n // The previous service would have been deleted, so we need to add a new service instance to the product which the old service used to belong.\n ProductInstanceQuery piQuery = new ProductInstanceQuery();\n piQuery.setVerbosity(StProductInstanceLookupVerbosity.MAIN_SVC_SVCAVP);\n piQuery.setServiceInstanceId(routingInfo.getServiceInstanceId());\n ProductInstanceList piList = SCAWrapper.getAdminInstance().getProductInstances(piQuery);\n \n if(piList == null || piList.getNumberOfProductInstances() <= 0) {\n log.error(\"MNP Emergency Restore - no product instance found with old/delete service instance {}.\", routingInfo.getServiceInstanceId());\n } else {\n if(piList.getNumberOfProductInstances() > 1) { // TOo manny product instances\n log.error(\"MNP Emergency Restore - too many product instances found ({}) for old/deleted service instance ({}), do not know which one to use for emergency restore.\", piList.getNumberOfProductInstances(), routingInfo.getServiceInstanceId());\n } else { // We have exactly 1 product, use it.\n \n ProductInstance pi = piList.getProductInstances().get(0);\n log.debug(\"MNP Emergency Restore - adding new voice service to product instance ({})\", pi.getProductInstanceId());\n ProductOrder po = new ProductOrder();\n po.setProductInstanceId(pi.getProductInstanceId());\n po.setAction(StAction.NONE);\n po.setCustomerId(pi.getCustomerId());\n ServiceInstanceOrder siO = new ServiceInstanceOrder();\n siO.setAction(StAction.CREATE);\n ServiceInstance si = new ServiceInstance();\n si.setServiceSpecificationId(100);\n //Set AccountID\n if (pi.getProductServiceInstanceMappings().isEmpty()) {\n // there is no account so create a new one\n si.setAccountId(-1);\n } else {\n si.setAccountId(pi.getProductServiceInstanceMappings().get(0).getServiceInstance().getAccountId());\n }\n // AVPs\n /*ProductSpecification ps = NonUserSpecificCachedDataHelper.getProductSpecification(pi.getProductSpecificationId());\n ProductServiceSpecificationMapping pssm = null;\n for (ProductServiceSpecificationMapping mapping : ps.getProductServiceSpecificationMappings()) {\n if (mapping.getServiceSpecification().getServiceSpecificationId() == 100) {\n pssm = mapping;\n break;\n }\n }*/\n \n si.getAVPs().addAll(NonUserSpecificCachedDataHelper.getServiceSpecification(100).getAVPs());\n for (AVP avp : si.getAVPs()) {\n if (avp != null && avp.getAttribute() != null) {\n if (avp.getAttribute().equalsIgnoreCase(\"PublicIdentity\")) {\n avp.setValue(impu);\n }\n }\n }\n \n po.setOrganisationId(pi.getOrganisationId());\n si.setCustomerId(pi.getCustomerId());\n si.setStatus(\"AC\");\n siO.setServiceInstance(si);\n siO.setAction(StAction.CREATE);\n po.getServiceInstanceOrders().add(siO);\n SCAWrapper.getAdminInstance().processOrder(po);\n }\n } \n } else { //Normal portin - not an emergency restore.\n // -- Assign the ported number to the service instance of the customer ...\n // -- Retrieve the service instance that was used for this porting order.\n ServiceInstanceQuery siQuery = new ServiceInstanceQuery();\n siQuery.setVerbosity(StServiceInstanceLookupVerbosity.MAIN_SVCAVP);\n siQuery.setServiceInstanceId(routingInfo.getServiceInstanceId());\n ServiceInstanceList siList = SCAWrapper.getAdminInstance().getServiceInstances(siQuery);\n\n if (siList.getNumberOfServiceInstances() < 1) { \n // TODO - handle missing SI when provisioning a ported number. \n log.error(\"No service instance found with sid {}\", routingInfo.getServiceInstanceId());\n throw new Exception(\"Service instance with sid \" + routingInfo.getServiceInstanceId() + \" does not exist.\");\n } \n\n ProductOrder pOrder = new ProductOrder();\n pOrder.setAction(StAction.NONE);\n \n if(context.getCustomerType().equalsIgnoreCase(MnpHelper.MNP_CUSTOMER_TYPE_CORPORATE)) {\n pOrder.setOrganisationId(context.getOrganisationId());\n } else {\n pOrder.setOrganisationId(0);\n }\n \n pOrder.setCustomerId(siList.getServiceInstances().get(0).getCustomerId());\n\n ServiceInstanceOrder siOrder = new ServiceInstanceOrder();\n ServiceInstance siToChange = siList.getServiceInstances().get(0);\n // Change Public Identity here\n if (siToChange.getAVPs() != null) {\n for (AVP avp : siToChange.getAVPs()) {\n if (avp != null && avp.getAttribute() != null) {\n if (avp.getAttribute().equalsIgnoreCase(\"PublicIdentity\")) {\n avp.setValue(impu);\n }\n }\n }\n }\n\n siOrder.setAction(StAction.UPDATE);\n pOrder.setProductInstanceId(siList.getServiceInstances().get(0).getProductInstanceId());\n siToChange.setStatus(\"AC\"); //Activate the service instance - in case this is an emergency restore\n siOrder.setServiceInstance(siToChange);\n\n pOrder.getServiceInstanceOrders().add(siOrder);\n MnpHelper.formatAVPsForSendingToSCA(pOrder.getServiceInstanceOrders().get(0).getServiceInstance().getAVPs(), pOrder.getServiceInstanceOrders().get(0).getServiceInstance().getServiceSpecificationId(), true);\n SCAWrapper.getAdminInstance().processOrder(pOrder);\n }\n }\n }\n //All good ...\n return true;\n } catch(Exception ex) {\n log.error(\"Error while attempting to activate ported number onto Smile network - \", ex);\n throw ex;\n } finally {\n log.debug(\"Done activatePortedNumberOnSmileNetwork\");\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyAnonymousElectricCustomer()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the anonymous SMR page for Electric customer\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRElectricityUserforsingleMeter\");\n\nnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.verifyElectricityServiceDeskCustomer(smrProfile)\n\t.verifyLeadTable(smrProfile); \t\n}", "public boolean verifyPaymentTrasaction(ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForSpinner(driver);\n\t\t\tWaitUtils.waitForElementPresent(driver, txt_paymntRef, \"Failed to get payment reference id after payment\");\n\t\t\tLog.message(\"Payment reference number : \" + txt_paymntRef.getText(), extentedReport);\n\t\t\treturn (Integer.parseInt(txt_paymntRef.getText()) > 0);\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Trasaction was not successful, failed to fetch the transaction id \" + e);\n\t\t}\n\n\t}", "boolean hasCustomerUserAccessInvitation();", "@Test\n public void loanWithFlatCahargesAndUpfrontAccrualAccountingEnabled() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n // Add charges with payment mode regular\n List<HashMap> charges = new ArrayList<>();\n Integer flatDisbursement = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC, ChargesHelper.getLoanDisbursementJSON());\n addCharges(charges, flatDisbursement, \"100\", null);\n Integer flatSpecifiedDueDate = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"100\", false));\n\n Integer flatInstallmentFee = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"50\", false));\n addCharges(charges, flatInstallmentFee, \"50\", null);\n\n final Account assetAccount = ACCOUNT_HELPER.createAssetAccount();\n final Account incomeAccount = ACCOUNT_HELPER.createIncomeAccount();\n final Account expenseAccount = ACCOUNT_HELPER.createExpenseAccount();\n final Account overpaymentAccount = ACCOUNT_HELPER.createLiabilityAccount();\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanProductID = createLoanProduct(false, ACCRUAL_UPFRONT, assetAccount, incomeAccount, expenseAccount,\n overpaymentAccount);\n final Integer loanID = applyForLoanApplication(clientID, loanProductID, charges, null, \"12,000.00\", collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n verifyLoanRepaymentSchedule(loanSchedule);\n\n List<HashMap> loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(flatDisbursement, loanCharges, \"100\", \"100.00\", \"0.0\", \"0.0\");\n validateCharge(flatInstallmentFee, loanCharges, \"50\", \"200.00\", \"0.0\", \"0.0\");\n\n // check for disbursement fee\n HashMap disbursementDetail = loanSchedule.get(0);\n validateNumberForEqual(\"100.00\", String.valueOf(disbursementDetail.get(\"feeChargesDue\")));\n\n // check for charge at specified date and installment fee\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"50.00\", String.valueOf(firstInstallment.get(\"feeChargesDue\")));\n\n // check for installment fee\n HashMap secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"50.00\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"100.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"200.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.DEBIT) };\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 September 2011\", assetAccountInitialEntry);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, \"20 September 2011\",\n new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"100.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"200.00\"), JournalEntry.TransactionType.CREDIT));\n\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(flatSpecifiedDueDate), \"29 September 2011\", \"100\"));\n\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(flatDisbursement, loanCharges, \"100\", \"0.00\", \"100.0\", \"0.0\");\n validateCharge(flatSpecifiedDueDate, loanCharges, \"100\", \"100.00\", \"0.0\", \"0.0\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"29 September 2011\",\n new JournalEntry(Float.parseFloat(\"100.00\"), JournalEntry.TransactionType.DEBIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, \"29 September 2011\",\n new JournalEntry(Float.parseFloat(\"100.00\"), JournalEntry.TransactionType.CREDIT));\n\n LOG.info(\"-------------Make repayment 1-----------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"3301.49\"), loanID);\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(flatDisbursement, loanCharges, \"100\", \"0.00\", \"100.0\", \"0.0\");\n validateCharge(flatSpecifiedDueDate, loanCharges, \"100\", \"0.00\", \"100.0\", \"0.0\");\n validateCharge(flatInstallmentFee, loanCharges, \"50\", \"150.00\", \"50.0\", \"0.0\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3301.49\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3301.49\"), JournalEntry.TransactionType.CREDIT));\n\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(flatSpecifiedDueDate), \"29 October 2011\", \"100\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"150.00\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n LOG.info(\"----------- Waive installment charge for 2nd installment ---------\");\n LOAN_TRANSACTION_HELPER.waiveChargesForLoan(loanID, (Integer) getloanCharge(flatInstallmentFee, loanCharges).get(\"id\"),\n LoanTransactionHelper.getWaiveChargeJSON(String.valueOf(2)));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(flatInstallmentFee, loanCharges, \"50\", \"100.00\", \"50.0\", \"50.0\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"50.0\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"50.0\"), JournalEntry.TransactionType.DEBIT));\n\n LOG.info(\"----------Make repayment 2------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3251.49\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3251.49\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3251.49\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"--------------Waive interest---------------\");\n LOAN_TRANSACTION_HELPER.waiveInterest(\"20 December 2011\", String.valueOf(61.79), loanID);\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"60.59\", String.valueOf(thirdInstallment.get(\"interestOutstanding\")));\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.DEBIT));\n\n Integer flatPenaltySpecifiedDueDate = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"100\", true));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(flatPenaltySpecifiedDueDate), \"29 September 2011\", \"100\"));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(flatPenaltySpecifiedDueDate, loanCharges, \"100\", \"0.00\", \"100.0\", \"0.0\");\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"100\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n // checking the journal entry as applied penalty has been collected\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3301.49\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3301.49\"), JournalEntry.TransactionType.CREDIT));\n\n LOG.info(\"----------Make repayment 3 advance------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3301.49\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3301.49\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3301.49\"), JournalEntry.TransactionType.CREDIT));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(flatPenaltySpecifiedDueDate), \"10 January 2012\", \"100\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"100\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3239.68\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Pay applied penalty ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"100\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"100\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"100\"), JournalEntry.TransactionType.CREDIT));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"0\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3139.68\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Make over payment for repayment 4 ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"3220.60\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"3220.60\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3139.68\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForLiabilityAccount(overpaymentAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"80.92\"), JournalEntry.TransactionType.CREDIT));\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.getLoanDetail(REQUEST_SPEC, RESPONSE_SPEC, loanID, \"status\");\n LoanStatusChecker.verifyLoanAccountIsOverPaid(loanStatusHashMap);\n }", "@Test(alwaysRun=true, priority=17,enabled=true)\n\tpublic void tenantVerification() throws InterruptedException, IOException {\t\n\t\tadminPage.tenantVerification(driver);\n\t\t\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySAPElecCustomer()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the SAP SMR page for Electricity customer\");\n//SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\t\t new SubmitMeterReadAction()\n\t\t .openSMRpage(\"Electricity\")\n\t\t.verifyAnonymousSAPElecCustomersRewrite(smrProfile);\n}", "public void v_Verify_Guest9_Displayed(){\n\t}", "public void v_Verify_Guest6_Displayed(){\n\t}", "@Test\r\n\tpublic void testSenderAndReceiverAccountNumberSame() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(\"123456\");\r\n\t\taccountTransferRequest.setReceiverAccount(\"123456\");\r\n\t\taccountTransferRequest.setTransferAmount(400.0);\t\t\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t\tAssert.fail(\"Exception_Expected\");\r\n\t\t} catch (ValidationException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t\tAssert.assertEquals(\"Invalid_Sender_And_Receiver_AccountNumber\", exception.getMessage());\r\n\r\n\t\t}\r\n\t}", "@Override\n public void execute(ProcessBundle bundle) throws Exception {\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n // Variable declaration\n // Variable declaration\n String proposalId = null;\n String proposalattrId = null;\n if (bundle.getParams().get(\"Escm_Proposalmgmt_ID\") != null) {\n proposalId = bundle.getParams().get(\"Escm_Proposalmgmt_ID\").toString();\n }\n if (bundle.getParams().get(\"Escm_Proposal_Attr_ID\") != null) {\n proposalattrId = bundle.getParams().get(\"Escm_Proposal_Attr_ID\").toString();\n EscmProposalAttribute proposalAttr = OBDal.getInstance().get(EscmProposalAttribute.class,\n proposalattrId);\n proposalId = proposalAttr.getEscmProposalmgmt().getId();\n }\n EscmProposalMgmt proposalmgmt = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n final String clientId = bundle.getContext().getClient();\n final String orgId = proposalmgmt.getOrganization().getId();\n final String userId = bundle.getContext().getUser();\n User user = OBDal.getInstance().get(User.class, userId);\n String purchaseOrderType = \"PUR\";\n List<EscmPurchaseOrderConfiguration> config = new ArrayList<EscmPurchaseOrderConfiguration>();\n List<Location> bploclist = new ArrayList<Location>();\n List<Warehouse> warehouselist = new ArrayList<Warehouse>();\n List<PriceList> priceListlist = new ArrayList<PriceList>();\n List<PaymentTerm> paymentTermList = new ArrayList<PaymentTerm>();\n Location bplocation = null;\n String yearId = null, transdoctypeId = null;\n SimpleDateFormat d1 = new SimpleDateFormat(\"dd-MM-yyyy\");\n Warehouse warehouse = null;\n PriceList priceList = null;\n PaymentTerm paymentTerm = null;\n String startingDate = \"\", budgetReferenceId = null;\n\n String motContactPerson = \"\";\n String motContactPosition = \"\";\n String description = null;\n String alertWindow = sa.elm.ob.scm.util.AlertWindow.contractUser;\n String windowId = \"2ADDCB0DD2BF4F6DB13B21BBCCC3038C\";\n NextRoleByRuleVO nextApproval = null;\n\n ProposalManagementProcessDAO proposalDAO = new ProposalManagementProcessDAOImpl();\n // get the connection\n Connection conn = OBDal.getInstance().getConnection();\n\n boolean isMinProposalApproved = false;\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n isMinProposalApproved = proposalDAO.isMinProposalApproved(proposalmgmt);\n }\n\n if ((proposalmgmt.getProposalappstatus().equals(\"APP\")\n && proposalmgmt.getProposalstatus().equals(\"AWD\"))\n || (proposalmgmt.getProposalstatus().equals(\"PAWD\")\n && (isMinProposalApproved || proposalmgmt.getProposalappstatus().equals(\"APP\")))) {\n\n // based on configuration minvalue , getting purchase order type is purchase order /contract\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n config = proposalDAO.getPOTypeBasedOnValue(orgId, proposalmgmt.getAwardamount());\n } else {\n config = proposalDAO.getPOTypeBasedOnValue(orgId, proposalmgmt.getTotalamount());\n }\n\n if (config.size() > 0) {\n purchaseOrderType = config.get(0).getOrdertype();\n\n // Setting mot contact person and position\n\n EscmPurchaseOrderConfiguration configuration = config.get(0);\n motContactPosition = configuration.getMOTContactPosition();\n motContactPerson = configuration.getMOTContactPerson() != null\n ? configuration.getMOTContactPerson().getName()\n : null;\n\n } else {\n\n // Setting mot contact person and position\n\n EscmPurchaseOrderConfiguration configuration = PurchaseAgreementCalloutDAO\n .checkDocTypeConfig(OBContext.getOBContext().getCurrentClient().getId(),\n proposalmgmt.getOrganization().getId(), purchaseOrderType);\n\n motContactPosition = configuration.getMOTContactPosition();\n motContactPerson = configuration.getMOTContactPerson() != null\n ? configuration.getMOTContactPerson().getName()\n : null;\n\n }\n\n // Throw error if contract category is inactive\n if (proposalmgmt != null && proposalmgmt.getContractType() != null\n && !proposalmgmt.getContractType().isActive()) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_ContractCategoryInactive@\");\n bundle.setResult(result);\n return;\n }\n\n startingDate = proposalDAO.getPeriodStartDate(clientId);\n budgetReferenceId = proposalDAO.getBudgetFromPeriod(clientId, startingDate);\n if (\"\".equals(budgetReferenceId)) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Efin_Budget_Init_Mandatory@\");\n bundle.setResult(result);\n return;\n }\n if (budgetReferenceId != null) {\n if (!proposalmgmt.getEfinBudgetinitial().getId().equals(budgetReferenceId)) {\n // OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@Escm_YearClosed_Err@\");\n // bundle.setResult(result);\n // return;\n }\n }\n\n // fetching finacial year\n yearId = proposalDAO.getFinancialYear(clientId);\n if (\"\".equals(yearId)) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_FinancialYear_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching warehouse\n warehouselist = proposalDAO.getWarehouse(proposalmgmt.getClient().getId());\n if (warehouselist.size() > 0) {\n warehouse = warehouselist.get(0);\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_Warehouse_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching bplocation\n bploclist = proposalDAO.getLocation(proposalmgmt.getSupplier().getId());\n if (bploclist.size() > 0)\n bplocation = bploclist.get(0);\n else {\n String message = OBMessageUtils.messageBD(\"ESCM_SuppLoc_NotDefine\");\n message = message.replace(\"%\", proposalmgmt.getSupplier().getName());\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", message);\n bundle.setResult(result);\n return;\n }\n\n // fetching pricelist\n priceListlist = proposalDAO.getPriceList(proposalmgmt.getClient().getId());\n if (priceListlist.size() > 0)\n priceList = priceListlist.get(0);\n else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_PriceList_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching payment term\n paymentTermList = proposalDAO.getPaymentTerm(proposalmgmt.getClient().getId());\n if (paymentTermList.size() > 0)\n paymentTerm = paymentTermList.get(0);\n else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_PaymentTerm_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n if (user.getBusinessPartner() == null) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_CrtPOfrmProsal_NotBP@\");\n bundle.setResult(result);\n return;\n }\n // default value brought for mot contact person/position so no need validation.\n /*\n * if (user.getBusinessPartner() != null && user.getBusinessPartner().getEhcmPosition() ==\n * null) { OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n * \"@ESCM_LoggUser_PosNotDef@\"); bundle.setResult(result); return; }\n */\n\n // fetching document type\n Object transdoctype = proposalDAO.getTransactionDoc(orgId, clientId);\n if (transdoctype != null) {\n transdoctypeId = (String) transdoctype;\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_PODocType_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n if (transdoctypeId != null && paymentTerm != null && priceList != null && warehouse != null\n && bplocation != null && yearId != null) {\n Order order = OBProvider.getInstance().get(Order.class);\n order.setClient(proposalmgmt.getClient());\n order.setOrganization(proposalmgmt.getOrganization());\n order.setCreatedBy(user);\n order.setUpdatedBy(user);\n order.setSalesTransaction(false);\n order.setDocumentType(OBDal.getInstance().get(DocumentType.class, \"0\"));\n order.setTransactionDocument(OBDal.getInstance().get(DocumentType.class, transdoctypeId));\n order.setDocumentNo(UtilityDAO.getSequenceNo(conn, clientId,\n order.getTransactionDocument().getDocumentSequence().getName(), true));\n order.setDocumentStatus(\"DR\");\n order.setDocumentAction(\"CO\");\n order.setAccountingDate(new java.util.Date());\n order.setOrderDate(new java.util.Date());\n order.setBusinessPartner(proposalmgmt.getSupplier());\n order.setEscmRevision(0L);\n order.setEscmAppstatus(\"DR\");\n order.setEscmFinanyear(OBDal.getInstance().get(Year.class, yearId));\n if (proposalmgmt.getEscmBidmgmt() != null\n && proposalmgmt.getEscmBidmgmt().getBidname() != null) {\n order.setEscmProjectname(proposalmgmt.getEscmBidmgmt().getBidname());\n } else {\n order.setEscmProjectname(proposalmgmt.getBidName());\n }\n // order.setEscmOnboarddateh(new java.util.Date());\n order.setEscmOrdertype(purchaseOrderType);\n // order.setEscmOnboarddategreg(d1.format(new Date()));\n order.setPartnerAddress(bplocation);\n order.setEscmContractduration(null);\n // order.setEscmPeriodtype(\"DT\");\n order.setWarehouse(warehouse);\n order.setPriceList(priceList);\n order.setPaymentTerms(paymentTerm);\n order.setInvoiceTerms(\"D\");\n order.setDeliveryTerms(\"A\");\n order.setFreightCostRule(\"I\");\n order.setFormOfPayment(\"B\");\n order.setDeliveryMethod(\"P\");\n order.setPriority(\"5\");\n order.setEscmAdRole(OBContext.getOBContext().getRole());\n order.setEscmAppstatus(\"DR\");\n order.setEscmAdvpaymntPercntge(BigDecimal.ZERO);\n Currency objCurrency = OBDal.getInstance().get(Currency.class, \"317\");\n order.setCurrency(proposalmgmt.getOrganization().getCurrency() == null ? objCurrency\n : proposalmgmt.getOrganization().getCurrency());\n\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n order.setGrandTotalAmount(proposalmgmt.getAwardamount());\n } else {\n order.setGrandTotalAmount(proposalmgmt.getTotalamount());\n }\n\n order.setDocumentStatus(\"DR\");\n order.setEscmDocaction(\"CO\");\n // order.setEscmContractstartdate(new java.util.Date());\n // order.setEscmContractenddate(new java.util.Date());\n order.setEscmBuyername(user);\n order.setEscmRatedategre(d1.format(new Date()));\n if (budgetReferenceId != null)\n order.setEfinBudgetint(\n OBDal.getInstance().get(EfinBudgetIntialization.class, budgetReferenceId));\n order.setEscmProposalmgmt(proposalmgmt);\n // order.setEscmMotcontperson(user.getBusinessPartner().getName());\n // order.setEscmMotcontposition(user.getBusinessPartner().getEhcmPosition());\n order.setEscmMotcontperson(motContactPerson);\n order.setEscmMotcontposition(motContactPosition);\n if (proposalmgmt.getSecondsupplier() != null)\n order.setEscmSecondsupplier(proposalmgmt.getSecondsupplier());\n if (proposalmgmt.getSecondBranchname() != null)\n order.setEscmSecondBranchname(proposalmgmt.getSecondBranchname());\n order.setEscmIssecondsupplier(proposalmgmt.isSecondsupplier());\n if (proposalmgmt.getIBAN() != null)\n order.setEscmSecondIban(proposalmgmt.getIBAN());\n if (proposalmgmt.getSubcontractors() != null)\n order.setEscmSubcontractors(proposalmgmt.getSubcontractors());\n if (proposalmgmt.isTaxLine()) {\n order.setEscmIstax(proposalmgmt.isTaxLine());\n\n }\n if (proposalmgmt.getEfinTaxMethod() != null) {\n order.setEscmTaxMethod(proposalmgmt.getEfinTaxMethod());\n }\n order.setEscmCalculateTaxlines(true);\n if (proposalmgmt.getContractType() != null) {\n order.setEscmContactType(proposalmgmt.getContractType());\n if (proposalmgmt.getContractType().getReceiveType().getSearchKey().equals(\"AMT\")) {\n order.setEscmReceivetype(\"AMT\");\n } else {\n order.setEscmReceivetype(\"QTY\");\n }\n } else {\n order.setEscmContactType(null);\n }\n OBQuery<EscmProposalsourceRef> sourceRef = OBDal.getInstance().createQuery(\n EscmProposalsourceRef.class,\n \"as e where e.escmProposalmgmtLine.id in (select ln.id from \"\n + \"Escm_Proposalmgmt_Line ln where ln.escmProposalmgmt.id=:propId)\");\n sourceRef.setNamedParameter(\"propId\", proposalmgmt.getId());\n List<EscmProposalsourceRef> propSrclist = sourceRef.list();\n if (propSrclist.size() > 0) {\n EscmProposalsourceRef propSrcRef = propSrclist.get(0);\n if (propSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceProject(\n propSrcRef.getRequisition().getEscmMaintenanceProject());\n }\n if (propSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceCntrctNo(\n propSrcRef.getRequisition().getESCMMaintenanceContractNo());\n }\n }\n if (proposalmgmt.getEscmBidmgmt() != null) {\n OBQuery<Escmbidsourceref> bidSrcref = OBDal.getInstance().createQuery(\n Escmbidsourceref.class,\n \"as e where e.escmBidmgmtLine.id in (select bid.id from escm_bidmgmt_line bid where bid.escmBidmgmt.id=:bidId)\");\n bidSrcref.setNamedParameter(\"bidId\", proposalmgmt.getEscmBidmgmt().getId());\n List<Escmbidsourceref> bidSrcList = bidSrcref.list();\n if (bidSrcList.size() > 0) {\n Escmbidsourceref bidSrcRef = bidSrcList.get(0);\n if (bidSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceProject(\n bidSrcRef.getRequisition().getEscmMaintenanceProject());\n order.setEscmMaintenanceCntrctNo(\n bidSrcRef.getRequisition().getESCMMaintenanceContractNo());\n }\n }\n }\n\n OBDal.getInstance().save(order);\n\n proposalmgmt.setDocumentNo(order);\n OBDal.getInstance().save(proposalmgmt);\n\n // Updating the PO reference in PEE(Proposal Attribute)\n // Fetching the PEE irrespective of Proposal Version\n OBQuery<EscmProposalAttribute> proposalAttr = OBDal.getInstance().createQuery(\n EscmProposalAttribute.class,\n \" as a join a.escmProposalevlEvent b where b.status='CO' and a.escmProposalmgmt.proposalno= :proposalID \");\n proposalAttr.setNamedParameter(\"proposalID\", proposalmgmt.getProposalno());\n List<EscmProposalAttribute> proposalAttrList = proposalAttr.list();\n if (proposalAttrList.size() > 0) {\n EscmProposalAttribute proposalAttrObj = proposalAttrList.get(0);\n proposalAttrObj.setOrder(order);\n OBDal.getInstance().save(proposalAttrObj);\n }\n\n OBDal.getInstance().flush();\n\n int ordercount = POcontractAddproposalDAO.insertOrderline(conn, proposalmgmt, order);\n\n if (ordercount == 1) {\n // send an alert to contract user when po is created\n description = sa.elm.ob.scm.properties.Resource\n .getProperty(\"scm.contractuser.alert\", vars.getLanguage())\n .concat(\"\" + proposalmgmt.getProposalno());\n AlertUtility.alertInsertBasedonPreference(order.getId(), order.getDocumentNo(),\n \"ESCM_Contract_User\", order.getClient().getId(), description, \"NEW\", alertWindow,\n \"scm.contractuser.alert\", Constants.GENERIC_TEMPLATE, windowId, null);\n String message = OBMessageUtils.messageBD(\"ESCM_CreatePOForProposal_Success\");\n message = message.replace(\"%\", order.getDocumentNo());\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", message);\n bundle.setResult(result);\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_CreatePOForProsalNotSuccess@\");\n bundle.setResult(result);\n }\n }\n }\n } catch (OBException e) {\n OBDal.getInstance().rollbackAndClose();\n log.error(\" Exception in CreatePOFromProposal: \" + e);\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", e.getMessage());\n bundle.setResult(result);\n return;\n } catch (Exception e) {\n log.error(\"Exeception in CreatePOFromProposal Process:\", e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "ResponseEntity<?> verifyOtp(HttpServletRequest request, HttpServletResponse response);", "if(true==adhocTicket.isPaid()){\n System.out.println(\"isPaid() is passed\");\n }", "public void testTwoAddressLineItems() throws InterruptedException {\n Customer customer = CustomerService.getInstance().getCustomerById(new Integer(5305));\r\n ir.printInvoice(custInv, customer);\r\n }", "private TransferPointRequest isAccountLinked(TransferPointRequest transferPointRequest) {\n Customer fromCustomer = transferPointRequest.getFromCustomer();\n\n //check whether the customer is linked\n List<LinkedLoyalty> linkedLoyalties = linkedLoyaltyService.getAllLinkedAccounts(fromCustomer.getCusCustomerNo());\n\n //if account is not linked , set account linked as false\n if(linkedLoyalties == null || linkedLoyalties.size() == 0){\n\n transferPointRequest.setAccountLinked(false);\n\n } else {\n\n //if linked , get the primary customer info\n transferPointRequest = isCustomerPrimary(linkedLoyalties,transferPointRequest);\n\n //set accountLinked as true\n transferPointRequest.setAccountLinked(true);\n }\n\n return transferPointRequest;\n }", "@Test\n public void loanWithCahargesOfTypeAmountPlusInterestPercentageAndUpfrontAccrualAccountingEnabled() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n // Add charges with payment mode regular\n List<HashMap> charges = new ArrayList<>();\n Integer amountPlusInterestPercentageDisbursementCharge = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanDisbursementJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT_AND_INTEREST, \"1\"));\n addCharges(charges, amountPlusInterestPercentageDisbursementCharge, \"1\", null);\n\n Integer amountPlusInterestPercentageSpecifiedDueDateCharge = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC, ChargesHelper\n .getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT_AND_INTEREST, \"1\", false));\n\n Integer amountPlusInterestPercentageInstallmentFee = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT_AND_INTEREST, \"1\", false));\n addCharges(charges, amountPlusInterestPercentageInstallmentFee, \"1\", \"29 September 2011\");\n\n final Account assetAccount = ACCOUNT_HELPER.createAssetAccount();\n final Account incomeAccount = ACCOUNT_HELPER.createIncomeAccount();\n final Account expenseAccount = ACCOUNT_HELPER.createExpenseAccount();\n final Account overpaymentAccount = ACCOUNT_HELPER.createLiabilityAccount();\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanProductID = createLoanProduct(false, ACCRUAL_UPFRONT, assetAccount, incomeAccount, expenseAccount,\n overpaymentAccount);\n final Integer loanID = applyForLoanApplication(clientID, loanProductID, charges, null, \"12,000.00\", collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n verifyLoanRepaymentSchedule(loanSchedule);\n\n List<HashMap> loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(amountPlusInterestPercentageDisbursementCharge, loanCharges, \"1\", \"126.06\", \"0.0\", \"0.0\");\n validateCharge(amountPlusInterestPercentageInstallmentFee, loanCharges, \"1\", \"126.04\", \"0.0\", \"0.0\");\n\n // check for disbursement fee\n HashMap disbursementDetail = loanSchedule.get(0);\n validateNumberForEqual(\"126.06\", String.valueOf(disbursementDetail.get(\"feeChargesDue\")));\n\n // check for charge at specified date and installment fee\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"31.51\", String.valueOf(firstInstallment.get(\"feeChargesDue\")));\n\n // check for installment fee\n HashMap secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"31.51\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"126.06\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"126.04\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.DEBIT) };\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 September 2011\", assetAccountInitialEntry);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, \"20 September 2011\",\n new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"126.06\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"126.04\"), JournalEntry.TransactionType.CREDIT));\n\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(\n String.valueOf(amountPlusInterestPercentageSpecifiedDueDateCharge), \"29 September 2011\", \"1\"));\n\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(amountPlusInterestPercentageDisbursementCharge, loanCharges, \"1\", \"0.0\", \"126.06\", \"0.0\");\n validateCharge(amountPlusInterestPercentageSpecifiedDueDateCharge, loanCharges, \"1\", \"126.06\", \"0.0\", \"0.0\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"29 September 2011\",\n new JournalEntry(Float.parseFloat(\"126.06\"), JournalEntry.TransactionType.DEBIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, \"29 September 2011\",\n new JournalEntry(Float.parseFloat(\"126.06\"), JournalEntry.TransactionType.CREDIT));\n\n LOG.info(\"-------------Make repayment 1-----------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"3309.06\"), loanID);\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(amountPlusInterestPercentageDisbursementCharge, loanCharges, \"1\", \"0.00\", \"126.06\", \"0.0\");\n validateCharge(amountPlusInterestPercentageSpecifiedDueDateCharge, loanCharges, \"1\", \"0.00\", \"126.06\", \"0.0\");\n validateCharge(amountPlusInterestPercentageInstallmentFee, loanCharges, \"1\", \"94.53\", \"31.51\", \"0.0\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3309.06\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3309.06\"), JournalEntry.TransactionType.CREDIT));\n\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(\n String.valueOf(amountPlusInterestPercentageSpecifiedDueDateCharge), \"29 October 2011\", \"1\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"157.57\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n LOG.info(\"----------- Waive installment charge for 2nd installment ---------\");\n LOAN_TRANSACTION_HELPER.waiveChargesForLoan(loanID,\n (Integer) getloanCharge(amountPlusInterestPercentageInstallmentFee, loanCharges).get(\"id\"),\n LoanTransactionHelper.getWaiveChargeJSON(String.valueOf(2)));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(amountPlusInterestPercentageInstallmentFee, loanCharges, \"1\", \"63.02\", \"31.51\", \"31.51\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"31.51\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"31.51\"), JournalEntry.TransactionType.DEBIT));\n\n LOG.info(\"----------Make repayment 2------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3277.55\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3277.55\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3277.55\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"--------------Waive interest---------------\");\n LOAN_TRANSACTION_HELPER.waiveInterest(\"20 December 2011\", String.valueOf(61.79), loanID);\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"60.59\", String.valueOf(thirdInstallment.get(\"interestOutstanding\")));\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.DEBIT));\n\n Integer amountPlusInterestPercentagePenaltySpecifiedDueDate = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\", true));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(\n String.valueOf(amountPlusInterestPercentagePenaltySpecifiedDueDate), \"29 September 2011\", \"1\"));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(amountPlusInterestPercentagePenaltySpecifiedDueDate, loanCharges, \"1\", \"0.0\", \"120.0\", \"0.0\");\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"120\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n // checking the journal entry as applied penalty has been collected\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3309.06\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3309.06\"), JournalEntry.TransactionType.CREDIT));\n\n LOG.info(\"----------Make repayment 3 advance------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3303\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3303\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3303\"), JournalEntry.TransactionType.CREDIT));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(\n String.valueOf(amountPlusInterestPercentagePenaltySpecifiedDueDate), \"10 January 2012\", \"1\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"120\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3241.19\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Pay applied penalty ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"120\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"120\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120\"), JournalEntry.TransactionType.CREDIT));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"0\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3121.19\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Make over payment for repayment 4 ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"3221.61\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"3221.61\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3121.19\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForLiabilityAccount(overpaymentAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"100.42\"), JournalEntry.TransactionType.CREDIT));\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.getLoanDetail(REQUEST_SPEC, RESPONSE_SPEC, loanID, \"status\");\n LoanStatusChecker.verifyLoanAccountIsOverPaid(loanStatusHashMap);\n }", "@Then(\"Assert the success of Attempt sending crafted records to DNS cache\")\npublic void assattemptsendingcraftedrecordstodnscache(){\n}", "@Test\n @DisplayName(\"Should return 200 when adding one existing user not part of Bill in Invite Registered Person to Bill\")\n void shouldReturn200ForNormalCaseOneUserInviteRegisteredGivenPost() throws Exception {\n final var inviteRegisteredResource = InviteRegisteredResourceFixture.getDefault();\n final var user = UserFixture.getDefaultWithEmailAndPassword(\"[email protected]\", \"notEncrypted\");\n final var accountNotInBill = \"[email protected]\";\n final var existentBillId = 1000L;\n inviteRegisteredResource.setAccounts(List.of(accountNotInBill));\n final var path = String.format(BILL_BILLID_ACCOUNTS_ENDPOINT, existentBillId);\n final var authorities = new ArrayList<GrantedAuthority>();\n authorities.add(new SimpleGrantedAuthority(\"RESPONSIBLE_\" + existentBillId));\n\n //When\n final var mvcResult = performMvcPostRequestWithoutBearer(path, inviteRegisteredResource, 200, user.getUsername(), authorities);\n final String content = mvcResult.getResponse().getContentAsString();\n final BillSplitResource response = mapper.readValue(content, BillSplitResource.class);\n\n //Then\n assertThat((int) response.getInformationPerAccount().stream().map(ItemAssociationSplitResource::getAccount).map(AccountResource::getEmail)\n .filter(acc -> acc.equals(accountNotInBill)).count())\n .isEqualTo(1);\n }", "public void verifyAgentPageIsDisplayed() throws Exception {\n\n\t\twdriver.findElement(By.xpath(WebData.verifyAgentScreen)).isDisplayed();\n\t}", "@Test\n public void loanWithCahargesAndUpfrontAccrualAccountingEnabled() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n // Add charges with payment mode regular\n List<HashMap> charges = new ArrayList<>();\n Integer percentageDisbursementCharge = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanDisbursementJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\"));\n addCharges(charges, percentageDisbursementCharge, \"1\", null);\n\n Integer percentageSpecifiedDueDateCharge = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\", false));\n addCharges(charges, percentageSpecifiedDueDateCharge, \"1\", \"29 September 2011\");\n\n Integer percentageInstallmentFee = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\", false));\n addCharges(charges, percentageInstallmentFee, \"1\", \"29 September 2011\");\n\n final Account assetAccount = ACCOUNT_HELPER.createAssetAccount();\n final Account incomeAccount = ACCOUNT_HELPER.createIncomeAccount();\n final Account expenseAccount = ACCOUNT_HELPER.createExpenseAccount();\n final Account overpaymentAccount = ACCOUNT_HELPER.createLiabilityAccount();\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanProductID = createLoanProduct(false, ACCRUAL_UPFRONT, assetAccount, incomeAccount, expenseAccount,\n overpaymentAccount);\n final Integer loanID = applyForLoanApplication(clientID, loanProductID, charges, null, \"12,000.00\", collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n verifyLoanRepaymentSchedule(loanSchedule);\n\n List<HashMap> loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageDisbursementCharge, loanCharges, \"1\", \"120.00\", \"0.0\", \"0.0\");\n validateCharge(percentageSpecifiedDueDateCharge, loanCharges, \"1\", \"120.00\", \"0.0\", \"0.0\");\n validateCharge(percentageInstallmentFee, loanCharges, \"1\", \"120.00\", \"0.0\", \"0.0\");\n\n // check for disbursement fee\n HashMap disbursementDetail = loanSchedule.get(0);\n validateNumberForEqual(\"120.00\", String.valueOf(disbursementDetail.get(\"feeChargesDue\")));\n\n // check for charge at specified date and installment fee\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"149.11\", String.valueOf(firstInstallment.get(\"feeChargesDue\")));\n\n // check for installment fee\n HashMap secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"29.70\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.DEBIT) };\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 September 2011\", assetAccountInitialEntry);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, \"20 September 2011\",\n new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.CREDIT));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageDisbursementCharge, loanCharges, \"1\", \"0.0\", \"120.00\", \"0.0\");\n\n LOG.info(\"-------------Make repayment 1-----------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"3300.60\"), loanID);\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageDisbursementCharge, loanCharges, \"1\", \"0.00\", \"120.00\", \"0.0\");\n validateCharge(percentageSpecifiedDueDateCharge, loanCharges, \"1\", \"0.00\", \"120.0\", \"0.0\");\n validateCharge(percentageInstallmentFee, loanCharges, \"1\", \"90.89\", \"29.11\", \"0.0\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.CREDIT));\n\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(percentageSpecifiedDueDateCharge), \"29 October 2011\", \"1\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"149.70\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n LOG.info(\"----------- Waive installment charge for 2nd installment ---------\");\n LOAN_TRANSACTION_HELPER.waiveChargesForLoan(loanID, (Integer) getloanCharge(percentageInstallmentFee, loanCharges).get(\"id\"),\n LoanTransactionHelper.getWaiveChargeJSON(String.valueOf(2)));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageInstallmentFee, loanCharges, \"1\", \"61.19\", \"29.11\", \"29.70\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"29.7\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"29.7\"), JournalEntry.TransactionType.DEBIT));\n\n LOG.info(\"----------Make repayment 2------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3271.49\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3271.49\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3271.49\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"--------------Waive interest---------------\");\n LOAN_TRANSACTION_HELPER.waiveInterest(\"20 December 2011\", String.valueOf(61.79), loanID);\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"60.59\", String.valueOf(thirdInstallment.get(\"interestOutstanding\")));\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.DEBIT));\n\n Integer percentagePenaltySpecifiedDueDate = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\", true));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(percentagePenaltySpecifiedDueDate), \"29 September 2011\", \"1\"));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentagePenaltySpecifiedDueDate, loanCharges, \"1\", \"0.00\", \"120.0\", \"0.0\");\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"120\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n // checking the journal entry as applied penalty has been collected\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.CREDIT));\n\n LOG.info(\"----------Make repayment 3 advance------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3301.78\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3301.78\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3301.78\"), JournalEntry.TransactionType.CREDIT));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(percentagePenaltySpecifiedDueDate), \"10 January 2012\", \"1\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"120\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3240.58\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Pay applied penalty ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"120\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"120\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120\"), JournalEntry.TransactionType.CREDIT));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"0\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3120.58\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Make over payment for repayment 4 ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"3220.58\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"3220.58\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3120.58\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForLiabilityAccount(overpaymentAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"100.00\"), JournalEntry.TransactionType.CREDIT));\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.getLoanDetail(REQUEST_SPEC, RESPONSE_SPEC, loanID, \"status\");\n LoanStatusChecker.verifyLoanAccountIsOverPaid(loanStatusHashMap);\n }", "@Test(description = \"Check for KnockPagePage when user enters conflicting Answers in the RTQ\")\n public void VerifyRTQKnockOutPage() throws Exception{\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n DetermineInvestmentStrategyPage displayPage = signupAndOnboard(advisorSplashPage, Constants.LastName.PREMIUM_INDIVIDUAL);\n DetermineInvestmentGoalPage displayGoalPage = displayPage.clickOnStartQuestionnaireBtn();\n //Sign-in and complete RTQ with Conflicting Answer Triggering KnockOut Page\n RTQPage RiskToleranceQuestionPage = displayGoalPage.navigateToRTQ();\n KnockOutTwo knockOutPage = RTQKnockOutSelection(RiskToleranceQuestionPage);\n //Verify that appropriate KnockOut Header and Advisor Info is presented\n softAssert.assertTrue(knockOutPage.isContactAdvisorPageDisplayed());\n softAssert.assertTrue(knockOutPage.verifyBlockedHeaderText());\n }", "@Test(groups = {\"Regression\", \"IntakeLender\"})\n\tpublic void IntakelenderMyProfile() throws InterruptedException {\n\t\t// Login to the BLN with provided credentials\n\t\tHomePage homePage = new HomePage(d);\n\t\t// Login to BLN Application\n\t\thomePage.logIntoBLN();\n\t\t// Navigating to MyProfile Tab\n\t\tUsers Users1 = homePage.navigateToUsers();\n\t\tUsers1.select_intakeLender();\n\t\tMyProfile MyProfile1 = homePage.navigateToMyProfile();\n\t\t//LoanInside LoanInside1 = LoanRequest1.navigateToLoanInside();\n\t\tMyProfile1.updateintakePhoneNumber();\n\t\tMyProfile1.verifyUpdatedPhoneNumber();\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t\tpublic void verifySAPGasCustomer_AnnualServiceAmount()\t\n\t\t\t\t{\t\n\t\t\t\t\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the SAP SMR page for Electricity customer\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\t\t\t\t\t\t new SubmitMeterReadAction()\n\t\t\t\t\t\t .openSMRpage(\"Gas\")\n\t\t\t\t\t\t.verifyAnonymousSAPGasCustomersRewrite(smrProfile);\n\t\t\t\t}", "public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }", "private PrizeLevelDto doTemporayValidate(Context ctx, PrizeLevelDto payoutDto, long batchNumber,\n boolean isIngoreCheckingAmount) throws ApplicationException {\n InstantTicket ticket = payoutDto.getTicket();\n\n // check whether client needs to input actual amount\n SysConfiguration sysConf = this.getSysConfigurationDao().getSysConfiguration();\n if (!isIngoreCheckingAmount && sysConf.isNeedInputAmount() && payoutDto.getClientPrizeAmount() == null) {\n throw new ApplicationException(SystemException.CODE_NO_ACTUALAMOUNT,\n \"No actual amount is specified, please input prize amount for \" + \"ticket(serialNo=\"\n + ticket.getSerialNo() + \").\");\n }\n\n InstantTicket hostTicket = this.getInstantTicketDao().getBySerialNo(ticket.getSerialNo());\n if (hostTicket == null) {\n throw new ApplicationException(SystemException.CODE_NO_IG_TICKET_FOUND,\n \"can NOT find instant ticket with serialNO=\" + ticket.getSerialNo());\n }\n // TODO: need to hidden this ???????????????????\n hostTicket.setTransaction(ticket.getTransaction());// need to notify\n\n hostTicket.setRawSerialNo(false, ticket.getRawSerialNo());\n // check whether the ticket is damaged\n if (InstantTicket.PHYSICAL_STATUS_DAMAGED == hostTicket.getPhysicalStatus()) {\n throw new ApplicationException(SystemException.CODE_ONE_DAMAGETICKET, \"Ticket(serialNo=\"\n + hostTicket.getSerialNo() + \") is damaged.\");\n }\n if (InstantTicket.STATUS_VALIDATED == hostTicket.getStatus()) {\n throw new ApplicationException(SystemException.CODE_VALIDATE_REPEAT, \"Ticket(serialNO=\"\n + ticket.getSerialNo() + \") has been validated, can NOT validate it again.\");\n }\n // check the status of ticket\n if (InstantTicket.STATUS_ACTIVE != hostTicket.getStatus()\n || InstantTicket.STATUS_PROCESSING == hostTicket.getStatus()) {\n throw new ApplicationException(SystemException.CODE_VALIDATE_NOACTIVETICKET, \"Ticket(serialNo=\"\n + ticket.getSerialNo() + \",status=\" + hostTicket.getStatus()\n + \") isn't active, can NOT validate it.\");\n }\n this.verifyBlacklist(hostTicket);\n // check if the ticket is payout blocked\n InstantGameDraw gameDraw = hostTicket.getGameDraw();\n // check status of game\n if (Game.STATUS_ACTIVE != gameDraw.getGame().getState()) {\n throw new ApplicationException(SystemException.CODE_GAME_INACTIVE, \"Game(id=\" + gameDraw.getGame().getId()\n + \") isn't active.\");\n }\n if (gameDraw.getIsSuspendPayoutBlocked() == 1) {\n throw new ApplicationException(SystemException.CODE_DRAW_NOTPAYOUTSTARTED, \"Instant ticket(id=\"\n + hostTicket.getId() + \") is payout blocked.\");\n }\n // check stop payout time 'Stop payout time' is not necessary when\n // create a new game. The reason is actual 'Stop payout time' really\n // depends on game sales, its popularity, so usually no one can foresee\n // a 'stop payout time' at the moment of game creation\n if (gameDraw.getStopPayoutTime() != null) {\n Date current = new Date();\n if (current.after(gameDraw.getStopPayoutTime())) {\n throw new ApplicationException(SystemException.CODE_AFTER_STOPPAYOUTIME,\n \"Current time is after stop payout time of instant game draw(id=\" + gameDraw.getId()\n + \"), can NOT validate ticket(serialNo=\" + hostTicket.getSerialNo() + \").\");\n }\n }\n // check whether the game instance name is same with GGG in ticket\n // serial\n InstantTicketSerialNo no = new InstantTicketSerialNo(BaseTicket.descryptSerialNo(hostTicket.getSerialNo()));\n if (!no.getGGG().equals(hostTicket.getGameDraw().getName())) {\n throw new ApplicationException(SystemException.CODE_WRONGFORMAT_SERIALNO, \"The GGG(\" + no.getGGG()\n + \") in ticket serialNo(\" + hostTicket.getSerialNo() + \") isn't same with game instance name(\"\n + hostTicket.getGameDraw().getName() + \").\");\n }\n\n PrizeLevelDto prize = this.getValidationStrategy().validate(hostTicket, ticket.getTicketXOR3(), false);\n\n prize.setTicket(hostTicket);\n prize.calculateAmount();\n // compare the actual amount\n if (!isIngoreCheckingAmount && sysConf.isNeedInputAmount()\n && payoutDto.getClientPrizeAmount().compareTo(prize.getPrizeAmount()) != 0) {\n throw new ApplicationException(SystemException.CODE_NOTMATCH_ACTUALAMOUNT,\n \"Client input wrong prize amount for ticket(serialNo=\" + ticket.getSerialNo() + \"), host:\"\n + prize.getPrizeAmount() + \", client:\" + payoutDto.getClientPrizeAmount());\n }\n\n // if the winning algorithm is eGame, then this operation must check\n // whether the merchant has privilege to perform payout of winning\n // levels...prize group checking\n if (hostTicket.getGameDraw().getValidationType() == InstantGameDraw.VALIDATION_TYPE_EGAME) {\n int gameType = hostTicket.getGameDraw().getGame().getType();\n Set<Integer> levels = new HashSet<Integer>();\n levels.add(prize.getPrizeLevel());\n this.getMerchantService().allowPayout(\n ctx,\n hostTicket.getGameDraw().getGame(),\n new PayoutLevelAllowRequest[] { new PayoutLevelAllowRequest(levels, gameType,\n PrizeGroupItem.GROUP_TYPE_IG) }, prize.getActualAmount());\n } else {\n this.getMerchantService().allowPayout(ctx, hostTicket.getGameDraw().getGame(), null,\n prize.getActualAmount());\n }\n\n // ------------------------------------------------------------\n // NOTE: the above statements are checking the pre-condition of\n // validation, you can NOT update any entity there. Due to batch\n // validation will invoke this method, if fail to validate one ticket,\n // the\n // modification will be committed...In fact, this transaction (one\n // ticket validation) should be roll-back.\n // ------------------------------------------------------------\n\n // set gameId\n ticket.getTransaction().setGameId(gameDraw.getGame().getId());\n // update VIRN prize\n if (prize.getVirnPrize() != null) {\n prize.getVirnPrize().setValidated(true);\n this.getInstantVIRNPrizeDao().update(prize.getVirnPrize());\n }\n\n // update prize level for later reference if the validation algorithm is\n // 'VIRN', save VIRN to InstantTicket.ticketXOR3... 'reversal'\n // transaction will need this information set VIRN to ticketXOR3\n hostTicket.setTicketXOR3(ticket.getTicketXOR3());\n // need set status to process\n hostTicket.setStatus(InstantTicket.STATUS_PROCESSING);\n hostTicket.setPrizeLevel(prize.getPrizeLevel());\n hostTicket.setPrizeAmount(prize.getPrizeAmount());\n hostTicket.setTaxAmount(prize.getTaxAmount());\n\n this.getInstantTicketDao().update(hostTicket);\n\n // update prize_win_count, JPA runtime will merge it autlmatically when\n // commit.\n prize.setNumberOfWinner(prize.getNumberOfWinner() + 1);\n\n this.generatePayoutTemp(hostTicket, prize, batchNumber);\n\n // restore credit...only count cash amount\n /* Need to handle in confirmation batch Validation.TODO: */\n /*\n * BigDecimal creditAmount = prize.getCashActualAmount(); this.getCreditService\n * ().credit(ticket.getTransaction().getOperatorId(), ticket.getTransaction().getMerchantId(), creditAmount,\n * hostTicket.getGameDraw().getGame().getId(), true, false, false);\n */\n\n // need to calculate\n\n return prize;\n }", "@Test\n\tpublic void createAccountOtherInvestmentTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnOtherInvestments.setSelected(true);\n\t\tdata.setRdbtnOtherInvestments(rdbtnOtherInvestments);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.OTHER_INVESTMENTS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "@Test( dependsOnMethods = \"testPrintTicket_NotPaid\" )\n public void testPrintTicket() throws Exception {\n Reservation reservation = service.find( reservationId, PASSWORD );\n reservation.setPaid( reservation.getCost() );\n transaction.begin();\n em.merge( reservation );\n transaction.commit();\n\n // perform and verify\n assertNotNull( service.printETicket( reservationId, PASSWORD ) );\n }", "@Test\n public void testThatResultsAppearForAOneWayJourney(){\n JourneyDetails journeyDetails = new JourneyDetailsBuilder().isOneWay(true).\n withOrigin(\"Bangalore\").withDestination(\"Delhi\").\n withDepartureDate(tomorrow()).build();\n\n\n user.searchesForAOneWayJourneyWith(journeyDetails);\n user.hasJourneyOptionsAvailableForHisOutboundJourney();\n\n\n }" ]
[ "0.6422815", "0.61524224", "0.6028183", "0.59169585", "0.5873697", "0.5872208", "0.5740359", "0.57131493", "0.5631436", "0.5628657", "0.5615531", "0.55841255", "0.5552233", "0.55396104", "0.55016136", "0.54906267", "0.5455329", "0.5444555", "0.5435321", "0.5397001", "0.5395611", "0.5391643", "0.53805727", "0.5362646", "0.535653", "0.53427833", "0.5335918", "0.5331291", "0.53259563", "0.53113693", "0.53017366", "0.52835935", "0.5268609", "0.526342", "0.5252364", "0.52514046", "0.5241061", "0.523626", "0.52335054", "0.52332014", "0.5231687", "0.5229295", "0.52227646", "0.5220123", "0.5217306", "0.5214427", "0.5209722", "0.5204236", "0.51988006", "0.5196714", "0.5193092", "0.5182097", "0.51684576", "0.5165896", "0.51628083", "0.5160395", "0.51576376", "0.5155313", "0.5142828", "0.51367795", "0.51235497", "0.5122182", "0.5120693", "0.5116515", "0.5109176", "0.5103583", "0.51018155", "0.50970733", "0.5093624", "0.50930744", "0.50866187", "0.50855356", "0.507992", "0.50754654", "0.50733036", "0.5072333", "0.50693554", "0.5069211", "0.5065009", "0.5061944", "0.50609785", "0.50484747", "0.50303656", "0.50295055", "0.50251186", "0.5022389", "0.5021768", "0.50203776", "0.5019543", "0.501694", "0.5016005", "0.50159025", "0.5015661", "0.5014925", "0.5013771", "0.5010157", "0.5009856", "0.50085706", "0.50075215", "0.50031406" ]
0.5739937
7
the paddle will move to the left.
public void moveLeft() { if (rec.getUpperLeft().getX() - 5 < leftBorder) { rec.getUpperLeft().setX(leftBorder); } else { rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveLeft(double dt) {\r\n double adjustedSpeed = this.mySpeed * dt;\r\n if (this.myPaddle.getUpperLeft().getX() - adjustedSpeed > 0) {\r\n myPaddle.getUpperLeft().setPosition(\r\n myPaddle.getUpperLeft().getX() - adjustedSpeed,\r\n myPaddle.getUpperLeft().getY());\r\n myPaddle.getLowerLeft().setPosition(\r\n myPaddle.getLowerLeft().getX() - adjustedSpeed,\r\n myPaddle.getLowerLeft().getY());\r\n myPaddle.getUpperRight().setPosition(\r\n myPaddle.getUpperRight().getX() - adjustedSpeed,\r\n myPaddle.getUpperRight().getY());\r\n myPaddle.getLowerRight().setPosition(\r\n myPaddle.getLowerRight().getX() - adjustedSpeed,\r\n myPaddle.getLowerRight().getY());\r\n this.thisOne.setRect(myPaddle);\r\n } else {\r\n myPaddle.getUpperLeft().setPosition(0, getUpperLeftY);\r\n myPaddle.getLowerLeft().setPosition(0, getUpperLeftY + 10);\r\n myPaddle.getUpperRight().setPosition(this.width, getUpperLeftY);\r\n myPaddle.getLowerRight().setPosition(this.width, getUpperLeftY + 10);\r\n this.thisOne.setRect(myPaddle);\r\n }\r\n }", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}", "public void moveLeft(){\n myRectangle.setX(myRectangle.getX() - PADDLE_SPEED);\n }", "public void moveLeft() {\n\t\tposX -= speed;\n\t}", "public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "public void moveLeft() {\n\t\t\n\t}", "public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}", "public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }", "public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}", "public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }", "private void moveLeft(){\n \n setGlobalLocation(getGlobalX() - speed, getGlobalY());\n animationSpeedLeft();\n }", "public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}", "public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}", "public void moveLeft() {\n this.velocity = this.velocity.add(leftVelocity());\n }", "public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}", "public void moveLeft() {\n locX = locX - 1;\n }", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }", "public void moveLeft() {\n\t\tsetPosX(getPosX() - steps);\n\t}", "public void moveLeft()\n {\n if (this.x >= 2) {\n --x;\n } else {\n System.out.println(\"Move is outside of the field! Try again.\");\n }\n }", "public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }", "void moveLeft();", "private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public void moveLeft() {\n this.x -= 10;\n repaint();\n }", "public void moveLeft() {\n \tif(!move.moveLeft()) {\n \t\tif(physinteractor(getX()-1,getY())) {\n \t\t\tmove.moveLeft();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "public void moveLeft()\n {\n if (!this.search_zone.isLeftBorder(this.x_position))\n {\n this.x_position = (this.x_position - 1);\n }\n }", "public void moveLeft() {\n this.accelerateXL();\n this.moveX(this.getxSpeed());\n this.setPicX(0);\n this.setPicY(141);\n this.setLoopCells(true);\n }", "public void movePaddleOnKeydown() {\n \tif (keyMouseMove == 0) return;\n \tdouble paddlePosition = paddle.getX();\n \t\n \t// don't move past the edges of the board\n \tif (paddlePosition <= 0 && keyMouseMove == -KEY_PADDLE_SPEED) return;\n \tif (paddlePosition > getWidth() - PADDLE_WIDTH && keyMouseMove == KEY_PADDLE_SPEED) return;\n\n \tpaddle.move(keyMouseMove, 0);\n }", "public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }", "private void moveLeft(GObject bottom) {\r\n\t\tif(facingEast) {\r\n\t\t\tdouble x = player.getX();\r\n\t\t\tdouble y = player.getY();\r\n\t\t\tremove(player);\r\n\t\t\tplayer = new GImage(\"PlayerWest.png\");\r\n\t\t\tplayer.scale(.75);\r\n\t\t\tadd(player, x, y);\r\n\t\t\tfacingEast = false;\r\n\t\t}\r\n\t\tif(player.getX() > 5 && bottom != null)\r\n\t\t\tplayer.move(-PLAYER_X_MOTION, 0);\r\n\t}", "public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}", "public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "@Override\n\tpublic void update(){\n\t\t\n\t\tx += dx;\n\t\tif(x <= 2){\n\t\t\tx = 2;\n\t\t}else if(x >= ((this.width+this.paddlewidth)-350)){\n\t\t\tx = (this.width+this.paddlewidth)-350;\n\t\t}else if(x <= Dimensions.PADDLE_LEFT){\n\t\t\tx = Dimensions.PADDLE_LEFT;\n\t\t}\n\t}", "private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void mouseMoved(MouseEvent e) {\n \tint paddleOffset = e.getX() - paddleXPosition - PADDLE_WIDTH / 2;\n \tpaddleXPosition += paddleOffset;\n \t\n \t// don't move past the edges of the board\n \tif (paddle.getX() <= 0 && paddleOffset < 0) return;\n \tif (paddle.getX() + PADDLE_WIDTH >= getWidth() && paddleOffset > 0) return;\n \t\n \tpaddle.move(paddleOffset, 0);\n }", "public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }", "public void moveLeft()\n\t{\n\t\tcol--;\n\t}", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "public void moveLeft(int delta){\n //if the object is not already moving at maximum speed\n if(x_velocity > -maximumSpeed){\n //then the object will accelerate towards maximum speed\n x_velocity -= accelerationSpeed*delta;\n if(x_velocity < -maximumSpeed){\n //and if the object exceeds maximum speed, set it to maximum speed\n x_velocity = -maximumSpeed;\n }\n }\n // if()\n moving = true;\n facing = Facing.LEFT;\n movingLeft = true;\n movingRight = false;\n \n \n }", "public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }", "public void mouseMoved (MouseEvent e){\n int mousePositionX = e.getX();\n int paddleX = mousePositionX - PADDLE_WIDTH / 2;\n int paddleY = (getHeight() - PADDLE_Y_OFFSET);\n movePaddle(paddleX, paddleY, mousePositionX);\n }", "public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }", "public void setLeft() {\n\t\tstate = State.LEFT;\n\t}", "private void movePaddle(int paddleX, int paddleY, int mousePositionX) {\n if (mousePositionX < PADDLE_WIDTH / 2){\n paddle.setLocation(0,paddleY);\n }\n else if (mousePositionX > getWidth() - PADDLE_WIDTH / 2){\n paddle.setLocation(getWidth() - PADDLE_WIDTH, paddleY);\n }\n else {\n paddle.setLocation(paddleX, paddleY);\n }\n }", "public void goLeft()\r\n\t{\r\n\t\tthis.X--;\r\n\t}", "public void mouseMoved(MouseEvent e) {\n\t\tif (e.getX()<=340){\n\t\t\tpaddle.move(e.getX() - paddlelastx,0);\n\t\t\tpaddlelastx = paddle.getX();\t\n\t\t}\n\t}", "public void moveTileLeft(float delta) {\n if (x > destinationX + COMBAT_MOVEMENT_SPEED * delta) speedX = -COMBAT_MOVEMENT_SPEED;\n else {\n speedX = (destinationX - x) / delta;\n isMoving = false;\n isMovingLeft = false;\n }\n direction = Direction.LEFT;\n }", "public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }", "@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "private boolean moveLeft() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() - rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() - rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }", "public void adjustLeft() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].x = tiles[x][y].x - 4;\n backGroundTiles[x][y].x = backGroundTiles[x][y].x - 4;\n grassTiles[x][y].x = grassTiles[x][y].x - 4;\n }\n }", "public void moveSpaceShipLeft() {\n\t\tSpaceship sp = getTheSpaceship();\n\t\tsp.moveLeft();\n\t}", "public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}", "private void stateMovingLeft(float dt) {\n setPosition(b2body.getPosition().x - getWidth() / 2, b2body.getPosition().y - getHeight() / 2);\n setRegion(bridgeStand);\n\n // Kinematic bodies do not collide with static ones (we can't use WorldContactListener)\n float velX;\n if (getX() <= 0) {\n velX = b2body.getLinearVelocity().x * -1;\n b2body.setLinearVelocity(velX, VELOCITY_Y);\n currentState = State.MOVING_RIGHT;\n }\n }", "public void left() {\n\t\tstate.left();\n\t}", "@Override\n\tpublic void moveLeft()\n\t{\n\t\tif (!isAtStart()) right.push(left.pop());\n\n\t}", "public void move(Player right, Player left){\n xLoc+=xVel;\n yLoc +=yVel;\n \n //bounces off the top of the playing field\n if(yLoc<5){\n yLoc = 10-yLoc;\n yVel = -yVel;\n }\n //bounces off the bottom of the playing field\n if(yLoc>495){\n yLoc = 990-(yLoc);\n yVel = -yVel;\n }\n //bounces off the right Paddle\n if(xLoc<=right.getX()+Player.WIDTH/2 && xLoc>right.getX()-Player.WIDTH/2\n && Math.abs(yLoc-right.getY())<Player.LENGTH/2){\n xLoc=20+(20-xLoc);\n if(xLoc<20)\n xLoc = 20;\n xVel=-xVel;\n accelerate();\n }\n //bounces off the left Paddle\n if(xLoc>=left.getX()-Player.WIDTH/2 && xLoc<left.getX()+Player.WIDTH/2\n && Math.abs(yLoc-left.getY())<Player.LENGTH/2){\n xLoc=475-(xLoc-475);\n xVel=-xVel;\n accelerate();\n }\n }", "public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}", "public boolean moveLeft() {\n if (position.isLinked(position.getWest())) {\n position.getGameObjects().remove(this.type);\n position = position.getWest();\n position.getGameObjects().add(this.type);\n return true;\n }\n return false;\n }", "public void setMoveLeft(boolean TorF) {\n moveLeft = TorF;\n }", "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public UserPaddle(int player)\r\n\t{\r\n\t\tupAcceleration = false;\r\n\t\tdownAcceleration = false;\r\n\t\ty = 210;\r\n\t\tyVelocity = 0;\r\n\t\tif(player == 1)\r\n\t\t{\r\n\t\t\tx = 20; //On the left side of the frame\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tx = 660; //On the right side of the frame\r\n\t\t}\r\n\t}", "public void moveLeft(int speed)\n {\n if(getRotation()==0)\n {\n turn(180);\n move(speed);\n }\n else if(getRotation()==90)\n {\n turn(90);\n move(speed);\n }\n else if(getRotation()==180)\n {\n move(speed);\n }\n else if(getRotation()==270)\n {\n turn(-90);\n move(speed);\n }\n }", "@Test\n\tpublic final void nextPositionLeftTest() {\n\t\tplayer.setLeft(true);\n\t\tplayer.setMovSpeed(3.0);\n\t\tplayer.setMaxSpeed(2.0);\n\t\tplayer.getNextXPosition();\n\t\tassertEquals(player.getDx(), -2.0, 0.1);\n\t}", "Paddle2() {\r\n//Initial paddle position\r\n\r\n t.start();\r\n addKeyListener(this);\r\n setFocusable(true);\r\n setFocusTraversalKeysEnabled(false);\r\n \r\n }", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "@Override\n\tpublic boolean moveLeft() {\n\t\tboolean rs = super.moveLeft();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "public Direction moveLeft() {\n switch(this){\n case EAST :\n return NORTH;\n case SOUTH :\n return EAST;\n case WEST :\n return SOUTH;\n case NORTH :\n return WEST;\n }\n return this;\n }", "public FallingPiece moveLeft(){\r\n return new FallingPiece(coord.moveLeft(), innerPiece);\r\n }", "private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "public void turnLeft(double speed) {\n\t\tRobotMap.frontLeft.set(-speed);\n\t\tRobotMap.backLeft.set(-speed);\n\t\tRobotMap.frontRight.set(-speed);\n\t\tRobotMap.backRight.set(-speed);\n\t}", "public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }", "public void setLeft(double speed){\n \t\tfor(int i=0; jagsLeft.length > i; i++){\n \t\t\tjagsLeft[i].set(clamp(speed,1,-1));\n \t\t}\n \t}", "@Override\r\n\tpublic void setLeft(MoveLeftCommand left) {\n\r\n\t}", "public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void animateMovementLeft()\n {\n if(animationCount%frameRate == 0)\n {\n imageNumber = (imageNumber + 1)% (leftMvt.length);\n setImage(leftMvt[imageNumber]);\n }\n }", "@FXML\n\tprivate void moveLeft(ActionEvent event) {\n\t\t\n\t\tRandom rand = new Random();\n\t\t\n\t\tint combatroll = rand.nextInt(101);\n\t\tint itemroll = rand.nextInt(101);\n\t\t\n\t\tif(l.leftValid && combat == false) {\n\t\t\tunsetValidMoves();\n\t\t\tl.moveLeft();\n\t\t\tsetCurrentPos();\n\t\t\tif(combatroll <= 80) { // Roll for combat\n\t\t\t\t\n\t\t\t\tcombat();\t\n\t\t\t}else if(itemroll>=40) {\n\t\t\t\trollCommonDrop();\n\t\t\t}\n\t\t}else {\n\t\t\treturn;\n\t\t}\n\t}", "public boolean moveLeft()\n {\n\tboolean update;\n\tboolean action = false;\n\t\t\n\tdo\n\t{\n update = false;\n\t\t\t\n for (int y=0; y<cases.length-1; y++)\n {\n for (int x=0; x<cases[y].length; x++)\n\t\t{\n boolean merge;\n boolean move;\n\t\t\t\t\t\n do\n {\n merge = merge(cases[x][y+1],cases[x][y]);\n move = move(cases[x][y+1],cases[x][y]);\n\t\t\tupdate = (update || merge || move);\n if(!action && update)\n {\n action = update; \n }\n } while (merge || move);\n }\n }\n } while (update);\n \n return action;\n }", "@Override\r\n\tpublic String moveLeft() {\n\r\n\t\tif((0<x && x<=50) && (0<=y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=50) && (40<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=50) && (0<=y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=10) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=50) && (0<=y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((40<x && x<=50) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "public void updatePositionAgain(boolean moveLeft) {\r\n // move horizontally to one direction\r\n if (moveLeft) {\r\n posx--;\r\n } else {\r\n posx++;\r\n }\r\n }", "public void leftPressed()\r\n {\r\n worldPanel.newMapPos(-zoom,0);\r\n miniMap.newMapPos(-1,0);\r\n }", "public void goLeft() {\n if(page.left == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"left\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.left;\n addQueue();\n }", "@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}", "public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}", "private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }", "public void setLeft(int x) {\r\n leftSide = x;\r\n }", "public static void setLeft(char left) {\n\t\t\tGamePreferences.left = left;\n\t\t}", "public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex >= 0) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very first line move to the end of the previous line\n if (lineIndex > 0) {\n lineIndex--;\n currentText = texts.get(lineIndex);\n characterIndex = currentText.getCharacterEdges().length - 1;\n if (characterIndex < 0) {\n characterIndex = 0;\n }\n updatePosition();\n }\n //If this is the first line character index should not change and position does not need to be updated\n else {\n characterIndex = 0;\n }\n }\n }\n }", "public void turnLeft();", "public Dir moveLeft() {\n\t\t\tint newDir = (this.ordinal() + SIZE - 1) % SIZE;\n\t\t\treturn dirArray[newDir];\n\t\t}", "private static int moveLeft()\n {\n int num_chocolates = choArr[baby.row][baby.column-1];\n // change both the choArr and baby position\n baby.column=baby.column-1;\n choArr[baby.row][baby.column]=0;\n return num_chocolates;\n }", "public void spinLeft(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(-1 * speed);\r\n \tleftBottomMotor.set(-1 * speed);\r\n \trightTopMotor.set(-1 * speed);\r\n \trightBottomMotor.set(-1 * speed);\r\n }", "public boolean moveLeft() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenLeft() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.LEFT);\r\n\t\t\tif ( currentCol-1 < 0 || maze [currentRow] [currentCol-1].isOpenRight() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol--;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol >= 0 )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Left: \" + moved );\r\n\t\treturn moved;\r\n\t}", "void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }" ]
[ "0.80663997", "0.7961063", "0.78572375", "0.7833216", "0.7821573", "0.7747086", "0.7729445", "0.77185917", "0.76599777", "0.76450497", "0.763783", "0.76268333", "0.7621412", "0.7612661", "0.7593409", "0.7584922", "0.75616", "0.7555833", "0.75468254", "0.7491877", "0.7488903", "0.74864155", "0.7463783", "0.74212724", "0.73787105", "0.7372668", "0.7257141", "0.72533536", "0.7236868", "0.72028816", "0.7158797", "0.7157106", "0.713787", "0.71219194", "0.7061361", "0.700729", "0.698751", "0.6969115", "0.694789", "0.69345874", "0.6842406", "0.6827667", "0.6811595", "0.6803541", "0.6803191", "0.68007725", "0.67885023", "0.6774559", "0.67622805", "0.67527485", "0.6749583", "0.6748767", "0.6733764", "0.67333597", "0.6725962", "0.67113614", "0.6653395", "0.659222", "0.65866506", "0.65775555", "0.6563053", "0.6559604", "0.6559499", "0.6538206", "0.65325856", "0.65270865", "0.6522274", "0.65153897", "0.65075123", "0.6490793", "0.6486356", "0.6484365", "0.6483479", "0.64821076", "0.6481686", "0.6473675", "0.64639634", "0.6458137", "0.64526916", "0.64448553", "0.64293975", "0.6423647", "0.6401428", "0.64009", "0.63917166", "0.6389129", "0.63885176", "0.63729423", "0.6351892", "0.6347601", "0.63360494", "0.6335639", "0.63334805", "0.6333437", "0.63319147", "0.63303584", "0.6313409", "0.6309846", "0.63042456", "0.6294442" ]
0.70480686
35
the paddle will move to the right.
public void moveRight() { if (rec.getUpperLeft().getX() + rec.getWidth() + 5 > rightBorder) { rec.getUpperLeft().setX(rightBorder - rec.getWidth()); } else { rec.getUpperLeft().setX(rec.getUpperLeft().getX() + 5); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "public void moveRight(double dt) {\r\n double adjustedSpeed = this.mySpeed * dt;\r\n if (this.myPaddle.getUpperRight().getX() + adjustedSpeed < 800) {\r\n myPaddle.getUpperLeft().setPosition(\r\n myPaddle.getUpperLeft().getX() + adjustedSpeed,\r\n myPaddle.getUpperLeft().getY());\r\n myPaddle.getLowerLeft().setPosition(\r\n myPaddle.getLowerLeft().getX() + adjustedSpeed,\r\n myPaddle.getLowerLeft().getY());\r\n myPaddle.getUpperRight().setPosition(\r\n myPaddle.getUpperRight().getX() + adjustedSpeed,\r\n myPaddle.getUpperRight().getY());\r\n myPaddle.getLowerRight().setPosition(\r\n myPaddle.getLowerRight().getX() + adjustedSpeed,\r\n myPaddle.getLowerRight().getY());\r\n this.thisOne.setRect(myPaddle);\r\n } else {\r\n myPaddle.getUpperLeft().setPosition(800 - this.width, getUpperLeftY);\r\n myPaddle.getLowerLeft().setPosition(800 - this.width, getUpperLeftY + 10);\r\n myPaddle.getUpperRight().setPosition(800, getUpperLeftY);\r\n myPaddle.getLowerRight().setPosition(800, getUpperLeftY + 10);\r\n this.thisOne.setRect(myPaddle);\r\n }\r\n\r\n }", "public void moveRight(){\n myRectangle.setX(myRectangle.getX() + PADDLE_SPEED);\n }", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "public void moveRight() {\n\t\tposX += speed;\n\t}", "public void moveRight() {\n\t\t\n\t}", "public void moveRight() {\r\n\t\r\n\t\tint rightSteps=10;\r\n\t\t\ttopX+= rightSteps;\r\n\t}", "public void moveRight()\n\t{\n\t\tmoveRight = true;\n\t}", "public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}", "public void moveRight() {\n locX = locX + 1;\n }", "public void moveRight() {\n if (!this.state.equals(\"onRightWall\")) {\n this.dir = 1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "void moveRight();", "public void moveRight()\n {\n if (xPos == xBound)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - positive X because we are moving RIGHT! \n movementX = 0.5;\n movementY = 0;\n }", "public void moveRight() {\n if (xcoor <= Game.widthOfGameBoard - movingSpeed) {\n xcoor = xcoor + movingSpeed * 2;\n }\n }", "public void moveRight() {\n Coordinate rightCoord = new Coordinate(getX() + 1, getY());\n handleMove(rightCoord, InteractionHandler.RIGHT);\n }", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public void moveRight()\n\t{\n\t\tx = x + STEP_SIZE;\n\t}", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "public void right() {\n if (x + movementSpeed < 450) {\r\n x = x + movementSpeed;\r\n }\r\n }", "public void moveRight() {\n\t\tif (x1 < 24 && x2 < 24 && x3 < 24 && x4 < 24) {\n\t\t\tclearPiece();\n\t\t\tx1 += 1;\n\t\t\tx2 += 1;\n\t\t\tx3 += 1;\n\t\t\tx4 += 1;\n\t\t\tsetPiece();\n\t\t\trepaint();\n\t\t}\n\t}", "public void moveRight() {\n\t\tsetPosX(getPosX() + steps);\n\t}", "public void moveRight() {\n this.velocity = this.velocity.add(rightVelocity());\n }", "public void moveRight() {\n speedX += (speedX < 0) ? acceleration * 2 : acceleration;\n if (speedX > maxSpeed) {\n speedX = maxSpeed;\n }\n direction = Direction.RIGHT;\n }", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "public void moveRight(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.RIGHT;\n\t\tif(animation!=ANIMATION.MOVERIGHT) {\n\t\t\tanimation=ANIMATION.MOVERIGHT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.RIGHT;\n\t\tdirection=\"right\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=spd/2;\n\t\tvelY=0;\n\t}", "public void goRight() {\n\t\tx += dx;\n\t\tbgBack.setDx(false);\n\t\tbgBack.move();\n\t\tif(x > Game.WIDTH - 200) {\n\t\t\tif(!bgBack.getReachEnd()) {\n\t\t\t\tx = Game.WIDTH - 200;\n\t\t\t\tbgFront.setDx(false);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x > Game.WIDTH - 50) {\n\t\t\t\tx = Game.WIDTH - 50;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void update(){\n\t\t\n\t\tx += dx;\n\t\tif(x <= 2){\n\t\t\tx = 2;\n\t\t}else if(x >= ((this.width+this.paddlewidth)-350)){\n\t\t\tx = (this.width+this.paddlewidth)-350;\n\t\t}else if(x <= Dimensions.PADDLE_LEFT){\n\t\t\tx = Dimensions.PADDLE_LEFT;\n\t\t}\n\t}", "public void moveRight() {\n this.accelerateXR();\n this.moveX(this.getxSpeed());\n this.setPicX(0);\n this.setPicY(74);\n this.setLoopCells(true);\n }", "public void moveRight()\n {\n if (!this.search_zone.isRightBorder(this.x_position))\n {\n this.x_position = (this.x_position + 1);\n }\n }", "public void moveRight() {\n for(int i=0;i<this.body.size();i++){\n// TranslateTransition translate = new TranslateTransition();\n// translate.setNode(this.body.get(i));\n// smoothSnake obj=new smoothSnake();\n// obj.swiftSnake(translate,i,this,1);\n this.body.get(i).setCenterX(this.body.get(i).getCenterX()+10);\n }\n\n \tsetScoreText();\n }", "public void moveRight() {\n this.position.addColumn(1);\n }", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "public void movePaddleOnKeydown() {\n \tif (keyMouseMove == 0) return;\n \tdouble paddlePosition = paddle.getX();\n \t\n \t// don't move past the edges of the board\n \tif (paddlePosition <= 0 && keyMouseMove == -KEY_PADDLE_SPEED) return;\n \tif (paddlePosition > getWidth() - PADDLE_WIDTH && keyMouseMove == KEY_PADDLE_SPEED) return;\n\n \tpaddle.move(keyMouseMove, 0);\n }", "public void moveRight() {\r\n speedX = 6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/rightWalk1.png\");\r\n img = new Sprite (r1);\r\n if (centerX > startScrolling)\r\n bg.setBackX (bg.getBackX () + 6);\r\n bg.update ();\r\n }", "public void moveLeft(double dt) {\r\n double adjustedSpeed = this.mySpeed * dt;\r\n if (this.myPaddle.getUpperLeft().getX() - adjustedSpeed > 0) {\r\n myPaddle.getUpperLeft().setPosition(\r\n myPaddle.getUpperLeft().getX() - adjustedSpeed,\r\n myPaddle.getUpperLeft().getY());\r\n myPaddle.getLowerLeft().setPosition(\r\n myPaddle.getLowerLeft().getX() - adjustedSpeed,\r\n myPaddle.getLowerLeft().getY());\r\n myPaddle.getUpperRight().setPosition(\r\n myPaddle.getUpperRight().getX() - adjustedSpeed,\r\n myPaddle.getUpperRight().getY());\r\n myPaddle.getLowerRight().setPosition(\r\n myPaddle.getLowerRight().getX() - adjustedSpeed,\r\n myPaddle.getLowerRight().getY());\r\n this.thisOne.setRect(myPaddle);\r\n } else {\r\n myPaddle.getUpperLeft().setPosition(0, getUpperLeftY);\r\n myPaddle.getLowerLeft().setPosition(0, getUpperLeftY + 10);\r\n myPaddle.getUpperRight().setPosition(this.width, getUpperLeftY);\r\n myPaddle.getLowerRight().setPosition(this.width, getUpperLeftY + 10);\r\n this.thisOne.setRect(myPaddle);\r\n }\r\n }", "public void moveRight() {\n \t\n \tif(!move.moveRight()) {\n \t\tif(physinteractor(getX()+1,getY())) {\n \t\t\tmove.moveRight();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \t//System.out.print(\"I moved right\" + getX() + getY());\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "private void moveRight(){\n if(getXFromCamera() > -10 && getXFromCamera() < 10){\n getWorld().moveCamera(speed);\n }\n setGlobalLocation(getGlobalX() + speed, getGlobalY());\n animationSpeedRight();\n }", "private void playerMoveRight()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() + 1);\n if (this.getCurrentX() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public void moveLeft(){\n myRectangle.setX(myRectangle.getX() - PADDLE_SPEED);\n }", "public void move(Player right, Player left){\n xLoc+=xVel;\n yLoc +=yVel;\n \n //bounces off the top of the playing field\n if(yLoc<5){\n yLoc = 10-yLoc;\n yVel = -yVel;\n }\n //bounces off the bottom of the playing field\n if(yLoc>495){\n yLoc = 990-(yLoc);\n yVel = -yVel;\n }\n //bounces off the right Paddle\n if(xLoc<=right.getX()+Player.WIDTH/2 && xLoc>right.getX()-Player.WIDTH/2\n && Math.abs(yLoc-right.getY())<Player.LENGTH/2){\n xLoc=20+(20-xLoc);\n if(xLoc<20)\n xLoc = 20;\n xVel=-xVel;\n accelerate();\n }\n //bounces off the left Paddle\n if(xLoc>=left.getX()-Player.WIDTH/2 && xLoc<left.getX()+Player.WIDTH/2\n && Math.abs(yLoc-left.getY())<Player.LENGTH/2){\n xLoc=475-(xLoc-475);\n xVel=-xVel;\n accelerate();\n }\n }", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "public void moveLeft() {\n\t\t\n\t}", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "private void moveRight(GObject bottom) {\r\n\t\tif(!facingEast) {\r\n\t\t\tdouble x = player.getX();\r\n\t\t\tdouble y = player.getY();\r\n\t\t\tremove(player);\r\n\t\t\tplayer = new GImage(\"PlayerEast.png\");\r\n\t\t\tplayer.scale(.75);\r\n\t\t\tadd(player, x, y);\r\n\t\t\tfacingEast = true;\r\n\t\t}\r\n\t\tif(player.getX() < getWidth() - player.getWidth() - 5 && bottom != null)\r\n\t\t\tplayer.move(PLAYER_X_MOTION, 0);\r\n\t}", "public void slideRight() {\n turnRight();\n move();\n turnLeft();\n }", "public void moveLeft() {\n\t\tposX -= speed;\n\t}", "public void moveRight(int delta){\n if(x_velocity < maximumSpeed){\n x_velocity += accelerationSpeed*delta;\n if(x_velocity > maximumSpeed){\n x_velocity = maximumSpeed;\n }\n }\n moving = true;\n facing = Facing.RIGHT;\n movingRight = true;\n movingLeft = false;\n }", "public void goRight()\r\n\t{\r\n\t\tthis.X++;\r\n\t}", "public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }", "void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}", "public void right () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.EAST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }", "void moveLeft();", "private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}", "public void moveLeft() {\n this.velocity = this.velocity.add(leftVelocity());\n }", "public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}", "public void moveRight()\n\t{\n\t\tcol++;\n\t}", "private void goAcrossWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move();\n\t\tthis.turnRight();\n\t}", "public static void turnRight() {\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.backward();\n }", "private void moveRightLeft(int Width) {\n if (goingRight) {\n if (getX() + wolfWidth >= Width) turnAround();\n else setX(getX() + Width / 40);\n } else {\n if (getX() <= 0) turnAround();\n else setX(getX() - Width / 40);\n }\n }", "protected void down() {\n move(positionX, positionY + 1);\n orientation = BattleGrid.RIGHT_ANGLE;\n }", "public void moveLeft()\n {\n if (this.x >= 2) {\n --x;\n } else {\n System.out.println(\"Move is outside of the field! Try again.\");\n }\n }", "public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "public void moveLeft() {\n locX = locX - 1;\n }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "public void calRightMove() {\n }", "@Override\n\tpublic void run() {\n\t\tmoveRight();\n\t}", "public void moveLeft() {\n this.x -= 10;\n repaint();\n }", "public void moveRight(int x){\r\n \tbox.translate(x,0);\r\n \tif (selfmove){ //if the frog is moving itself\r\n \t\timg = imgs[1]; //draw a moving animation\r\n \t\tdelay = 10; //for 10 frames\r\n \t}\r\n \t\r\n }", "public boolean moveRight() {\r\n\t\tif (this.x >= 1050 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x += 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void moveLeft()\n\t{\n\t\tcol--;\n\t}", "public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}", "public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}", "private boolean moveRight() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() + rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() + rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }", "void moveRight() {\n\t\ttry {\n\t\t\twhile(x + 60 < getWidth()) {\n\t\t\t\tx += 10;\n\t\t\t\twin.repaint();\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t} catch(InterruptedException e) {\n\t\t}\n\t}", "public Vertex moveRight() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x + 1, e);\n }\n return current;\n }", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "private void moveLeft(){\n \n setGlobalLocation(getGlobalX() - speed, getGlobalY());\n animationSpeedLeft();\n }", "public void moveShiftRight();", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "public void moveSpaceShipRight() {\n\t\tSpaceship sp = getTheSpaceship();\n\t\tsp.moveRight();\n\t}", "public void right() {\n\t\tstate.right();\n\t}", "void move() {\n\t\tif (reachedEdge()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\t\tif (reachedLeft()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\n\t\tx = x + velocityX;\n\t}", "@Override\n\tpublic void moveRight()\n\t{\n\t\tif (!isAtEnd()) left.push(right.pop());\n\t}", "public void goLeft()\r\n\t{\r\n\t\tthis.X--;\r\n\t}", "public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}", "public void turnRight() { turn(\"RIGHT\"); }", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}", "@Override\n\tpublic boolean moveRight() {\n\t\tboolean rs = super.moveRight();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "public void move() {\n\t\tif(right) {\n\t\t\tgoRight();\n\t\t\tstate++;\n\t\t\tif(state > 5) {\n\t\t\t\tstate = 3;\n\t\t\t}\n\t\t}\n\t\telse if(left) {\n\t\t\tgoLeft();\n\t\t\tstate++;\n\t\t\tif(state > 2) {\n\t\t\t\tstate = 0;\n\t\t\t}\n\t\t}\n\t}", "@FXML\n\tprivate void moveRight(ActionEvent event) {\n\t\t\n\t\tRandom rand = new Random();\n\t\t\n\t\tint combatroll = rand.nextInt(101);\n\t\tint itemroll = rand.nextInt(101);\n\t\t\n\t\tif(l.rightValid && combat == false) {\n\t\t\tunsetValidMoves();\n\t\t\tl.moveRight();\n\t\t\tsetCurrentPos();\n\t\t\t\n\t\t\tif(combatroll <= 80) { // Roll for combat\n\t\t\t\t\n\t\t\tcombat();\t\n\t\t\t}else if(itemroll>=40) {\n\t\t\t\trollCommonDrop();\n\t\t\t}\n\t\t}else {\n\t\t\treturn;\n\t\t}\n\t}", "private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}", "private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}", "@Override\n \tpublic void move(int keycode) {\n \t\t\n \t\tif (keycode == Keyboard.KEY_D) {\n \t\t\tsetRight(true);\n \t\t} else if (keycode == Keyboard.KEY_A) {\n \t\t\tsetRight(false);\n \t\t}\n \t\t\n \t\tcheckBorders(keycode);\n \t\t\n \t\tif (checkCollisions(keycode))\n \t\t\tsuper.move(keycode);\n \t\t\n \t}", "public void moveX(int dir) { velocity.add(PVector.mult(right, speed * dir)); }", "private void stateMovingRight(float dt) {\n setPosition(b2body.getPosition().x - getWidth() / 2, b2body.getPosition().y - getHeight() / 2);\n setRegion(bridgeStand);\n\n // Kinematic bodies do not collide with static ones (we can't use WorldContactListener)\n float velX;\n if (getX() + getWidth() >= screen.getGameViewPort().getWorldWidth()) {\n velX = b2body.getLinearVelocity().x * -1;\n b2body.setLinearVelocity(velX, VELOCITY_Y);\n currentState = State.MOVING_LEFT;\n }\n }" ]
[ "0.78299683", "0.7784774", "0.7721312", "0.77151316", "0.76304394", "0.75884235", "0.753289", "0.75184864", "0.75069785", "0.74596846", "0.7446109", "0.74426574", "0.7439171", "0.7410844", "0.7331325", "0.73228365", "0.7317012", "0.7298767", "0.729447", "0.72757596", "0.7267488", "0.7245887", "0.7192083", "0.7186589", "0.7159011", "0.71525246", "0.7146327", "0.7144318", "0.7107717", "0.70775133", "0.70763856", "0.7072779", "0.70641786", "0.7039981", "0.7032993", "0.6974608", "0.69663656", "0.69355685", "0.69349974", "0.69112915", "0.6909702", "0.6891521", "0.68699306", "0.68460935", "0.68374264", "0.682902", "0.6826745", "0.68015146", "0.6800662", "0.678506", "0.67789406", "0.67578304", "0.6747822", "0.67080534", "0.6698322", "0.66953844", "0.6692599", "0.668566", "0.66815245", "0.6679598", "0.66620535", "0.6654733", "0.660671", "0.6598198", "0.65810966", "0.6574337", "0.65512717", "0.65490454", "0.65278184", "0.65271646", "0.65118736", "0.65006363", "0.64869255", "0.6473203", "0.6453148", "0.642442", "0.64204055", "0.6412267", "0.64092207", "0.64069015", "0.64045376", "0.63985616", "0.63971585", "0.6394912", "0.6394898", "0.63753974", "0.63676536", "0.63507557", "0.6350564", "0.6346255", "0.63434684", "0.6335676", "0.6324528", "0.6309087", "0.63059247", "0.6301588", "0.6300338", "0.6300218", "0.62997276", "0.62985146" ]
0.6817997
47
Sprite check if the "left" or "right" keys are pressed, and if so move it accordingly.
public void timePassed() { if (keyboard.isPressed(KeyboardSensor.LEFT_KEY) && keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) { return; } else if (keyboard.isPressed(KeyboardSensor.LEFT_KEY)) { moveLeft(); } else if (keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) { moveRight(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \tpublic void move(int keycode) {\n \t\t\n \t\tif (keycode == Keyboard.KEY_D) {\n \t\t\tsetRight(true);\n \t\t} else if (keycode == Keyboard.KEY_A) {\n \t\t\tsetRight(false);\n \t\t}\n \t\t\n \t\tcheckBorders(keycode);\n \t\t\n \t\tif (checkCollisions(keycode))\n \t\t\tsuper.move(keycode);\n \t\t\n \t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\r\n\t\tint key = e.getKeyCode(); // search for keyCode\r\n\t\tif(key == KeyEvent.VK_RIGHT) { //if right key is used move plus 10 places to the right\r\n\t\t\tplayerShip.setXSpeed(10);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(key == KeyEvent.VK_LEFT) {\r\n\t\t\tplayerShip.setXSpeed(-10); //if left key is used move minus 10 places to the left\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t// Key Press Left\n\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT && (player.getImage().getX() - 1 >= 0)) {\n\t\t\tisMovingLeft = true;\n\t\t\tplayer.getImage().setImage(\"LeftShipStationary.png\");\n\t\t\tplayer.move(-1, 0);\n\t\t}\n\t\t// Key Press Right\n\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT\n\t\t\t\t&& ((player.getImage().getX() + player.getImage().getWidth()) + 1 <= MainApplication.WINDOW_WIDTH)) {\n\t\t\tisMovingLeft = false;\n\t\t\tplayer.getImage().setImage(\"FrontShipStationary.png\");\n\t\t\tplayer.move(1, 0);\n\t\t}\n\t\t// Key Press Up\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP\n\t\t\t\t&& (player.getImage().getY() - 1 >= (topMatte.getY() + topMatte.getHeight()))) {\n\t\t\tif (isMovingLeft) {\n\t\t\t\tplayer.getImage().setImage(\"leftfacing_movingup.png\");\n\t\t\t} else {\n\t\t\t\tplayer.getImage().setImage(\"frontfacing_movingup.png\");\n\t\t\t}\n\t\t\tplayer.move(0, -1);\n\n\t\t}\n\t\t// Key Press Down\n\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN && ((player.getImage().getY() + player.getImage().getHeight())\n\t\t\t\t+ 1 <= (MainApplication.WINDOW_HEIGHT - (MainApplication.WINDOW_HEIGHT / ASPECT_RATIO)))) {\n\t\t\tif (isMovingLeft) {\n\t\t\t\tplayer.getImage().setImage(\"leftfacing_movingdown.png\");\n\t\t\t} else {\n\t\t\t\tplayer.getImage().setImage(\"frontfacing_movingdown.png\");\n\t\t\t}\n\t\t\tplayer.move(0, 1);\n\t\t}\n\t}", "public void movement() {\n\n\t\t// If the player wants to move left ie presses 'a' key..\n\t\tif (spaceInvadersGame.getKeyManager().left) {\n\n\t\t\t// If the player is on the left bound of the window do not move.\n\t\t\tif (xPosition <= 0) {\n\n\t\t\t\t// Move the player's xPosition left.\n\t\t\t} else {\n\t\t\t\txPosition -= playerSpeed;\n\t\t\t}\n\n\t\t} else if (spaceInvadersGame.getKeyManager().right) {\n\t\t\tif (xPosition >= 500 - width) {\n\n\t\t\t} else {\n\t\t\t\txPosition += playerSpeed;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\n if (e.getKeyCode() == 87) {\r\n player.move(0,-1, border);\r\n }\r\n //down\r\n if (e.getKeyCode() == 83) {\r\n player.move(0,1, border);\r\n }\r\n //left\r\n if (e.getKeyCode() == 65) {\r\n player.move(-1,0, border);\r\n }\r\n //right\r\n if (e.getKeyCode() == 68) {\r\n player.move(1,0, border);\r\n }\r\n System.out.printf(\"\\nKeyCode: %d was pressed\",e.getKeyCode());\r\n }", "public void key()\r\n {\n int leftChange=-60;//choose the appropriate left step size ; \r\n int rightChange=60;//choose the appropriate right step size ; \r\n int upChange=-60;//choose the appropriate up step size ; \r\n int downChange=60;//choose the appropriate down step size ; \r\n if (Greenfoot.isKeyDown(\"left\"))\r\n {\r\n if (canMove(leftChange, 0)==true){\r\n setLocation(getX()+leftChange, getY()) ;}\r\n Greenfoot.playSound(\"move.wav\"); //(Sound-Ideas,2014)\r\n }\r\n if (Greenfoot.isKeyDown(\"right\"))\r\n {\r\n if (canMove(rightChange, 0)==true){\r\n setLocation(getX()+rightChange, getY()) ;}\r\n Greenfoot.playSound(\"move.wav\"); //(Sound-Ideas,2014)\r\n }\r\n if (Greenfoot.isKeyDown(\"up\"))\r\n {\r\n if (canMove(0, upChange)==true){\r\n setLocation(getX(), getY()+upChange) ;}\r\n }\r\n if (Greenfoot.isKeyDown(\"down\"))\r\n {\r\n if (canMove(0, downChange)==true){\r\n setLocation(getX(), getY()+downChange) ;}\r\n }\r\n }", "void move_ship() {\n if (pressed_key_codes.contains(KeyCode.A)) {\n ship.moveLeft();\n ship_image_view.setX(ship.x_position);\n }\n if (pressed_key_codes.contains(KeyCode.D)) {\n ship.moveRight();\n ship_image_view.setX(ship.x_position);\n }\n }", "public void keyPressed(KeyEvent e) {\n\t\txVel = 0;\n\t\tyVel = 0;\n\t\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\t\tmoveLeft();\n\t\t\t}\n\t\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\t\tmoveRight();\n\t\t\t}\n\t\t\n\t\tif (xVel == 0) {\n\t\t\tif (e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\t\tmoveUp();\n\t\t\t}\n\t\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\t\tmoveDown();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n //used the keyPressed event \r\n public void keyPressed(KeyEvent e) {\n int key = e.getKeyCode();\r\n //If statements works if the key pressed && opposite direction from what it is travelling in \r\n //can't Double back ,should be game over so to avoid it we use the !(not) variable \r\n if ((key == KeyEvent.VK_LEFT) && (!right)) {\r\n left = true;\r\n up = false;\r\n down = false;\r\n }\r\n if ((key == KeyEvent.VK_RIGHT) && (!left)) {\r\n right = true;\r\n up = false;\r\n down = false;\r\n }\r\n if ((key == KeyEvent.VK_UP) && (!down)) {\r\n up= true;\r\n right = false;\r\n left = false;\r\n }\r\n if ((key == KeyEvent.VK_DOWN) && (!up)) {\r\n down= true;\r\n right = false;\r\n left = false;\r\n }\r\n }", "public void leftPressed() {\n\t\tkeys.get(keys.put(Keys.LEFT, true));\n\t}", "public void setKeyMoveLeft(KeyCode moveLeft) {\n this.moveLeft = moveLeft;\n }", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "public void move(Player right, Player left){\n xLoc+=xVel;\n yLoc +=yVel;\n \n //bounces off the top of the playing field\n if(yLoc<5){\n yLoc = 10-yLoc;\n yVel = -yVel;\n }\n //bounces off the bottom of the playing field\n if(yLoc>495){\n yLoc = 990-(yLoc);\n yVel = -yVel;\n }\n //bounces off the right Paddle\n if(xLoc<=right.getX()+Player.WIDTH/2 && xLoc>right.getX()-Player.WIDTH/2\n && Math.abs(yLoc-right.getY())<Player.LENGTH/2){\n xLoc=20+(20-xLoc);\n if(xLoc<20)\n xLoc = 20;\n xVel=-xVel;\n accelerate();\n }\n //bounces off the left Paddle\n if(xLoc>=left.getX()-Player.WIDTH/2 && xLoc<left.getX()+Player.WIDTH/2\n && Math.abs(yLoc-left.getY())<Player.LENGTH/2){\n xLoc=475-(xLoc-475);\n xVel=-xVel;\n accelerate();\n }\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tplayer.right = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tplayer.left = true; \n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_Z) {\n\t\t\tplayer.shoot = true;\n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tplayer.up = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tplayer.down = true; \n\t\t}\n}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\t// object.x = object.x + 20;\n\t\t\t// snake1.x = snake1.x + snake1.speed;\n\t\t\tsnake1.right = true;\n\t\t\tsnake1.left = false;\n\t\t\tsnake1.up = false;\n\t\t\tsnake1.down = false;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\t// object.x = object.x - 20;\n\t\t\t// snake1.x = snake1.x - snake1.speed;\n\t\t\tsnake1.right = false;\n\t\t\tsnake1.left = true;\n\t\t\tsnake1.up = false;\n\t\t\tsnake1.down = false;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\t// object.y = object.y + 20;\n\t\t\tsnake1.right = false;\n\t\t\tsnake1.left = false;\n\t\t\tsnake1.up = false;\n\t\t\tsnake1.down = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\t// object.y = object.y - 20;\n\t\t\tsnake1.right = false;\n\t\t\tsnake1.left = false;\n\t\t\tsnake1.up = true;\n\t\t\tsnake1.down = false;\n\t\t}\n\n\t}", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "@Override\n\tpublic boolean move() {\n\n\t\tif ((key_state & MyConst.Key.LEFT) == MyConst.Key.LEFT)\n\t\t\tif (x <= 0) {\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t\tthis.x = 0;\n\t\t\t} else {\n\t\t\t\tthis.pos.x -= 5;\n\t\t\t\tthis.x -= 5;\n\t\t\t}\n\t\tif ((key_state & MyConst.Key.RIGHT) == MyConst.Key.RIGHT)\n\t\t\tif (x >= MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null)) {\n\t\t\t\tx = MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null);\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t} else {\n\t\t\t\tthis.pos.x += 5;\n\t\t\t\tx += 5;\n\t\t\t}\n\t\tif (((key_state & MyConst.Key.UP) == MyConst.Key.UP) && !jump) {\n\t\t\tjump = true;\n\t\t\tSystem.out.println(jump);\n\t\t}\n\n\t\tif ((key_state & MyConst.Key.FIRE) == MyConst.Key.FIRE) {\n\t\t\tSystem.out.println(\"--Fire--\");\n\t\t\tbulletManager.make_bullet(x + width / 2, y);\n\t\t}\n\n\t\t// jump\n\t\tif (jump) {\n\t\t\tSystem.out.println(this.y);\n\t\t\tif (this.y >= jump_interval) {\n\t\t\t\tthis.y -= 5;\n\t\t\t\tthis.pos.y -= 5;\n\t\t\t} else {\n\t\t\t\tjump = false;\n\n\t\t\t}\n\t\t} else if (!jump && (this.y < MyConst.GamePan.GAMEPAN_H - height)) {\n\t\t\tthis.y += 5;\n\t\t\tthis.pos.y += 5;\n\t\t}\n\t\treturn false;\n\t}", "void keyPressed() {\n if (key == 'w') {\n up = true;\n }\n if (key == 's') {\n down = true;\n }\n if (key == 'a') {\n left = true;\n\n }\n if (key == 'd') {\n right = true;\n\n }\n \n if (key == 27) {\n pause = !pause;\n }\n\n // player.turnToDir(0);\n}", "private void rightButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_rightButtonKeyPressed\n\n this.rightButton.setEnabled(true);\n if(!this.right){\n this.controller.setRight(true);\n this.right = true;\n }\n }", "public void rightPressed() \n\t{\n\t\tkeys.get(keys.put(Keys.RIGHT, true));\n\t}", "public void keyPressed(KeyEvent e) \n { \t \t\t \t\n \tif (e.getKeyCode() == KeyEvent.VK_RIGHT)\n \t{\n \t\tRIGHT=true;\n \t}\n \tif (e.getKeyCode() == KeyEvent.VK_LEFT)\n \t{\n \t\tLEFT=true;\n \t}\t \t\n }", "private void manageKeys() {\n if (!gameOver) {\n if (keyStateManager.isPressed(KeyEvent.VK_UP) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_UP)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_UP);\n if (currentPiece.rotateRight(grid)) {\n effectsReader.play(\"rotate.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_DOWN)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_DOWN);\n if (keyStateManager.canBeUsed(KeyEvent.VK_DOWN)) {\n if (currentPiece.canDown(grid)) {\n currentPiece.down();\n if (!keyStateManager.isAlreadyPressed(KeyEvent.VK_DOWN)) {\n effectsReader.play(\"move.mp3\", 1);\n }\n timeBufer = 0;\n score += 1;\n keyStateManager.setAlreadyPressed(KeyEvent.VK_DOWN);\n } else if (sincePieceDown == null) {\n sincePieceDown = LocalTime.now();\n sinceLastMove = LocalTime.now();\n }\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_LEFT)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_LEFT);\n if (keyStateManager.canBeUsed(KeyEvent.VK_LEFT)) {\n if (currentPiece.setXDirection(-1, grid)) {\n effectsReader.play(\"move.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n keyStateManager.setAlreadyPressed(KeyEvent.VK_LEFT);\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_RIGHT)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_RIGHT);\n if (keyStateManager.canBeUsed(KeyEvent.VK_RIGHT)) {\n if (currentPiece.setXDirection(1, grid)) {\n effectsReader.play(\"move.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n keyStateManager.setAlreadyPressed(KeyEvent.VK_RIGHT);\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_SPACE) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_SPACE)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_SPACE);\n if (currentPiece.canDown(grid)) {\n score += (currentPiece.fix() * 2);\n sincePieceDown = LocalTime.MIN;\n sinceLastMove = LocalTime.MIN;\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_C)) {\n if (!hasSwiched && !keyStateManager.isAlreadyPressed(KeyEvent.VK_C)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_C);\n if (holdPiece == null) {\n holdPiece = currentPiece;\n holdPiece.setPointsAsInitial();\n initNextPiece();\n } else {\n Piece tempPiece = holdPiece;\n holdPiece = currentPiece;\n holdPiece.setPointsAsInitial();\n currentPiece = tempPiece;\n currentPiece.initPosition(grid);\n hasSwiched = true;\n sincePieceDown = null;\n sinceLastMove = null;\n }\n effectsReader.play(\"hold.mp3\", 1);\n }\n } \n if (keyStateManager.isPressed(KeyEvent.VK_Z) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_Z)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_Z);\n if (currentPiece.rotateLeft(grid)) {\n effectsReader.play(\"rotate.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n }\n } else {\n if (keyStateManager.isPressed(KeyEvent.VK_R)) {\n initGame();\n }\n }\n }", "public void setKeyMoveRight(KeyCode moveRight) {\n this.moveRight = moveRight;\n }", "public void moveRight()\n\t{\n\t\tmoveRight = true;\n\t}", "public void keyReleased() {\n if (key == 'z' || key == 'Z') shoot = false;\n if (keyCode == UP) up = false;\n if (keyCode == DOWN) down = false;\n if (keyCode == LEFT) left = false;\n if (keyCode == RIGHT) right = false;\n}", "void keyLeft();", "public void moveLeft() {\n\t\t\n\t}", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\n\t\t\n\t\t\n\t\tif(e.getKeyCode()== KeyEvent.VK_W||e.getKeyCode()==KeyEvent.VK_UP){\n\t\t\t\n\t\t\t\n\t\t\tif(Player.playery>0){\n\t\t\t\tup=true;\n\t\t\t\tif(Obstacles.movementCheck(Player.playerx, (Player.playery-1))){\n\t\t\t\t\tPlayer.playery-=1;\n\t\t\t\t}\n\t\t\t\tup=false;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(Player.playery==0){\n\t\t\tMap.mapChange(\"w\");\n\t\t\t}\n\t\t}\n\n\t\telse if(e.getKeyCode()==KeyEvent.VK_S||e.getKeyCode()==KeyEvent.VK_DOWN){\n\t\t\t\n\t\t\tif(Player.playery<7){\n\t\t\t\tdown=true;\n\t\t\t\tif(Obstacles.movementCheck(Player.playerx, (Player.playery+1))){\n\t\t\t\t\tPlayer.playery+=1;\n\t\t\t\t}\n\t\t\t\n\t\t\tdown=false;\n\t\t\t}\n\t\t\telse if(Player.playery==7){\n\t\t\t\tMap.mapChange(\"s\");\t\t\t\n\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_A||e.getKeyCode()==KeyEvent.VK_LEFT){\n\t\t\t\tif(Player.playerx>0){\n\t\t\t\tleft=true;\n\t\t\t\tif(Obstacles.movementCheck((Player.playerx-1), Player.playery)){\n\t\t\t\n\t\t\tPlayer.playerx-=1;\n\t\t\t}\t\n\t\t\t\tleft=false;\n\t\t\t\t}\n\t\t\t\telse if(Player.playerx==0){\n\t\t\t\tMap.mapChange(\"a\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_D||e.getKeyCode()==KeyEvent.VK_RIGHT){\n\t\t\t\tif(Player.playerx<15){\n\t\t\t\tright=true;\n\t\t\t\tif(Obstacles.movementCheck((Player.playerx+1), Player.playery)){\n\t\t\t\tPlayer.playerx+=1;\n\t\t\t\t}\n\t\t\t\tright=false;\n\t\t\t\t}\n\t\t\t\telse if(Player.playerx==15){\n\t\t\t\t\tMap.mapChange(\"D\");\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_SPACE){\n\t\t\t\tObstacles.itemCheck();\n\t\t\t\tObstacles.checkDialogue();\n\t\t\t}\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_I){\n\t\t\t\tif(I){\n\t\t\t\t\tGui.inventory(I);\n\t\t\t\t\tI=false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tGui.inventory(!I);\n\t\t\t\tI=true; \n\t\t\t\t}\n\t\t\t}\n\t\tPlayer.playerRepaint();\n\t\t\t\n\t\t\n\t}", "private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }", "public void keyPressed(KeyEvent e) {\r\n\t\t// left arrow\r\n\t\tif (e.getKeyCode() == 37 || e.getKeyCode() == 65) {\r\n\t\t\tleft = true;\r\n\t\t\tlastPressed = 2;\r\n\t\t}\r\n\t\t// up arrow\r\n\t\tif (e.getKeyCode() == 38 || e.getKeyCode() == 87) {\r\n\t\t\t//checks if grounded if it is then it allows you to jump\r\n\t\t\tif (playerObject[0].isGrounded()) {\r\n\t\t\t\tplayerObject[0].setVelocityY(-12);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// right arrow\r\n\t\tif (e.getKeyCode() == 39 || e.getKeyCode() == 68) {\r\n\t\t\tright = true;\r\n\t\t\tlastPressed = 1;\r\n\t\t}\r\n\t\t// escape key\r\n\t\tif ((e.getKeyCode() == 27) && (!escape) && (!escapePushed) && (!dead)) {\r\n\t\t\tescape = true;\r\n\t\t\tescapePushed = true;\r\n\t\t\tpaint();\r\n\t\t} else if ((e.getKeyCode() == 27) && (escape) && (!escapePushed) && (!dead)) {\r\n\t\t\tescape = false;\r\n\t\t\tescapePushed = true;\r\n\t\t}\r\n\r\n\t}", "public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}", "public void right() {\n if (x + movementSpeed < 450) {\r\n x = x + movementSpeed;\r\n }\r\n }", "private void move()\n\t{\n\t\tif(moveRight)\n\t\t{\n\t\t\tif(position.getX() + speedMovement <= width)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() +speedMovement+speedBoost);\n\t\t\t\tmoveRight = false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif(moveLeft)\n\t\t{\n\t\t\tif(position.getX() - speedMovement > 0)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() -speedMovement - speedBoost + gravitationalMovement);\n\t\t\t\tmoveLeft = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * If a gravitational field is pushing the ship, set the movement accordingly\n\t\t */\n\t\tif(gravitationalMovement>0)\n\t\t{\n\t\t\tif(position.getX()+gravitationalMovement <= width)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(position.getX() + gravitationalMovement > 0)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t}", "public void moveRight() {\r\n speedX = 6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/rightWalk1.png\");\r\n img = new Sprite (r1);\r\n if (centerX > startScrolling)\r\n bg.setBackX (bg.getBackX () + 6);\r\n bg.update ();\r\n }", "public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }", "@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }", "public void keyPressed(KeyEvent e){\n int code = e.getKeyCode();\n if (code == KeyEvent.VK_UP){\n game.playerMove(MoveDirection.NORTH);\n }\n if (code == KeyEvent.VK_DOWN){\n game.playerMove(MoveDirection.SOUTH);\n }\n if (code == KeyEvent.VK_LEFT){\n game.playerMove(MoveDirection.WEST);\n }\n if (code == KeyEvent.VK_RIGHT){\n game.playerMove(MoveDirection.EAST);\n }\n }", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "void keyRight();", "private void checkKeys()\n {\n if (Greenfoot.isKeyDown(\"d\") )\n {\n /*\n * \n *setImage(\"Plyr1_Right.png\");\n *moveRight();\n */\n moveRight();\n turn(30);\n setRotation(30);\n }\n else if (Greenfoot.isKeyDown(\"a\") )\n {\n //setImage(\"Plyr1_Left.png\");\n moveLeft();\n turn(-30);\n setRotation(-30);\n \n }\n else\n {\n turn(0);\n setRotation(0);\n Greenfoot.playSound(\"engine_4.wav\");\n }\n if (Greenfoot.isKeyDown(\"w\") )\n {\n moveUp();\n }\n if (Greenfoot.isKeyDown(\"s\") )\n {\n //moveDown();\n }\n {\n if(isTouching(TestProblem.class))\n {\n Greenfoot.stop();\n }\n }\n}", "public void moveLeft() {\n\t\tposX -= speed;\n\t}", "private void handleRight() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()+1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()== controller.getNumberColumns()-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), 0);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void playerMoveRight()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() + 1);\n if (this.getCurrentX() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public void keyPressed(KeyEvent e) {\r\n\t\tif(!gameOver()) {\r\n\t\t\t\r\n\t\t\tGObject top = getElementAt(player.getX() + player.getWidth(), player.getY() - 16);\r\n\t\t\tGObject bottom = getElementAt(player.getX() + player.getWidth() / 2.0, player.getY() + player.getHeight() + 16);\r\n\t\t\tGObject bottomRight = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() * .8);\r\n\t\t\tGObject bottomLeft = getElementAt(player.getX() - 1, player.getY() + player.getHeight() * .8);\r\n\t\t\tGObject topRight = getElementAt(player.getX() + player.getWidth() + 1, player.getY());\r\n\t\t\tGObject topLeft = getElementAt(player.getX() - 1, player.getY());\r\n\t\t\t\r\n\t\t\tswitch(e.getKeyCode()) {\r\n\t\t\tcase KeyEvent.VK_RIGHT:\r\n\t\t\t\tmoveRight(bottom);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_LEFT:\r\n\t\t\t\tmoveLeft(bottom);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_UP:\r\n\t\t\t\tif ((top == null || (bottom == ladder1 || bottom == ladder2 || top == ladder1 || top == ladder2)) && player.getY() > 23)\r\n\t\t\t\t\tplayer.move(0, -PLAYER_Y_MOTION);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_DOWN:\r\n\t\t\t\tif (bottom == null || (bottom == ladder1 || bottom == ladder2))\r\n\t\t\t\t\tplayer.move(0, PLAYER_Y_MOTION);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_SPACE:\r\n\t\t\t\tif(bullet == null && bottom != null && bottomLeft == null && topRight == null && bottomRight == null && topLeft == null)\r\n\t\t\t\t\tshoot(bottom, bottomLeft, topRight, bottomRight, topLeft);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void moveRight() {\n\t\tposX += speed;\n\t}", "void moveLeft();", "public void moveRight() {\n\t\t\n\t}", "public void keyCheck() {\n if (right) {\n ship.rotateRight();\n }\n if (left) {\n ship.rotateLeft();\n }\n if (up) {\n ship.accelerate();\n }\n if (down) {\n ship.decelerate();\n }\n if (spacebar) {\n if (one){\n fireMiniGun();\n }\n if (two){\n fireEnergyBlaster();\n }\n if (three) {\n fireGrenadeLauncher();\n }\n }\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t//Converts e.getKeyChar() to a string\n\t\tString keyPressed = e.getKeyChar() + \"\";\n\t\t//only runs if the player has pressed a valid key\n\t\t\n\t\tif (contains(keys,keyPressed)){ \n\t\t\t\n\t\t\tswitch (keyPressed){\n\t\t\t//if the key is w, then it moves the player up.\n\t\t\tcase \"w\": \n\t\t\t\tb.p.moveUp();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is a, then it moves the player left.\n\t\t\tcase \"a\": \n\t\t\t\tb.p.moveLeft();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is x, then it moves the player down.\t\n\t\t\tcase \"x\": \n\t\t\t\tb.p.moveDown();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is d, then it moves the player right.\n\t\t\tcase \"d\": \n\t\t\t\tb.p.moveRight();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is q, then it moves the player up and to the left.\n\t\t\tcase \"q\":\n\t\t\t\tb.p.moveUpLeft();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is e, then it moves the player up and to the right. \n\t\t\tcase \"e\":\n\t\t\t\tb.p.moveUpRight();\t\n\t\t\t\tbreak;\n\t\t\t\t//if the key is z, then it moves the player down and to the left.\n\t\t\tcase \"z\":\n\t\t\t\tb.p.moveDownLeft();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is c, then it moves the player down and to the right.\n\t\t\tcase \"c\":\n\t\t\t\tb.p.moveDownRight();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is j, then it moves the player to a random location.\n\t\t\tcase \"j\":\n\t\t\t\tb.jump(b.p);\n\t\t\t\tbreak;\n\t\t\t\t//if the key is s, then it doesn't move\n\t\t\tcase \"s\":\n\t\t\t\tbreak;\n\t\t\t\t//if the key is y when game is over, then the game resets.\n\t\t\tcase \"y\":\n\t\t\t\tif (gameOver){\n\t\t\t\t\tgameStarted = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t//if the key is n when game is over, then JFrame window closes and program terminates.\n\t\t\tcase \"n\":\n\t\t\t\tif(gameOver){\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Updates mho position and discards the mhos that need to be discarded\n\t\t\tif (!keyPressed.equals(\"j\") && !keyPressed.equals(\"y\") && !keyPressed.equals(\"n\")){\n\t\t\t\tfor (int i =0; i <b.mhos.size(); i++) {\n\t\t\t\t\tb.mhos.get(i).updatePosition(b);\n\t\t\t\t\tif (b.mhos.get(i).isDiscard()) {\n\t\t\t\t\t\tdiscardMhos.add(b.mhos.get(i));\n\t\t\t\t\t\tb.mhos.remove(i);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Checks if the player won or lost\n\t\t\tif (!gameOver){\n\t\t\t\tif (b.mhos.size() == 0) {\n\t\t\t\t\tplayerWon = true;\n\t\t\t\t\tgameOver = true;\n\t\t\t\t}\n\t\t\t\tif(!b.p.canMove()){\n\t\t\t\t\tplayerWon = false;\n\t\t\t\t\tgameOver = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trepaint();\n\t}", "public void moveRight()\n {\n if (xPos == xBound)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - positive X because we are moving RIGHT! \n movementX = 0.5;\n movementY = 0;\n }", "public void movingWithArrowKey() {\n addMouseListener(new MouseAdapter() {\n @Override\n public void mousePressed(MouseEvent e) {\n super.mousePressed(e);\n GameWindow.this.requestFocus();\n }\n });\n\n //add key listener so user can use the arrows key to move the screen around\n addKeyListener(new KeyAdapter() {\n @Override\n public void keyPressed(KeyEvent e) {\n GameWindow.this.requestFocus();\n System.out.printf(\"(%d, %d)\\n\", mapX, mapY);\n if (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n if (mapX - 15 >= -2575) {\n mapX -= 15;\n }\n } else if (e.getKeyCode() == KeyEvent.VK_LEFT) {\n if (mapX + 15 <= 0) {\n mapX += 15;\n }\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n if (mapY + 15 <= 0) {\n mapY += 15;\n }\n } else if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n if (mapY - 15 >= -1480) {\n mapY -= 15;\n }\n }\n gridCell.setMapX(mapX);\n gridCell.setMapY(mapY);\n repaint();\n }\n });\n setFocusable(true);\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\tcurrentState = currentState + 1;\n\t\t\tif (currentState > END_STATE) {\n\t\t\t\tcurrentState = MENU_STATE;\n\t\t\t}\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tr.up = true;\n\t\t\t// System.out.println(\"up\");\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tr.down = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tr.left = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tr.right = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_SPACE) {\n\t\t\t/* Projectiles p = new Projectiles(r.x, r.y, 10, 10); */\n\t\t\tS2.play();\n\t\t\tom.addObject(new Projectiles(r.x + 22, r.y + 22, 10, 10));\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_D) {\n\t\t\tS1.play();\n\t\t\tom.addObject(new Projectiles(r.x, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 10, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 20, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 30, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 40, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 50, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 60, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 70, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 80, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 90, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 100, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 110, r.y + 22, 10, 10));\n\t\t\tspecialPower = specialPower + 1;\n\t\t}\n\t}", "public void move() {\n\t\tif(right) {\n\t\t\tgoRight();\n\t\t\tstate++;\n\t\t\tif(state > 5) {\n\t\t\t\tstate = 3;\n\t\t\t}\n\t\t}\n\t\telse if(left) {\n\t\t\tgoLeft();\n\t\t\tstate++;\n\t\t\tif(state > 2) {\n\t\t\t\tstate = 0;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void handle(KeyEvent event){\n if (event.getCode() == KeyCode.LEFT) {\r\n //rotate counter-clockwise by one degree\r\n L = false;\r\n //Moves player right\r\n } else if (event.getCode() == KeyCode.RIGHT) {\r\n \r\n R = false;\r\n \r\n \r\n //Moves player up\r\n } else if (event.getCode() == KeyCode.UP) {\r\n Forward = false;\r\n deltaX5 = 0;\r\n deltaY5 = 0; \r\n \r\n }\r\n }", "public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }", "public void keyPressed( KeyEvent event )\n {\n if( event.getKeyCode() == KeyEvent.VK_RIGHT )\n {\n player.setRight(true);\n }\n else if( event.getKeyCode() == KeyEvent.VK_LEFT )\n {\n player.setLeft(true);\n }\n if( event.getKeyCode() == KeyEvent.VK_UP )\n {\n player.setUp(true);\n }\n else if( event.getKeyCode() == KeyEvent.VK_DOWN )\n {\n player.setDown(true);\n }\n }", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "public void keyReleased(KeyEvent e)\n {\n int keyCode = e.getKeyCode();\n\n // If the down key was released\n if (keyCode == KeyEvent.VK_UP)\n {\n movementX = 0;\n movementY = 0;\n }\n\n // If the down key was released\n if (keyCode == KeyEvent.VK_DOWN)\n {\n movementX = 0;\n movementY = 0;\n }\n\n // If the right key was released\n if (keyCode == KeyEvent.VK_RIGHT)\n {\n movementX = 0;\n movementY = 0;\n }\n\n // If the left key was released\n if (keyCode == KeyEvent.VK_UP)\n {\n movementX = 0;\n movementY = 0;\n }\n }", "@Override\r\n public void keyPressed(KeyEvent e)\r\n {\r\n\tif (e.getKeyCode() == KeyEvent.VK_P)\r\n\t{\r\n\t _paused = !_paused;\r\n\t SoundLibrary.getInstance().play(SOUND_PAUSE);\r\n\t}\r\n\tif (_paused)\r\n\t return;\r\n\tswitch (e.getKeyCode())\r\n\t{\r\n\tcase KeyEvent.VK_RIGHT:\r\n\t _level.getMario().moveRight();\r\n\t break;\r\n\tcase KeyEvent.VK_LEFT:\r\n\t _level.getMario().moveLeft();\r\n\t break;\r\n\tcase KeyEvent.VK_UP:\r\n\t _level.getMario().jump(true);\r\n\t break;\r\n\tcase KeyEvent.VK_DOWN:\r\n\t _level.getMario().doSpecial();\r\n\t break;\r\n\tcase KeyEvent.VK_R:\r\n\t _level.resetMario();\r\n\t break;\r\n\t}\r\n }", "void moveRight();", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP && this.b.getValidMoves().contains(\"u\")) { //UP\n\t\t\tthis.b.moveElement(\"u\");\n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_DOWN && this.b.getValidMoves().contains(\"d\")) { //DOWN\n\t\t\tthis.b.moveElement(\"d\");\n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_LEFT && this.b.getValidMoves().contains(\"l\")) { //LEFT\n\t\t\tthis.b.moveElement(\"l\");\n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT && this.b.getValidMoves().contains(\"r\")) { //LEFT\n\t\t\tthis.b.moveElement(\"r\");\n\t\t}\n\t}", "public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}", "private void keyPress(KeyEvent event) {\r\n if (event.getKeyCode() == KeyEvent.VK_UP) \r\n snake[HEAD].direction = UP;\r\n else if (event.getKeyCode() == KeyEvent.VK_DOWN) \r\n snake[HEAD].direction = DOWN;\r\n else if (event.getKeyCode() == KeyEvent.VK_LEFT) \r\n snake[HEAD].direction = LEFT;\r\n else if (event.getKeyCode() == KeyEvent.VK_RIGHT) \r\n snake[HEAD].direction = RIGHT;\r\n }", "@Override\n public void keyPressed(KeyEvent e){\n // determine the key\n int key = e.getKeyCode();\n // figure out which key\n if(key == KeyEvent.VK_RIGHT){\n right1 = true;\n }else if(key == KeyEvent.VK_LEFT){\n left1 = true;\n }else if(key == KeyEvent.VK_UP){\n down1 = true;\n }else if(key == KeyEvent.VK_DOWN){\n up1 = true;\n }else if(key == KeyEvent.VK_E){\n dagger1 = true;\n }else if(key == KeyEvent.VK_F){\n grenade1 = true;\n }\n \n \n \n // PLAYER 2\n if(key == KeyEvent.VK_D){\n right2 = true;\n }else if(key == KeyEvent.VK_A){\n left2 = true;\n }else if(key == KeyEvent.VK_W){\n down2 = true;\n }else if(key == KeyEvent.VK_S){\n up2 = true;\n }else if(key == KeyEvent.VK_SHIFT){\n dagger2 = true;\n }else if(key == KeyEvent.VK_CONTROL){\n grenade2 = true;\n }\n }", "public void moveLeft() {\n this.velocity = this.velocity.add(leftVelocity());\n }", "public boolean move(KeyCode code){\n\t\tswitch (code) {\n\t\tcase Q:\n\t\tcase NUMPAD7:\n\t\t\tmoveUpLeft();\n\t\t\tbreak;\n\t\tcase W:\n\t\tcase NUMPAD8:\n\t\t\tmoveUp();\n\t\t\tbreak;\n\t\tcase E:\n\t\tcase NUMPAD9:\n\t\t\tmoveUpRight();\n\t\t\tbreak;\n\t\tcase A:\n\t\tcase NUMPAD4:\n\t\t\tmoveLeft();\n\t\t\tbreak;\n\t\tcase S:\n\t\tcase NUMPAD5:\n\t\t\tbreak;\n\t\tcase D:\n\t\tcase NUMPAD6:\n\t\t\tmoveRight();\n\t\t\tbreak;\n\t\tcase Z:\n\t\tcase NUMPAD1:\n\t\t\tmoveDownLeft();\n\t\t\tbreak;\n\t\tcase X:\n\t\tcase NUMPAD2:\n\t\t\tmoveDown();\n\t\t\tbreak;\n\t\tcase C:\n\t\tcase NUMPAD3:\n\t\t\tmoveDownRight();\n\t\t\tbreak;\n\t\tcase J:\n\t\tcase NUMPAD0:\n\t\t\tmoveJump();\n\t\t\treturn false;\t\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tif (isMovingLeft) {\n\t\t\t\tplayer.getImage().setImage(\"LeftShipStationary.png\");\n\t\t\t} else {\n\t\t\t\tplayer.getImage().setImage(\"FrontShipStationary.png\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint keyCode = e.getKeyCode();\n\t\t\t\tif (keyCode == e.VK_LEFT) {\n\t\t\t\t\tfrogX = frogX - SCHRITT;\n\t\t\t\t\trepaint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (keyCode == e.VK_RIGHT) {\n\t\t\t\t\tfrogX = frogX + SCHRITT;\n\t\t\t\t\trepaint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (keyCode == e.VK_UP) {\n\t\t\t\t\tfrogY = frogY - SCHRITT;\n\t\t\t\t\trepaint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (keyCode == e.VK_DOWN) {\n\t\t\t\t\tfrogX = frogX + SCHRITT;\n\t\t\t\t\trepaint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t}", "public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }", "@Override\n\tpublic void movment() {\n\t\tif(ghost.shot && fired) {\n\t\t\tif(direction == RIGHT)\n\t\t\t\tmove(RIGHT);\n\t\t\telse if(direction == LEFT)\n\t\t\t\tmove(LEFT);\n\t\t\telse if(direction == UP)\n\t\t\t\tmove(UP);\n\t\t\telse if(direction == DOWN)\n\t\t\t\tmove(DOWN);\n\t\t}\n\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\r\n switch(e.getKeyCode()) {\r\n case KeyEvent.VK_UP:\r\n System.out.println(\"Go up\");\r\n this.setRotation(this.getRotation() + 3);\r\n break;\r\n case KeyEvent.VK_DOWN:\r\n System.out.println(\"Go down\");\r\n this.setRotation(this.getRotation() - 3);\r\n break;\r\n\r\n case KeyEvent.VK_SPACE:\r\n \tif(up) {\r\n \t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()+1.6f);\r\n \t\tup = false;\r\n \t}\r\n \telse {\r\n \t\t\r\n \t//\tthis.die ++;\r\n \t\tif(checkStatus()) {\r\n \t\t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()-1.6f);\r\n \t\t\tup = true;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()-3.5f);\r\n \t\t\tthis.die = -1;\r\n \t\t\tSystem.out.println(\"Game over\");\r\n \t\t}\r\n \t}\r\n break;\r\n case KeyEvent.VK_ENTER:\r\n \tif(die == -2) {\r\n \t\tdie = 0;\r\n \t\tbreak;\r\n \t}\r\n }\r\n\r\n }", "public void moveRight() {\n Coordinate rightCoord = new Coordinate(getX() + 1, getY());\n handleMove(rightCoord, InteractionHandler.RIGHT);\n }", "public void moveX(boolean isRight){\n if(isRight){\n this.x += velocity[0];\n } else{\n this.x -= velocity[0];\n }\n }", "private void leftButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_leftButtonKeyPressed\n this.leftButton.setEnabled(true);\n if(!this.left){\n this.controller.setLeft(true);\n this.left = true;\n }\n }", "@Override\n public void keyPressed(KeyEvent e) {\n int key = e.getKeyCode();\n\n if (key == KeyEvent.VK_SPACE) {\n gameOver = false;\n moves = 0;\n score = 0;\n snakeLength = 3;\n repaint();\n }\n\n if ((key == KeyEvent.VK_LEFT) && (!right)) {\n moves++;\n left = true;\n up = false;\n down = false;\n }\n\n if ((key == KeyEvent.VK_RIGHT) && (!left)) {\n moves++;\n right = true;\n up = false;\n down = false;\n }\n\n if ((key == KeyEvent.VK_UP) && (!down)) {\n moves++;\n up = true;\n right = false;\n left = false;\n }\n\n if ((key == KeyEvent.VK_DOWN) && (!up)) {\n moves++;\n down = true;\n right = false;\n left = false;\n }\n }", "public void moveRight() {\n locX = locX + 1;\n }", "public void keyPressed(KeyEvent e) {\n \tint keyCode = e.getKeyCode();\n \t\n \tif (keyCode == 37) {\n \t\tkeyMouseMove = -KEY_PADDLE_SPEED;\n \t}\n \tif (keyCode == 39) {\n \t\tkeyMouseMove = KEY_PADDLE_SPEED;\n \t}\n }", "public void moveLeft() {\n \tif(!move.moveLeft()) {\n \t\tif(physinteractor(getX()-1,getY())) {\n \t\t\tmove.moveLeft();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "@Override\n\tpublic void move() {\n\t\tx += ((direction) * xSpeed);\n\t\t//If any sprite has collided with the left or right edge of the screen set collided to true\n\t\tif (x >= 800 - spriteImage.getWidth(null) || x <= 0) collided = true;\n\t}", "public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent e)\r\n\t{\r\n\t\tchar entered = e.getKeyChar();\r\n\t\tswitch (entered)\r\n\t\t{\r\n\t\tcase 'w':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 's':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'a':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'd':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'x':\r\n\t\t\tequip.execute(entered);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tgame.updateState();\r\n\t}", "public void moveRight(){\n myRectangle.setX(myRectangle.getX() + PADDLE_SPEED);\n }", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\tif(keycode == Input.Keys.RIGHT){\n\t\t\tgoRight = true;\n\t\t\tmoveDistance += 10;\n\t\t}\n\t\tif(keycode == Input.Keys.LEFT){\n\t\t\tgoLeft = true;\n\t\t\tmoveDistance += 10;\n\t\t}\n\t\tif(keycode == Input.Keys.UP){\n\t\t\tturnUp = true;\n\t\t}\n\t\tif(keycode == Input.Keys.DOWN){\n\t\t\tturnDown = true;\n\t\t}\n\t\tif( (keycode == Input.Keys.SPACE) && (ballCount == 0) ){\n\t\t\tballShoot = true;\n\t\t}\n\t\treturn false;\n\t}", "public void move() {\n\t\tdouble xv = 0;\r\n\t\tdouble yv = 0;\r\n\t\t//this method allows the entity to hold both up and down (or left and right) and not move. gives for smooth direction change and movement\r\n\t\tif (moveRight) {\r\n\t\t\txv+=getSpeed();\r\n\t\t\torientation = Orientation.EAST;\r\n\t\t}\r\n\t\tif (moveLeft) {\r\n\t\t\txv-=getSpeed();\r\n\t\t\torientation = Orientation.WEST;\r\n\t\t}\r\n\t\tif (moveUp)\r\n\t\t\tyv-=getSpeed();\r\n\t\tif (moveDown)\r\n\t\t\tyv+=getSpeed();\r\n\t\tif (!doubleEquals(xv,0) || !doubleEquals(yv,0)) {\r\n\t\t\t((Player)this).useMana(0.1);\r\n\t\t\tImageIcon img = new ImageIcon(\"lib/assets/images/fireball.png\");\r\n\t\t\tBufferedImage image = new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.drawImage(img.getImage(), 0, 0, image.getWidth(), image.getHeight(), null);\r\n\t\t\tColor n = loop[ind%loop.length];\r\n\t\t\tind++;\r\n\t\t\timage = ImageProcessor.scaleToColor(image, n);\r\n\t\t\t//PopMessage.addPopMessage(new PopMessage(image,getX(),getY()));\r\n\t\t}\r\n\t\telse\r\n\t\t\t((Player)this).useMana(-0.1);\r\n\t\tmove(xv,yv);\r\n\t}", "public void move()\r\n {\r\n if(goRight)\r\n {\r\n setLocation(getX()+10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }else\r\n {\r\n setLocation(getX()-10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }\r\n if(getY()>getWorld().getHeight())\r\n ((CaveWorld)(getWorld())).deleteAxe(this);\r\n }", "public void moveRight() {\n\t\tsetPosX(getPosX() + steps);\n\t}", "public void keyPressed() {\n\t\tif(key == CODED) {\n\t\t\tif(keyCode == RIGHT) {\n\t\t\t\tc.jumpP1();\n\t\t\t}\n\t\t\tif(keyCode == LEFT) {\n\t\t\t\tc.jumpP2();\n\t\t\t}\n\t\t}\n\t}", "private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }", "public void moveLeft() {\n locX = locX - 1;\n }", "private void setKeyCode() {\n if (key.equals(KeyCode.W) || key.equals(KeyCode.UP)) {\n key = KeyCode.UP;\n right_key = true;\n } else if (key.equals(KeyCode.S) || key.equals(KeyCode.DOWN)) {\n key = KeyCode.DOWN;\n right_key = true;\n } else if (key.equals(KeyCode.A) || key.equals(KeyCode.LEFT)) {\n key = KeyCode.LEFT;\n right_key = true;\n } else if (key.equals(KeyCode.D) || key.equals(KeyCode.RIGHT)) {\n key = KeyCode.RIGHT;\n right_key = true;\n } else {\n key = KeyCode.PLUS;\n }\n }", "private boolean handleMovementByKey() {\n\t\tboolean moved = false;\n\t\tif (keyCode != 0) {\n\t\t\tmoved = true;\n\t\t\tdouble moveRate = 10.0 / 1000;\t// degrees per second\n\t\t\t\n\t\t\tif ((keyStateMask & SWT.SHIFT) != 0) {\n\t\t\t\tmoveRate = moveRate * 10.0;\n\t\t\t}\n\t\t\telse if ((keyStateMask & SWT.ALT) != 0) {\n\t\t\t\tmoveRate = moveRate / 5.0;\n\t\t\t}\n\t\t\t\n\t\t\tlong moveTime = 0;\n\t\t\tif (keyStopTime != 0) {\n\t\t\t\tmoveTime = keyStopTime - keyStartTime;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\t\tmoveTime = currentTime - keyStartTime;\n\t\t\t\tkeyStartTime = currentTime;\n\t\t\t}\n\t\t\t\n\t\t\tfloat move = (float)(moveRate * moveTime);\n\t\t\t\n\t\t\tswitch (keyCode) {\n\t\t\tcase 16777219:\n\t\t\t\t// left\n\t\t\t\tviewAzimuth = fixAzimuth(viewAzimuth - move);\n\t\t\t\tbreak;\n\t\t\tcase 16777220:\n\t\t\t\t// right\n\t\t\t\tviewAzimuth = fixAzimuth(viewAzimuth + move);\n\t\t\t\tbreak;\n\t\t\tcase 16777217:\n\t\t\t\t// up\n\t\t\t\tviewElevation = fixElevation(viewElevation + move);\n\t\t\t\tbreak;\n\t\t\tcase 16777218:\n\t\t\t\t// down\n\t\t\t\tviewElevation = fixElevation(viewElevation - move);\n\t\t\t\tbreak;\n\t\t\tcase 97:\n\t\t\t\t// a\n\t\t\t\tviewVFOV = fixFOV(viewVFOV - (move * fovAdjFactor));\n\t\t\t\tbreak;\n\t\t\tcase 122:\n\t\t\t\t// z\n\t\t\t\tviewVFOV = fixFOV(viewVFOV + (move * fovAdjFactor));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (keyStopTime != 0) {\n\t\t\t\tkeyCode = 0;\n\t\t\t\tkeyStartTime = 0;\n\t\t\t}\n\t\t}\n\t\treturn moved;\n\t}", "public void changeDirection (int dir) {\n if ((dir == UPKEY || dir == DOWNKEY || dir == RIGHTKEY || dir == LEFTKEY) && validMove(dir))\n {\n direction = dir;\n }\n }", "public void tick()\n\t{\n\t\tif(cantLeftPress && !leftPressed)\n\t\t{\n\t\t\tcantLeftPress = false;\n\t\t}\n\t\telse if(justLeftPressed)\n\t\t{\n\t\t\tcantLeftPress = true;\n\t\t\tjustLeftPressed = false;\n\t\t}\n\t\telse if(!cantLeftPress && leftPressed)\n\t\t{\n\t\t\tjustLeftPressed = true;\n\t\t}\n\t\t\n\t\t//right pressing\n\t\tif(cantRightPress && !rightPressed)\n\t\t{\n\t\t\tcantRightPress = false;\n\t\t}\n\t\telse if(justRightPressed = true)\n\t\t{\n\t\t\tcantRightPress = true;\n\t\t\tjustRightPressed = false;\n\t\t}\n\t\telse if(!cantRightPress && rightPressed)\n\t\t{\n\t\t\tjustRightPressed = true;\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tplayer.right = false; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tplayer.left = false; \n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tplayer.up = false; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tplayer.down = false; \n\t\t}\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\tif(keycode == Input.Keys.RIGHT){\n\t\t\tgoRight = false;\n\t\t}\n\t\tif(keycode == Input.Keys.LEFT){\n\t\t\tgoLeft = false;\n\t\t}\n\t\tif(keycode == Input.Keys.UP){\n\t\t\tturnUp = false;\n\t\t}\n\t\tif(keycode == Input.Keys.DOWN){\n\t\t\tturnDown = false;\n\t\t}\n\t\tif(keycode == Input.Keys.SPACE){\n\t\t\tballShoot = false;\n\t\t}\n\t\treturn false;\n\t}", "public void keyPressed(KeyEvent e) {\n \t\tswitch (e.getKeyCode()) {\n \t\t\tcase KeyEvent.VK_LEFT:\n \t\t\t\tif (!isPaused && !isOver) {\n \t\t\t\t\trb.setAccel(new Point2D.Double(-3, 0));\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_RIGHT:\n \t\t\t\tif (!isPaused && !isOver) {\n \t\t\t\t\trb.setAccel(new Point2D.Double(+3, 0));\n \t\t\t\t}\n \t\t\t\tbreak;\n \n \t\t\tcase KeyEvent.VK_ESCAPE:\n \t\t\t\tSystem.exit(0);\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_SPACE:\n\t\t\t\tif (isStarted && !isOver) {\n \t\t\t\t\ttogglePaused();\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_WINDOWS:\n \t\t\t\tif (!isStarted) {\n \t\t\t\t\tstartGame();\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t}\n \t}", "public void keyPressed() {\n if (keyCode == UP) mouseRect += 4;\n if (keyCode == DOWN) mouseRect -= 4; \n}", "private void handleLeft() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()-1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()==-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getNumberColumns()-1);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void moveLeft(){\n \n setGlobalLocation(getGlobalX() - speed, getGlobalY());\n animationSpeedLeft();\n }", "public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}" ]
[ "0.7393478", "0.7197273", "0.7135022", "0.7058994", "0.6957191", "0.6861788", "0.68239826", "0.6809331", "0.6739238", "0.6642105", "0.66326594", "0.66286945", "0.66260886", "0.6625524", "0.6621017", "0.66183627", "0.6602555", "0.6584719", "0.6583966", "0.65794045", "0.65660924", "0.655816", "0.6557235", "0.6549259", "0.6541846", "0.6540828", "0.65350056", "0.6523125", "0.6508527", "0.6508423", "0.64945453", "0.6491963", "0.64701676", "0.64680576", "0.6463798", "0.6458256", "0.64571124", "0.6444279", "0.6441035", "0.64395344", "0.6404364", "0.63933605", "0.6390137", "0.6380614", "0.6374923", "0.6365983", "0.63516915", "0.63441384", "0.6331577", "0.63238114", "0.63220495", "0.63134986", "0.63118196", "0.63089234", "0.62970906", "0.6290498", "0.6288575", "0.6286192", "0.6286103", "0.62826884", "0.6270513", "0.6269025", "0.6255186", "0.62514037", "0.62513304", "0.62462044", "0.6239546", "0.6239022", "0.62379813", "0.6230021", "0.622778", "0.622578", "0.6221902", "0.62210363", "0.6217498", "0.62037504", "0.6196927", "0.6194237", "0.6182995", "0.61802876", "0.61762196", "0.6173066", "0.6171933", "0.61705774", "0.616807", "0.616276", "0.61564344", "0.615514", "0.6150192", "0.6143208", "0.6132812", "0.6126481", "0.61263955", "0.6120244", "0.6096188", "0.60856503", "0.6083298", "0.6082787", "0.606925", "0.6064149", "0.6060409" ]
0.0
-1
Add this paddle to the game.
public void addToGame(GameLevel g) { g.addSprite(this); g.addCollidable(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPaddle(Paddle newPaddle) {\n\t\tGAME_PADDLE = newPaddle;\n\t}", "void addEventPaddle(DefaultPlayer player, DefaultBall ball);", "private GRect drawPaddle() {\n int paddleX = (getWidth() - PADDLE_WIDTH) / 2;\n int paddleY = (getHeight() - PADDLE_Y_OFFSET );\n GRect rect = new GRect(paddleX, paddleY, PADDLE_WIDTH, PADDLE_HEIGHT);\n rect.setFilled(true);\n rect.setColor(Color.BLACK);\n add(rect);\n return rect;\n }", "private void drawPaddle(Graphics g) {\n Puddle t = game.getPaddle();\n Color savedCol = g.getColor();\n g.setColor(Puddle.COLOR);\n g.fillRect(t.getX() - Puddle.DIMENSION1 / 2,\n Puddle.Y_POS - Puddle.DIMENSION2 / 2, Puddle.DIMENSION1, Puddle.DIMENSION2);\n g.setColor(savedCol);\n }", "public void add(Ball b) {\r\n balls.add(b);\r\n }", "@Override\n\tpublic void add(Game game) {\n\t\t\n\t}", "public Paddle createPaddle() {\n int width = this.levelInfo.paddleWidth();\n int speed = this.levelInfo.paddleSpeed();\n // optimize the paddle location to the middle of the screen.\n // it should be placed a half of its' width from the center of the screen (which its' x coordinate is 400)\n double paddleX = 400 - (width / 2);\n double paddleY = 585;\n // create the paddle using the details we received from level info.\n Paddle pad = new Paddle(new Rectangle(new Point(paddleX, paddleY), width, 12),\n Color.ORANGE, speed);\n // update the keyboard sensor to pad.\n pad.updateKeyboardSensor(this.keyboard);\n // update the screen frame to pad.\n pad.updateFrame(this.upper, this.lower, this.right, this.left);\n return pad;\n }", "Paddle2() {\r\n//Initial paddle position\r\n\r\n t.start();\r\n addKeyListener(this);\r\n setFocusable(true);\r\n setFocusTraversalKeysEnabled(false);\r\n \r\n }", "public Paddle(int width, int height) {\r\n \r\n this.width = width;\r\n this.height = height;\r\n \r\n }", "public void addBallToBoard(Ball ball){\n\t\tballs.add(ball);\n\t\tinhabitants.add((BoardObject) ball);\n\t}", "public void removePaddle() {\r\n this.removeSprite(this.paddle);\r\n this.removeCollidable(this.paddle);\r\n }", "public void addBall(Ball ball) {\n if (ball == null) {\n throw new IllegalArgumentException(\"Ball shouldn't be null\");\n }\n\n balls.add(ball);\n }", "@Override\n public void addToGame(GameLevel g) {\n if (g != null) {\n g.addSprite(this);\n g.getBallCounter().increase(1);\n }\n }", "public GameScene(PongUi application, Player one, Player two) {\n super(new Group(), WIDTH, HEIGHT);\n\n this.application = application;\n this.playerOne = one;\n this.playerTwo = two; \n\n playerOnePaddle.setLayoutX(WIDTH / 20);\n \n playerOnePaddle.setFill(colorDao.getColor());\n playerTwoPaddle.setFill(colorDao.getColor());\n \n Wall wallBuilder = new Wall();\n topWall = wallBuilder.topWall();\n bottomWall = wallBuilder.bottomWall();\n leftWall = wallBuilder.leftWall();\n rightWall = wallBuilder.rightWall();\n\n leftScoreGroup = new Group();\n leftScoreGroup.setLayoutX(WIDTH / 2 - 165);\n leftScoreGroup.setLayoutY(60);\n\n rightScoreGroup = new Group();\n rightScoreGroup.setLayoutX(WIDTH / 2 + 80);\n rightScoreGroup.setLayoutY(60); \n\n ball = new Ball();\n ball.setFill(colorDao.getColor());\n\n Parent root = getRoot();\n Group rootGroup = (Group) root;\n rootGroup.getChildren().add(topWall);\n rootGroup.getChildren().add(bottomWall);\n rootGroup.getChildren().add(leftWall);\n rootGroup.getChildren().add(rightWall);\n createCenterLine(rootGroup);\n rootGroup.getChildren().add(playerOnePaddle);\n rootGroup.getChildren().add(playerTwoPaddle);\n rootGroup.getChildren().add(leftScoreGroup);\n rootGroup.getChildren().add(rightScoreGroup);\n rootGroup.getChildren().add(ball);\n\n // activate paddle movement\n setOnKeyPressed(x -> {\n playerOnePaddle.leftPaddleActivateMovement(x);\n playerTwoPaddle.rightPaddleActivateMovement(x);\n });\n\n // disable paddle movement\n setOnKeyReleased(x -> {\n playerOnePaddle.disableMovement(x);\n playerTwoPaddle.disableMovement(x);\n });\n\n setVisibleScore(leftScoreGroup, playerOne.getPoints());\n setVisibleScore(rightScoreGroup, playerTwo.getPoints());\n }", "void addBall(Ball b) {\n\t\t\tthis.balls.add(b);\n\n\t\t\tthis.t += b.t;\n\t\t\tthis.w += b.w;\n\n\t\t\tthis.bitRep |= 1 << b.index;\n\t\t}", "public void attachBall(ppBall myBall) {\n this.myBall = myBall;\n }", "public boolean hitPaddle (Paddle myPaddle){\n Bounds ivPower = myExtendedPaddle.getBoundsInParent();\n Bounds ivPaddle = myPaddle.getView().getBoundsInParent();\n if(ivPower.intersects(ivPaddle)){\n return true;\n }\n return false;\n }", "public void addToGame(Game g) {\r\n g.addSprite(this);\r\n }", "@Override\n public void addGameState(GameState gameState) {\n }", "public Paddle(int screenWidth, int screenHeight){\n myScreenWidth = screenWidth;\n myScreenHeight = screenHeight;\n initialXLocation = myScreenWidth / 2 - myLength / 2;\n initialYLocation = myScreenHeight/2 + initialYLocationAdjustment;\n\n myRectangle = new Rectangle(initialXLocation, initialYLocation, PADDLE_LENGTH, PADDLE_HEIGHT);\n myRectangle.setFill(PADDLE_COLOR);\n }", "public Paddle(int x, int y, int height, int width, java.awt.Color color) {\r\n\t\t\r\n\t\ttopX=x;\r\n\t\ttopY=y;\r\n\t\tthis.height=height;\r\n\t\tthis.width=width;\r\n\t\tthis.color= color;\r\n\t}", "@Override\r\n public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n }", "public void checkCollision(){\n if (ball.y <=0){\n ball.setYDirection(-ball.yVelocity);\n }\n if (ball.y >=GAME_HEIGHT-BALL_DIAMETER){\n ball.setYDirection(-ball.yVelocity);\n }\n if (ball.x <=0){\n ball.setXDirection(-ball.xVelocity);\n }\n if (ball.x >=GAME_WIDTH-BALL_DIAMETER){\n ball.setXDirection(-ball.xVelocity);\n }\n\n // this bounces balls to the paddles\n\n // this is for the paddle1\n if (ball.intersects(paddle1)) {\n ball.xVelocity = Math.abs(ball.xVelocity);\n ball.xVelocity++;\n if (ball.yVelocity > 0)\n ball.yVelocity++;\n else\n ball.yVelocity--;\n ball.setXDirection(ball.xVelocity);\n ball.setYDirection(ball.yVelocity);\n }\n // this is for the paddle2\n if (ball.intersects(paddle2)){\n ball.xVelocity = Math.abs(ball.xVelocity);\n ball.xVelocity++;\n if (ball.yVelocity >0)\n ball.yVelocity++;\n else\n ball.yVelocity--;\n ball.setXDirection(-ball.xVelocity);\n ball.setYDirection(ball.yVelocity);\n }\n\n //this method stops the paddles from passing the edges of the frame\n if(paddle1.y <= 0)\n paddle1.y = 0;\n if(paddle1.y >= (GAME_HEIGHT-PADDLE_HEIGTH))\n paddle1.y = GAME_HEIGHT-PADDLE_HEIGTH;\n if(paddle2.y <= 0)\n paddle2.y = 0;\n if(paddle2.y >= (GAME_HEIGHT-PADDLE_HEIGTH))\n paddle2.y = GAME_HEIGHT-PADDLE_HEIGTH;\n\n\n //this will give points to players and creates new paddles as well a new ball\n if (ball.x<=0){\n score.player2++;\n newPaddles();\n newBall();\n // System.out.println(\"Player 2: \"+ score.player2);\n }\n if (ball.x >= GAME_WIDTH-BALL_DIAMETER){\n score.player1++;\n newPaddles();\n newBall();\n //System.out.println(\"Player 1: \"+score.player1);\n }\n\n }", "public UserPaddle(int player)\r\n\t{\r\n\t\tupAcceleration = false;\r\n\t\tdownAcceleration = false;\r\n\t\ty = 210;\r\n\t\tyVelocity = 0;\r\n\t\tif(player == 1)\r\n\t\t{\r\n\t\t\tx = 20; //On the left side of the frame\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tx = 660; //On the right side of the frame\r\n\t\t}\r\n\t}", "public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n }", "public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n }", "void addPaddleContactObserver(PaddleContactObserver obs);", "public void addToGame(GameLevel g) {\n g.addSprite(this);\n }", "public void addToGame(GameLevel g) {\n g.addSprite(this);\n }", "public void addToGame(GameLevel g) {\n g.addSprite(this);\n }", "@Override\r\n public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n g.addCollidable(this);\r\n }", "@Override\n public void add(Object o) {\n gameCollection.addElement(o);\n }", "@Override\n public boolean add(Adder adder)\n {\n return adder.addToStrongBox(this);\n }", "public void addToGame(GameLevel gameLevel) {\n gameLevel.addSprite(this);\n }", "public void addToGame(GameLevel gameLevel) {\n gameLevel.addSprite(this);\n }", "public void addGame(Game gameToAdd)\n\t{\n\t\tgames.add(gameToAdd);\n\t}", "public void add(GameEvent e);", "private void createBallsOnTopOfPaddle() {\r\n for (int i = 0; i < levelInformation.numberOfBalls(); i++) {\r\n Ball ball = new Ball((guiWidth / 2) - ((levelInformation.numberOfBalls() - 1) * ballRadius)\r\n + (i * (ballRadius * 2)), 550, ballRadius, Color.WHITE, environment);\r\n ball.setVelocity(levelInformation.initialBallVelocities().get(i));\r\n ball.addToGame(this);\r\n }\r\n ballCounter.increase(levelInformation.numberOfBalls());\r\n }", "public void addPoints(int addP){\n this.points += addP;\n }", "public Paddle(int courtWidth) {\n // sets default values\n this.width = 100;\n this.height = 10;\n this.direction = 0;\n this.speed = 0;\n\n // sets court width to value passed when it is greater than the paddle's width\n if (courtWidth >= this.width) {\n this.courtWidth = courtWidth;\n } else {\n this.courtWidth = 700;\n }\n\n // centers paddle and puts it on the bottom back of the court\n this.x = (this.courtWidth / 2) - 50;\n System.out.println(\"paddle x coord \" + this.x);\n }", "private void drawGame(Graphics g) {\n drawPaddle(g);\n drawBall(g);\n }", "public void addState(GameState gameState) {\n gameStates.push(gameState);\n }", "public void addedToWorld(World w){\n PauseWorld world = (PauseWorld) w;\n world.addObject(nameLabel,this.getX(),this.getY()+itemSize/2+10);\n }", "void addBallObject() {\n\t\tint ballObjectHeight = ScreenManager.getSizeFromPercentageOfWindowY((float) 10.0);\n\t\tint ballObjectWidth = ballObjectHeight;\n\t\t\n\t\t// Spawning BallObject on the racket\n\t\tint ballObjectX = (int) (racketObject.getX() + (racketObject.width/4.0));\n\t\tint ballObjectY = (int) racketObject.getY() - ballObjectHeight;\n\t\t\n\t\t// BallObject's mass\n\t\tfloat ballObjectMass = (float) 1.075;\n\t\t\n\t\t// Ball velocity X\n\t\tint ballObjectDistanceFromRacketX = -35*(racketObject.getCenterOfWidth() - mouseX);\n\t\tint ballObjectVelocityX = (int) ballObjectDistanceFromRacketX/ScreenManager.getWindowWidth();\n\t\t\n\t\t// Ball velocity Y\n\t\tint ballObjectDistanceFromRacketY = (int) (-35*((racketObject.getY() + racketObject.getHeight()) - mouseY));\n\t\tint ballObjectVelocityY = (int) ballObjectDistanceFromRacketY/ScreenManager.getWindowHeight();\n\t\t\n\t\tballObjects.add(new BallObject(ballObjectX, ballObjectY, ballObjectWidth, ballObjectHeight, ballObjectGravity, ballObjectMass, ballObjectVelocityX, ballObjectVelocityY));\n\t\t\n\t\t// Reduces the amount of time left by 5 seconds\n\t\tMainPanel.gameDuration -= 5;\n\t}", "public void addToGame(GameLevel g) {\r\n g.getSprites().addSprite(this);\r\n g.getEnvironment().addCollidable(this);\r\n }", "public void addPlayer(Player p){\r\n this.players[PlayerFactory.nb_instances-1]=p;\r\n this.tiles[p.getX()+(p.getY()*this.width)]=p;\r\n }", "@Override\r\n public int paddleSpeed() {\r\n return 5;\r\n }", "public void movePaddleOnKeydown() {\n \tif (keyMouseMove == 0) return;\n \tdouble paddlePosition = paddle.getX();\n \t\n \t// don't move past the edges of the board\n \tif (paddlePosition <= 0 && keyMouseMove == -KEY_PADDLE_SPEED) return;\n \tif (paddlePosition > getWidth() - PADDLE_WIDTH && keyMouseMove == KEY_PADDLE_SPEED) return;\n\n \tpaddle.move(keyMouseMove, 0);\n }", "public void moveOneStep() {\r\n\r\n // detects what direction the ball moves and switches it.\r\n double xDirection, yDirection;\r\n if (v.getDx() < 0) {\r\n xDirection = -r;\r\n } else {\r\n xDirection = r;\r\n }\r\n if (v.getDy() < 0) {\r\n yDirection = -r;\r\n } else {\r\n yDirection = r;\r\n }\r\n // if the ball is in the paddle because they move towards each other, the ball moves to the top of the paddle.\r\n Rectangle danger;\r\n // finding the paddle.\r\n for (Collidable c: environment.getCollidables()) {\r\n if (c.getCollisionRectangle().getUpperLeft().getY() == 550) {\r\n danger = c.getCollisionRectangle();\r\n // moving the ball up if its in the paddle.\r\n if (center.getY() > danger.getUpperLeft().getY()\r\n && center.getX() > danger.getUpperLeft().getX()\r\n && center.getX() < danger.getUpperRight().getX()) {\r\n this.center = new Point(center.getX(), danger.getUpperLeft().getY() - r);\r\n }\r\n }\r\n }\r\n Line yTrajectory = new Line(center.getX(), center.getY() + yDirection,\r\n center.getX() + v.getDx(), center.getY() + yDirection + v.getDy());\r\n Line xTrajectory = new Line(center.getX() + xDirection, center.getY(),\r\n center.getX() + v.getDx() + xDirection, center.getY() + v.getDy());\r\n // the collision is on the y field.\r\n if (environment.getClosestCollision(yTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(yTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(yTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(this.center.getX(),\r\n bangedPoint.getY() - yDirection - v.getDy());\r\n }\r\n // the collision is on the x field.\r\n if (environment.getClosestCollision(xTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(xTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(xTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(bangedPoint.getX() - xDirection - v.getDx(),\r\n this.center.getY());\r\n }\r\n this.center = this.getVelocity().applyToPoint(this.center);\r\n }", "public void mouseMoved (MouseEvent e){\n int mousePositionX = e.getX();\n int paddleX = mousePositionX - PADDLE_WIDTH / 2;\n int paddleY = (getHeight() - PADDLE_Y_OFFSET);\n movePaddle(paddleX, paddleY, mousePositionX);\n }", "public void addPoint(FPointType fpt) {\n moved = true;\n if (tLayerPool.getFirst() == null)\n throw new IllegalStateException(\"No layers exist in this TransformDesign.\");\n tLayerPool.getFirst().addPoint(fpt);\n }", "public void paddleVSball(Paddle p, Ball b) {\n Rectangle p_box = new Rectangle(p.getX(), p.getY(), p.getWidth(), p.getHeight());\r\n // System.out.println(\"X: \"+p.getX()+\"Y: \"+p.getY()+\"W: \"+p.getWidth()+\"H: \"+p.getHeight());\r\n Rectangle b_box = new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight());\r\n\r\n if (p_box.intersects(b_box)) {\r\n //collision\r\n //if ball is going +y and -x\r\n if (b.getVY() > 0 || b.getVY() < 0) {\r\n b.setVY(b.getVY() * -1);\r\n }\r\n if (b.getY() < p.getY()) {//if the ball is inside the paddle\r\n b.setVX(b.getVX() * -1);\r\n b.setVX(b.getVX() * -1);\r\n }\r\n }\r\n }", "public void addToGame(GameLevel g) {\r\n g.addCollidable(this);\r\n g.addSprite(this);\r\n }", "public void addBall(Ball newBall) {\n\t\tBALL_LIST.add(newBall);\n\t\tSPRITE_LIST.add(newBall);\n\t}", "public void addAnotherGame(ChangeListener listener){\n m_addAnotherGame.add(listener);\n }", "private void updateAi() {\n this.paddleL.setY(this.fakeBall.getY() - this.paddleL.getHeight()/2 + this.fakeBall.getHeight()/2);\n\n // Boundary check\n if (this.paddleL.y < 0) {\n this.paddleL.setY(0);\n } else if (this.paddleL.y + this.paddleL.getHeight() > this.getHeight()) {\n this.paddleL.setY(this.getHeight() - this.paddleL.getHeight());\n }\n }", "public void addPokemon(Pokemon p)\n\t{\n\t\t/* See if there is space in the player's party */\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] == null)\n\t\t\t{\n\t\t\t\tm_pokemon[i] = p;\n\t\t\t\tupdateClientParty(i);\n\t\t\t\treturn;\n\t\t\t}\n\t\t/* Else, find space in a box */\n\t\tfor(int i = 0; i < m_boxes.length; i++)\n\t\t\tif(m_boxes[i] != null)\n\t\t\t{\n\t\t\t\t/* Find space in an existing box */\n\t\t\t\tfor(int j = 0; j < m_boxes[i].getPokemon().length; j++)\n\t\t\t\t\tif(m_boxes[i].getPokemon(j) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tm_boxes[i].setPokemon(j, p);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* We need a new box */\n\t\t\t\tm_boxes[i] = new PokemonBox();\n\t\t\t\tm_boxes[i].setPokemon(0, p);\n\t\t\t\tbreak;\n\t\t\t}\n\t}", "public void run() {\r\n this.createBallsOnTopOfPaddle();\r\n this.running = true;\r\n this.runner.run(new CountdownAnimation(2, 3, sprites));\r\n this.runner.run(this);\r\n }", "public boolean add(Ball b) {\n\t\tif (this.contents.contains(b)) return false;\n\t\treturn this.contents.add(b);\n\t}", "@Override\n\tpublic boolean addBall(Ball ball) {\n\t\tif(this.getAllowMoreBalls()&&ball.getPins()<=10) {\n\t\t\tthis.getBalls().add(ball);\n\t\t\tif(this.getBalls().size()==1&&ball.getPins()==10) {\n\t\t\t\tthis.setAllowedBalls(3);\n\t\t\t}\n\t\t\tif(this.getBalls().size()>=this.getAllowedBalls()) {\n\t\t\t\tthis.setAllowMoreBalls(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void addPoint() {\n points += 1;\n }", "private boolean isObjectAPaddle(GObject collider) {\n return (collider == paddle);\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "public void addGameStateListener(GameStateListener gameListener);", "public void mouseMoved(MouseEvent e) {\n \tint paddleOffset = e.getX() - paddleXPosition - PADDLE_WIDTH / 2;\n \tpaddleXPosition += paddleOffset;\n \t\n \t// don't move past the edges of the board\n \tif (paddle.getX() <= 0 && paddleOffset < 0) return;\n \tif (paddle.getX() + PADDLE_WIDTH >= getWidth() && paddleOffset > 0) return;\n \t\n \tpaddle.move(paddleOffset, 0);\n }", "public void playOneTurn() {\n // set running to be true\n this.running = true;\n // create 2 balls and add them to the game using function.\n this.createBalls();\n //create the paddle and place it in the bottom of the screen, middle of line.\n Paddle pad = this.createPaddle();\n //add paddle to game.\n pad.addToGame(this);\n // countdown before turn starts\n this.runner.run(new CountdownAnimation(2, 3, this.sprites));\n // use our runner to run the current animation -- which is one turn of the game\n this.runner.run(this);\n //finally remove pad before the next turn.\n pad.removeFromGame(this);\n }", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}", "public Ball(Game game) { // constructor that initializes the class Game\r\n this.game = game; // initializes the class Game\r\n }", "public void addWall(Wall w)\n {\n walls.add(w);\n }", "public void run()\r\n {\r\n // Check that the current thread is still our pongAnimator.\r\n while (Thread.currentThread() == breakoutAnimator)\r\n {\r\n do\r\n {\r\n if (!paused)\r\n {\r\n System.out.println(paused);\r\n /******************************************************\r\n * CODE TO BE ADDED BY YOU\r\n *****************************************************/\r\n // System.out.println(\"##########################\");\r\n // System.out.println(paddle.toString() + \"\\n\" +\r\n // ball.toString());\r\n // if ball is within the y of the paddle\r\n // System.out.println(lives + \", \" + list.size());\r\n if (ball.getBottomLeftPoint().getY() >= paddle.getTopLeftPoint().getY()\r\n && ball.getBottomLeftPoint().getY() <= paddle.getBottomLeftPoint().getY())\r\n {\r\n if (ball.getBottomRightPoint().getX() > paddle.getTopLeftPoint().getX()\r\n && ball.getBottomLeftPoint().getX() < paddle.getTopRightPoint().getX())\r\n {\r\n ball.setY((int) paddle.getTopRightPoint().getY() - BALL_DIAMETER + 1);\r\n ball.changeVerticalDirection();\r\n }// end if\r\n }// end if\r\n\r\n // if ball hits sides of screen\r\n if (ball.getTopLeftPoint().getX() <= 0 || ball.getTopRightPoint().getX() >= this.getWidth())\r\n ball.changeHorizontalDirection();\r\n\r\n // if ball hits top of screen\r\n if (ball.getTopLeftPoint().getY() <= 0)\r\n ball.changeVerticalDirection();\r\n\r\n // if the ball reaches the bottom\r\n if (ball.getTopLeftPoint().getY() > this.getHeight())\r\n {\r\n lives--;\r\n if (lives == 0)\r\n gameOver = true;\r\n ball.setX(this.getWidth() / 2 - BALL_DIAMETER / 2);\r\n ball.setY(this.getHeight() / 2 - BALL_DIAMETER / 2);\r\n }\r\n\r\n for (int i = 0; i < list.size(); i++)\r\n {\r\n hit = false;\r\n if (((AnimatedShape) list.get(i)).getShape().contains(ball.getLeftSide())\r\n || ((AnimatedShape) list.get(i)).getShape().contains(ball.getRightSide()))\r\n {\r\n ball.changeHorizontalDirection();\r\n hit = true;\r\n }\r\n if (((AnimatedShape) list.get(i)).getShape().contains(ball.getTopSide())\r\n || ((AnimatedShape) list.get(i)).getShape().contains(ball.getBottomSide()))\r\n {\r\n ball.changeVerticalDirection();\r\n hit = true;\r\n }\r\n\r\n if (hit)\r\n {\r\n list.remove(i);\r\n hit = false;\r\n }\r\n }\r\n\r\n // test to see if game is won\r\n if (list.size() == 0)\r\n {\r\n gameWon = true;\r\n gameOver = true;\r\n }\r\n\r\n ball.moveShape();\r\n\r\n repaint();\r\n\r\n // Have the Thread sleep for 1 second at a time.\r\n try\r\n {\r\n Thread.sleep(delay);\r\n }\r\n catch (InterruptedException e)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n }\r\n while (!onMenu);\r\n }\r\n }", "@Override\n\tpublic Game add(Game g) {\n\t\treturn null;\n\t}", "void createNewGame() {\n _gameList.add(new GameObject());\n Log.i(\"createGame\", \"Created New Game\");\n }", "public void add(Point p) {\n add(p.xyz.x, p.xyz.y, p.xyz.z);\n }", "private void add(String name) {\n try {\n PokemonToEdit pkm = Reader.readPokemon(name);\n team.add(pkm);\n System.out.println(name + \" has been add to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException e) {\n System.out.println(\"Pokemon not found natively\");\n System.out.println(\"Try looking for the pokemon online\");\n try {\n PokemonToEdit pkm = Crawler.loadPokemon(name);\n Saver.savePokemon(pkm);\n team.add(pkm);\n System.out.println(name + \" has been added to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException ex) {\n System.out.println(\"Pokemon not found\");\n } catch (TeamFullException ex) {\n System.out.println(\"Team is full\");\n }\n } catch (TeamFullException e) {\n System.out.println(\"Team is full\");\n\n }\n }", "@Override\r\n\tpublic void save(Activity parent) {\n\t\tPongData data = new PongData();\r\n\t\tdata.setBallVelX(ballVelX);\r\n\t\tdata.setBallVelY(ballVelY);\r\n\t\tdata.setBallX(ballX);\r\n\t\tdata.setBallY(ballY);\r\n\t\tdata.setPaddle1X(paddle1X);\r\n\t\tdata.setPaddle1Y(paddle1Y);\r\n\t\tdata.setPaddle2X(paddle2X);\r\n\t\tdata.setPaddle2Y(paddle2Y);\r\n\t\tdata.setPlayer1Score(player1Score);\r\n\t\tdata.setPlayer2Score(player2Score);\r\n\t\t\r\n\t\tData.saveObject(NAME, parent, data);\r\n\t}", "public boolean addGame(Game g)\n {\n \n list.add(g);\n \n return true;\n }", "@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\tGraphics2D g2d = (Graphics2D) g;\n\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tball.paint(g2d);\n\t\tpaddle.paint(g2d);\n\t}", "public synchronized void addComponent(DrawableVector draw) {\n instructions.add(draw);\n }", "public void givePlayerPoints(int pointsToAdd) {\n this.points = this.points + pointsToAdd;\n }", "public void addGameEventListener(GameEventListener gameEventListener);", "private void addAnotherElement() {\n\t\t SnakeSquare ss = sSquare.get(sSquare.size() - 1);\n\t\t double velX = ss.getDX();\n\t\t double velY = ss.getDY();\n\t\t \n\t\t double x = ss.getX();\n\t\t double y = ss.getY();\n\t\t double len = ss.getLength();\n\t\t Color c = ss.getColor();\n//\t\t double snakeSize = 10.0f;\n\t\t \n\t\t if(velX == 0 && velY == 0){sSquare.add(new SnakeSquare(x, y + snakeSize, c, len));}\n\t\t if(velX == 0 && velY == 1){sSquare.add(new SnakeSquare(x, y - snakeSize, c, len));}//move down;\n\t\t if(velX == 0 && velY == -1){sSquare.add(new SnakeSquare(x, y + snakeSize, c, len));}//move up;\n\t\t if(velX == 1 && velY == 0){sSquare.add(new SnakeSquare(x+ snakeSize, y, c, len));}//move right;\n\t\t if(velX == -1 && velY == 0){sSquare.add(new SnakeSquare(x - snakeSize, y, c, len));}// move left;\n\t\t\n\t}", "public boolean paddleHit() {\n\t\tboolean collision = false;\n\t\t// relevant ball point (center) and rad\n\t\tint bc_x = this.ball.x_pos + this.ball.rad;\n\t\tint bc_y = this.ball.y_pos + this.ball.rad;\n\t\tint bc_r = this.ball.rad;\n\t\t// relevant paddle point (top left) and width\n\t\tint pp_x = this.paddle.x_pos;\n\t\tint pp_y = this.paddle.y_pos;\n\t\tint pp_w = this.paddle.width;\n\t\t// calculated distance\n\t\tdouble d;\n\t\t\n\t\tfor ( int x=pp_x; x <= pp_x + pp_w; x++ ) {\n // chunky equation for distance between two points\n\t\t\td = Math.sqrt(Math.pow((bc_x-x), 2) + Math.pow((bc_y-pp_y), 2));\n\t\t\tif (d <= bc_r)\n collision = true;\n\t\t}\n\t\t\n\t\treturn collision;\n\t}", "public void addPoint(T p) {\n points.add(p);\n }", "public void addPoints(int turnTotal)\n {\n currentScore += turnTotal;\n \n if (currentScore >= PigGame.GOAL)\n {\n gamesWon++;\n }\n }", "@Override\n\tpublic void update(){\n\t\t\n\t\tx += dx;\n\t\tif(x <= 2){\n\t\t\tx = 2;\n\t\t}else if(x >= ((this.width+this.paddlewidth)-350)){\n\t\t\tx = (this.width+this.paddlewidth)-350;\n\t\t}else if(x <= Dimensions.PADDLE_LEFT){\n\t\t\tx = Dimensions.PADDLE_LEFT;\n\t\t}\n\t}", "public BallGame() {\n\t\tmyCanvas = new Canvas(\"Ball Demo\", 600, 500, Color.WHITE);\n\t\tmyCanvas.setVisible(true);\n\t\t// Aufgabe 1: MouseListener registrieren\n\t\tmyCanvas.addMouseListener(new DartArrow());\t\t\n\t}", "public void bounce(Paddle paddle) {\n if(hit(paddle)) {\n // ball to the right\n boolean right = paddle.getCenterX() < ball.getCenterX();\n\n if(Math.abs(paddle.getCenterY() - ball.getCenterY()) >= 8 || angle % Math.PI == 0) {\n angle = ((right ? 0 : Math.PI) - Math.atan((right ? 1 : -1) * (paddle.getCenterY() - ball.getCenterY()) / paddle.getWidth())) % (2 * Math.PI);\n } else {\n angle = Math.PI - angle;\n ball.setCenterX( paddle.getRectangle().getX() + (right ? (paddle.getWidth() + ball.getRadius()) : -ball.getRadius() ) );\n }\n\n setSpeed( Math.abs(paddle.getCenterY() - ball.getCenterY()) / 25 + 1);\n }\n }", "@Override\n\tpublic void add(Plane p) {\n\t\tString query = \"INSERT INTO fleet(model,planeid)\" + \"VALUES ('\" + p.getName() + \"',\" + p.getPlaneID() + \")\";\n\t\tDBManager.getInstance().addToDB(query);\n\t}", "public void add() {\n\t\t\n\t}", "public void addPoint(Point3d p) {\n\n\t\t// Add the new point\n\t\tpoints.add(p);\n\n\t\tgeneratePoints();\n\t}", "public void paddleCollision(Paddle myPaddle, Ball ball, Ball secondBall) {\n this.getMyImageView().setVisible(false);\n this.setX(1000);\n }", "private void add() {\n\n\t}", "public ProjectGame() {\n\n super(\"BulletHell\", 1200, 900);\n die = new Event();\n backgroundMusic = new SoundManagerClass();\n playButton.setPositionX(420);\n playButton.setPositionY(180);\n quitButton.setPositionX(623);\n quitButton.setPositionY(181);\n //x = 0;\n reduceLife = new Event();\n fadeOutEvent = new Event();\n PickedUpEvent = new Event();\n die.setEventType(\"playerDeath\");\n fadeOutEvent.setEventType(\"FadeOut\");\n reduceLife.setEventType(\"Collision\");\n collidedEvent = new Event();\n collidedEvent.setEventType(\"CollidedEvent\");\n throwKnife = new Event();\n throwKnife.setEventType(\"throwKnife\");\n\n\n keyIcon.setPositionX(200);\n keyIcon.setPositionY(40);\n\n knifeIcon.setPositionX(205);\n knifeIcon.setPositionY(95);\n\n currentLevel = 0;//0 = base , 3=brigham's level\n\n\n PickedUpEvent.setEventType(\"CoinPickedUp\");\n\n this.addEventListener(myQuestManager, collidedEvent.getEventType());\n\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n\n player = new Player(\"player\", \"resources/player_sheet.png\", \"idle_right\");\n player.setSpriteSheetJson(\"resources/player_sheet.json\");\n player.setDelay(100);\n\n player.getLifeArray().get(0).setPositionX(390);\n player.getLifeArray().get(0).setPositionY(40);\n player.getLifeArray().get(1).setPositionX(420);\n player.getLifeArray().get(1).setPositionY(40);\n player.getLifeArray().get(2).setPositionX(450);\n player.getLifeArray().get(2).setPositionY(40);\n // player.setHasPhysics(true);\n keyCount = 0;\n knifeCount = 4;\n // player.setHasPhysics(true);\n\n // platform.setPositionX(50);\n // platform.setPositionY(550);\n\n\n // platform1.setPositionX(150);\n // platform1.setPositionY(150);\n\n\n player.setPositionX(550);\n player.setPositionY(700);\n\n pressE = new Sprite(\"pressE\", \"pressE.png\");\n player.addChild(pressE);\n pressE.setPositionY(-50);\n\n\n coin.setPositionY(250);\n coin.setPositionX(660);\n\n findKey.setPositionX(500);\n findKey.setPositionY(-20);\n\n getToRoom.setPositionX(500);\n getToRoom.setPositionY(-20);\n\n killTurtle.setPositionX(500);\n killTurtle.setPositionY(-20);\n\n\n //Rectangle2D rect = new Rectangle2D.Float(600,400,700,500);\n //coverList = new ArrayList<Rectangle2D>(); //list of cover sprites\n //coverList.add(rect);\n\n ///////////////////////////////////////LEVEL 0 ////////////////////////////////////////////////////////////////\n\n if (currentLevel == 0) {\n\n tutorial = new TutorialLevel1(\"Tutorial\");\n tutorial.run();\n addChild(tutorial);\n\n myLevel = new Level0(\"Room1\");\n myLevel.run();\n addChild(myLevel);\n\n\n myLevel1 = new Level1(\"Room2\");\n myLevel1.run();\n myLevel1.hide();\n addChild(myLevel1);\n\n myLevel2 = new ahmedslevel(\"Room3\", player);\n myLevel2.run();\n myLevel2.hide();\n addChild(myLevel2);\n\n myLevel3 = new BrighamLevel(\"Room4\");\n myLevel3.run();\n myLevel3.hide();\n addChild(myLevel3);\n\n level4 = new AlternatingSpikesLevel(\"Room6\");\n level4.run();\n level4.hide();\n addChild(level4);\n\n bossLevel = new BossLevel(\"Room5\", player);\n bossLevel.run();\n bossLevel.hide();\n addChild(bossLevel);\n\n\n\n tutorial.mapDoorToRoom(0,myLevel);\n myLevel.mapDoorToRoom(0, myLevel1);\n myLevel1.mapDoorToRoom(0, myLevel2);\n myLevel2.mapDoorToRoom(0, myLevel3);\n myLevel3.mapDoorToRoom(0, level4);\n level4.mapDoorToRoom(0, bossLevel);\n //myLevel3.mapDoorToRoom(0,bossLevel);\n\n\n currentRoom = tutorial;\n\n //myLevel1.mapDoorToRoom(0,myLevel2);\n\n //myLevel2.run();\n //myLevel2.hide();\n\n\n //myLevel2.mapDoorToRoom(0,myLevel3);\n //myLevel3.run();\n //myLevel3.hide();\n currentQuestObjective = 0;\n\n }\n\n if (currentLevel == 4) {\n\n\n bossLevel = new BossLevel(\"Room4\", player);\n bossLevel.run();\n currentRoom = bossLevel;\n\n\n }\n\n enemies = currentRoom.enemies;\n pickpocketEnemy = null;\n\n transitionY = 615;\n transitionYCurrent = 615;\n\n\n backgroundMusic.playSoundEffect(\"resources/oceanOperator.wav\", 100);\n\n }", "void addPlayer(Player newPlayer);", "public void addToGameRoot(){\n Main.getRootPlayGround().getChildren().add(imageView);\n }", "public void addPoint(int x, int y) {\n\t\tshape.addPoint(x, y);\n\t}", "public void addPoint(Point pon)\n {\n poly[size] = pon;\n size++;\n }", "public void run() {\n while (canPlay) {\n // Get ball position and speed\n double ballX = myBall.getX();\n double ballY = myBall.getY();\n double ballVx = myBall.getVx();\n double ballVy = myBall.getVy();\n // Track the ball if it is on the agent's side coming towards him\n if (ballVx < 0 && ballX < (ppPaddleXinit + ppAgentXinit) / 2) {\n // Find linear approximation of ball's Y position when it reaches the paddle's X position\n double predictedY = ballVy / ballVx * (getX() - ballX) + ballY;\n myTable.getDisplay().pause(AGENTLAG);\n setY(predictedY);\n }\n // Update paddle parameters\n updateParams();\n // Time has to be translated to ms\n myTable.getDisplay().pause(TICK * TIMESCALE);\n }\n }", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif(shipSpawned)\n\t\t{\n\t\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t\t\treturn;\n\t\t}\n\t\tgameObj.add(new PlayerShip(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Player ship added\");\n\t\tshipSpawned = true;\n\t\tnotifyObservers();\n\t}", "public void addVps(Player player) {\n }" ]
[ "0.75337607", "0.65887773", "0.6549752", "0.6450722", "0.6329161", "0.63288516", "0.62988806", "0.62624204", "0.6243342", "0.60335666", "0.6027018", "0.5990607", "0.5981721", "0.5934978", "0.59145904", "0.5889573", "0.58610094", "0.58540493", "0.58210826", "0.580033", "0.5789073", "0.5781814", "0.57206345", "0.5715862", "0.56815743", "0.56815743", "0.56809855", "0.56663555", "0.56663555", "0.56663555", "0.5663339", "0.56602126", "0.56578463", "0.5622191", "0.5622191", "0.56067055", "0.5561867", "0.5553674", "0.55318004", "0.55060816", "0.5501912", "0.54968476", "0.5479004", "0.54717714", "0.54534036", "0.54382247", "0.54104024", "0.5408632", "0.5400714", "0.53993034", "0.539724", "0.53812975", "0.5370136", "0.5369248", "0.5355457", "0.53524846", "0.5347586", "0.52923924", "0.52835274", "0.52749807", "0.5268021", "0.52642506", "0.52618724", "0.52530175", "0.5245881", "0.52421236", "0.52415943", "0.52375185", "0.5236166", "0.5219456", "0.52181935", "0.5213381", "0.52029383", "0.5194516", "0.5178518", "0.51773834", "0.5170714", "0.5160632", "0.5153549", "0.51531404", "0.51485664", "0.51474845", "0.5141118", "0.51355857", "0.5125311", "0.5117815", "0.5117684", "0.5117618", "0.5117461", "0.5097783", "0.50950325", "0.5093636", "0.5090748", "0.5089302", "0.5084155", "0.5082313", "0.5079686", "0.5079353", "0.5077427", "0.50766754" ]
0.5458916
44
Method that says whether or not the current screen uses the AniThread.
public boolean usesAniThread() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean m61442b() {\n if (Looper.getMainLooper().getThread() == Thread.currentThread()) {\n return true;\n }\n return false;\n }", "void checkCurrentScreen();", "public static boolean isMainThread() {\n if (!initialized)\n return true; // always return true if the app is not initialized\n // properly\n if (thread_ref != null)\n return thread_ref.get() == Thread.currentThread();\n return false;\n }", "public abstract boolean isMainThread();", "public static boolean m18371b() {\n return Thread.currentThread() == Looper.getMainLooper().getThread();\n }", "@Override\n public boolean active() {\n General.sleep(100); // Sleep to reduce CPU usage.\n return fishing_spots[0].isOnScreen();\n }", "public final boolean isOnScreen() {\n\t\treturn Calculations.isOnScreen(this.getCenterPointOnScreen());\n\t}", "public boolean iAmCrawling();", "public static boolean isRenderQueueThread() {\n/* 111 */ return (Thread.currentThread() == rqThread);\n/* */ }", "public boolean isOnscreen(Rectangle screen) {\n\t\tboolean onscreen = false;\n\t\tonscreen = (screen.contains(NW) || screen.contains(NE) || screen.contains(SW) || screen.contains(SE));\n\t\treturn onscreen;\n\t}", "public boolean hasEnteredActivity() {\n\n for (Annotation annotation : annotationList)\n if (annotation instanceof AttachScreen)\n return ((AttachScreen) annotation).isActive();\n\n return false;\n }", "boolean isIdle();", "@Override\n public void onScreenStatus(boolean isAs) {\n }", "public boolean isTargetVisible() {\n return getDouble(\"tv\") == 1;\n }", "public static boolean isUiThread() {\n\t\treturn Looper.myLooper() == Looper.getMainLooper();\n\t}", "public boolean isScreenOn() {\n return mPowerManager.isScreenOn();\n }", "public boolean supportShowOnScreenLocked() {\n return false;\n }", "public abstract boolean isIdle();", "public boolean isActive()\n {\n return fetcherThread.isActive();\n }", "public boolean isOnscreen( )\r\n {\r\n if ( this.transform.tx( ) + this.width( ) < 0.0f ) return false;\r\n if ( this.transform.tx( ) > SkyDiver.WindowWidth ) return false;\r\n if ( this.transform.ty( ) + this.height( ) < 0.0f ) return false;\r\n if ( this.transform.ty( ) > SkyDiver.WindowHeight ) return false;\r\n\r\n return true;\r\n }", "boolean isDisplay();", "boolean isDisplay();", "@CalledByNative\n public abstract boolean isScreenCast();", "private boolean canReuseScreenNail() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isGamePlayScreen () {\n\t\treturn false;\n\t}", "public boolean isActor() {\r\n \t\treturn (actor != null);\r\n \t}", "public boolean isThreadAvailable(String threadKey) {\n return threadControl.containsKey(threadKey);\n }", "boolean isActive() {\n assert this.isHeldByCurrentThread();\n return isActive;\n }", "boolean getScreen() throws IOException,URISyntaxException ;", "public boolean isScreenLoaded() \n\t{\n\t\treturn screenLoaded;\n\t}", "boolean hasThreadId();", "public boolean isGameRunning()\n\t{\n\t\treturn zegar.isRunning() || wToku;\n\t}", "public boolean isAwake();", "public boolean isRunning() {\n \t\tif (localMonitor == null) {\n\t\t\treturn localMonitor.isRunning();\n \t\t}\n \n \t\treturn localMonitor.isRunning();\n \t}", "public static boolean m153581d() {\n return m153572a().getLooper() == Looper.myLooper();\n }", "private static boolean ignore(Thread thread) {\n String threadName = thread.getName();\n if (IGNORED_THREADS_REGEX.matcher(threadName).matches())\n return true;\n\n if (thread.getName().startsWith(\"Thread-\")) {\n // Special check for ByteMan, because nobody calls TransformListener.terminate()\n if (thread.getClass().getName().equals(\"org.jboss.byteman.agent.TransformListener\"))\n return true;\n\n // Special check for Arquillian, because it uses an unnamed thread to read from the container console\n StackTraceElement[] s = thread.getStackTrace();\n for (StackTraceElement ste : s) {\n if (ste.getClassName().equals(ARQUILLIAN_CONSOLE_CONSUMER)) {\n return true;\n }\n }\n }\n return false;\n }", "public abstract TnScreen getCurrentScreen();", "public boolean isMonitoringEnabled(){\n return (selectorThread != null ?\n selectorThread.isMonitoringEnabled() : false);\n }", "public static boolean isDispatchThread() {\n\tEventQueue eq = Toolkit.getEventQueue();\n\tEventQueue next = eq.nextQueue;\n\twhile (next != null) {\n\t eq = next;\n\t next = eq.nextQueue;\n\t}\n\treturn (Thread.currentThread() == eq.dispatchThread);\n }", "@Override\n public boolean isInScreen(){\n return this.getX() > App.START_COORDINATE_X - this.getSpriteImage().getWidth() / 2\n && this.getX() < App.SCREEN_WIDTH + this.getSpriteImage().getWidth() / 2;\n }", "protected boolean isActive() {\n return cameraInstance != null;\n }", "boolean defined(ThreadContext tc, RakudoObject obj);", "public boolean isAvailable(){\n\t\ttry{\n\t\t\tgetPrimingsInternal(\"Test\", \"ATGATGATGATGATGATGATG\");\n\t\t}\n\t\tcatch(IOException e){\n\t\t\treturn false;\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isLaunched();", "@Override public boolean active() {\n General.sleep(200, 300); // Reduces CPU usage.\n return isAtFish();\n }", "public boolean m6592I() {\n ActivityManager activityManager = (ActivityManager) getSystemService(\"activity\");\n int i = Build.VERSION.SDK_INT;\n if (i >= 23) {\n if (activityManager.getLockTaskModeState() != 0) {\n return true;\n }\n return false;\n } else if (i >= 21) {\n return activityManager.isInLockTaskMode();\n } else {\n return false;\n }\n }", "private boolean isOnScreen(float x, float y) {\r\n /* I'm not sure if it is necessary to check that the number is greater than 0 */\r\n return ((x < _offScreenCanvas.getWidth()) && (x > 0)) && ((y < _offScreenCanvas.getHeight()) && (y > 0));\r\n }", "@SuppressWarnings(\"deprecation\") //For more on why this is added, see - https://stackoverflow.com/q/45519439/5550161\n public boolean isBusyRecording() {\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (ScreenRecordService.class.getName().equals(service.service.getClassName())) {\n return true;\n }\n }\n return false;\n }", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "public boolean isAlive()\r\n\t{\r\n\t\treturn internalThread.isAlive();\r\n\t}", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isCurrent(EGLSurface eglSurface) {\n return argonGLContext.equals(argonEGL.eglGetCurrentContext()) &&\n eglSurface.equals(argonEGL.eglGetCurrentSurface(EGL10.EGL_DRAW));\n }", "protected boolean isElementOnScreen(WebElement element) {\n return (Boolean)getSeleniumHelper().executeJavascript(ELEMENT_ON_SCREEN_JS, element);\n }", "@Override\n public boolean detect() {\n QQRobot.findWindowLocation(RGB_SCREEN);\n if (QQTetris.QQCoord.x != -1) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isShowWhenLocked() {\n return getIntent().getBooleanExtra(\"StartActivityWhenLocked\", false);\n }", "protected boolean isInLoop() {\n return _loopInfo != null;\n }", "public boolean isAlive(){\r\n\t\treturn Thread.currentThread() == workerThread;\r\n\t}", "static public boolean isLaunched()\n\t{\n\t\tif (g_currentLaunch == null)\n\t\t return false;\n\t\telse\n\t\t return true;\n\t}", "public boolean isSetThread() {\n return EncodingUtils.testBit(__isset_bitfield, __THREAD_ISSET_ID);\n }", "private boolean isSplitActive() {\n ActivityManager.RunningTaskInfo runningTaskInfo;\n SplitScreenTaskOrganizer splitScreenTaskOrganizer = this.mSplits;\n ActivityManager.RunningTaskInfo runningTaskInfo2 = splitScreenTaskOrganizer.mPrimary;\n return (runningTaskInfo2 == null || (runningTaskInfo = splitScreenTaskOrganizer.mSecondary) == null || (runningTaskInfo2.topActivityType == 0 && runningTaskInfo.topActivityType == 0)) ? false : true;\n }", "public static boolean areCustomCamerasActive(){\r\n\t\treturn runningCustomCameras;\r\n\t}", "private boolean isInSession()\n {\n return EngagementActivityManager.getInstance().getCurrentActivityAlias() != null;\n }", "public boolean hasRoboticon(){\r\n\t\treturn roboticon != null;\r\n\t}", "protected boolean isOnSameScreenAsChildren() {\n return true;\n }", "static synchronized boolean isCurrentThreadRMIServer()\n\t{\n\t\treturn threadIsRmi.get();\n\t}", "@Override\n protected boolean isRunning() {\n return super.isRunning() || mAuxAnimator.isRunning();\n }", "boolean hasMainUtteranceTargetLevel();", "@Override\r\n\t\tpublic boolean isCurrent()\r\n\t\t{\n\t\t\treturn true;\r\n\t\t}", "public boolean isDetecting()\n\t{\n\t\treturn currentlyDetecting;\n\t}", "private boolean m21865i() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n return telephonyManager.getNetworkOperatorName().equalsIgnoreCase(\"android\");\n }\n return false;\n }", "public boolean isUseOffscreenBuffer() {\n return paintStrategy instanceof OffscreenBufferStrategy;\n }", "public boolean isEngineOn();", "public boolean isAbovePlatform() { return isAbovePlatform; }", "public boolean isDraw() {\n\t\tif (!h1.isAlive() && !h2.isAlive())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public static boolean isRootThread()\n {\n if(SwingUtilities.isEventDispatchThread())\n return true;\n return isRootThread(Thread.currentThread());\n }", "@Override\r\npublic boolean isOnScreen() {\nreturn false;\r\n}", "public boolean IsAvailable()\n\t{\n\t\treturn mbHasAccelerometer;\n\t}", "boolean spawningEnabled();", "private boolean isAnyThreadWorking()\n\t{\n\t\tboolean someoneIsWorking = false;\n\t\tfor (int i = 0; i < threads.size(); i++)\n\t\t{\n\t\t\tThread thread = threads.get(i);\n\t\t\tif (thread.isAlive() && thread.getState() == State.RUNNABLE)\n\t\t\t{\n\t\t\t\tsomeoneIsWorking = true;\n\t\t\t}\n\t\t}\n\t\treturn someoneIsWorking;\n\t}", "public boolean isAI() {\r\n\t\treturn AI;\r\n\t}", "public boolean isScreenLocked() {\n return mKeyguardManager.inKeyguardRestrictedInputMode();\n }", "@Override\n public native boolean isAutoWaitForIdle();", "@Override\n public final boolean isRunning() {\n return (this.running && runningAllowed());\n }", "boolean hasStartingInfo();", "public boolean isRunning()\n {\n WebElement box = driver.findElement(By.cssSelector(\"#box\"));\n String lv = box.getAttribute(\"class\");\n int level = lv.charAt(2) - 48;\n\n WebElement timeElem = driver.findElement(By.cssSelector(\"#room > header > span.time\"));\n String timeStr = timeElem.getText();\n int time = stringToInt(timeStr);\n\n return level != 1 && time != 1;\n }", "static public boolean isCurrentLaunch(ILaunch launch)\n\t{\n\t\tif ((g_currentLaunch == null) || (g_currentLaunch != launch))\n\t\t return false;\n\t\telse\n\t\t\treturn true;\n\t}", "boolean isLeaseHeldByCurrentThread() {\n return thread == Thread.currentThread();\n }", "boolean hasActive();", "boolean safeToRun() {\n return game.i != null;\n }", "boolean hasPerformAt();", "private void checkCrossThreads() {\t\r\n\t\t\tisJumppingBetweenThreads = (currentThread != Thread.currentThread());\r\n\t\t}" ]
[ "0.6796843", "0.6740103", "0.65862596", "0.6455702", "0.63942856", "0.6319828", "0.6273093", "0.6250852", "0.6236396", "0.61766154", "0.6167083", "0.61313426", "0.61055493", "0.60842466", "0.60613585", "0.601108", "0.5977399", "0.5974328", "0.59699357", "0.59649324", "0.5951713", "0.5951713", "0.5941392", "0.5934361", "0.5894772", "0.5853324", "0.584795", "0.5845679", "0.5833111", "0.582869", "0.5821816", "0.5751856", "0.57506794", "0.5745276", "0.5731155", "0.5729638", "0.57242197", "0.5723779", "0.5711713", "0.57055455", "0.5705333", "0.56725246", "0.56620276", "0.56611395", "0.56565106", "0.5652653", "0.5652459", "0.56518435", "0.5649081", "0.5649081", "0.5649081", "0.5649081", "0.5649081", "0.5641527", "0.5639876", "0.5639876", "0.5639876", "0.5639876", "0.5639876", "0.5639876", "0.5626837", "0.5609974", "0.5608285", "0.56063545", "0.5601249", "0.5596711", "0.55938715", "0.5580673", "0.5569689", "0.55690813", "0.55667967", "0.5564995", "0.5553985", "0.5548642", "0.5548538", "0.55465657", "0.55451214", "0.55430573", "0.5540867", "0.5532862", "0.5532421", "0.5514926", "0.5511606", "0.5508602", "0.55036926", "0.54995537", "0.5496869", "0.5496836", "0.54912233", "0.5488563", "0.5486969", "0.5484561", "0.54773295", "0.5470675", "0.546665", "0.5459082", "0.5453888", "0.5453517", "0.5450433", "0.54501754" ]
0.7765446
0
Method that draws for each screen.
public void draw(Graphics g) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }", "public void DrawScreen() {\r\n DrawScreen(0, false, null);\r\n }", "private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }", "public void render()\n\t{\n\t\t// Get or create the BufferStrategy to plan rendering\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null)\n\t\t{\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Get the graphics that can be drawn to\n\t\tg = bs.getDrawGraphics();\n\t\t\n\t\t// Set the Graphics2D\n\t\tg2d = (Graphics2D)g;\n\t\t\n\t\t// Create a black rectangle to fill the canvas as a base background\n\t\tg.setColor(Color.black);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\n\t\tif (screenLoaded)\n\t\t{\n\t\t\t// Draw the static background\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawStaticBackground(g);\n\t\t\t\n\t\t\t// Translate the screen based on the Camera\n\t\t\tif (game.getCamera() != null && game.usesCamera())\n\t\t\t\tg2d.translate(game.getCamera().getxPos(), \n\t\t\t\t\t\t \t game.getCamera().getyPos());\n\t\t\t\n\t\t\t// Draw the background layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawBackground(g);\n\t\t\t\n\t\t\t// Render all of the Tiles\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null && game.usesWorld())\n\t\t\t\tgame.getWorldHandler().renderTiles(g);\n\t\t\t\n\t\t\t// Render all of the GameObjects\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null && game.usesGameObjects())\n\t\t\t\tgame.getObjectHandler().renderGameObjects(g);\n\t\t\t\n\t\t\t// Draw the foreground layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawForeground(g);\n\t\t\t\n\t\t\t// Draw the lighting\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null && game.usesLighting())\n\t\t\tg.drawImage(game.getLightHandler().getLightmap(), -1500, -3100, null);\n\t\t\t\n\t\t\t// Translate the screen based on the Camera\n\t\t\tif (game.getCamera() != null && game.usesCamera())\n\t\t\t\tg2d.translate(-game.getCamera().getxPos(), \n\t\t\t\t\t\t \t -game.getCamera().getyPos());\n\t\t\t\n\t\t\t// Draw the gui layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawGui(g);\n\t\t\t\n\t\t\t// Draw the debug layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null\n\t\t\t\t&& game.getDebugScreen() != null\n\t\t\t\t&& game.isDebugShown())\n\t\t\t\tgame.getDebugScreen().showDebug(g);\n\t\t\t\n\t\t\t// Draw the loading \"curtain\" if the screen is still loading\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null &&\n\t\t\t\t!screenLoaded)\n\t\t\t{\n\t\t\t\tif (timeCount < game.getFps() / 4)\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t\telse if (timeCount < (game.getFps() / 4) * 2)\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t\telse if (timeCount < (game.getFps() / 4) * 3)\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Dispose of all graphics\n\t\t\tg.dispose();\n\t\t\t// Show all graphics prepared on the BufferStrategy\n\t\t\tbs.show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tGraphics2D g2 = (Graphics2D)g;\n\t\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\t\n\t\t\tif (timeCount < game.getFps() / 4)\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t\telse if (timeCount < (game.getFps() / 4) * 2)\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t\telse if (timeCount < (game.getFps() / 4) * 3)\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Dispose of all graphics\n\t\tg.dispose();\n\t\t// Show all graphics prepared on the BufferStrategy\n\t\tbs.show();\n\t}", "public void drawAllGraphics(){\r\n\t\t \r\n\t}", "private void draw()\n {\n if(surfaceHolder.getSurface().isValid())\n {\n // Locks the surface. Can't be accessed or changed before it is unlocked again\n canvas = surfaceHolder.lockCanvas();\n\n // Background color\n canvas.drawColor(Color.BLACK);\n\n\n // ===================== DRAW SPRITES ======================= //\n // Draw Pacman\n canvas.drawBitmap(pacman.getBitmap(), pacman.getX(), pacman.getY(), paint);\n\n // Draw all Monsters\n for(Monster monster : monsterList)\n {\n canvas.drawBitmap(monster.getBitmap(), monster.getX(), monster.getY(), paint);\n }\n\n // Draw Cherries\n for(Cherry cherry : cherryList)\n {\n canvas.drawBitmap(cherry.getBitmap(), cherry.getX(), cherry.getY(), paint);\n }\n\n // Draw Key\n canvas.drawBitmap(key.getBitmap(), key.getX(), key.getY(), paint);\n\n // Draw Stars\n paint.setColor(Color.WHITE);\n for(Star star : starList)\n {\n paint.setStrokeWidth(star.getStarWidth());\n canvas.drawPoint(star.getX(), star.getY(), paint);\n }\n\n // ======================================================= //\n\n\n if(!gameEnded)\n {\n // Draw user HUD\n paint.setTextAlign(Paint.Align.LEFT);\n paint.setColor(Color.WHITE);\n paint.setTextSize(40);\n paint.setTypeface(Typeface.MONOSPACE);\n canvas.drawText(\"Level: \" + level, 10, 50, paint);\n canvas.drawText(\"Hi Score: \" + hiScore, (screenMax_X /4) * 3, 50 , paint);\n canvas.drawText(\"Score: \" + score, screenMax_X / 3, 50 , paint);\n canvas.drawText(\"New level in: \" + distanceRemaining + \"km\", screenMax_X / 3, screenMax_Y - 20, paint);\n canvas.drawText(\"Lives: \" + pacman.getLifes(), 10, screenMax_Y - 20, paint);\n canvas.drawText(\"Speed \" + pacman.getSpeed() * 100 + \" Km/h\", (screenMax_X /4) * 3, screenMax_Y - 20, paint);\n\n } else {\n\n // Draw 'Game Over' Screen\n paint.setTextAlign(Paint.Align.CENTER);\n paint.setTypeface(Typeface.MONOSPACE);\n paint.setFakeBoldText(true);\n paint.setTextSize(150);\n canvas.drawText(\"Game Over\", screenMax_X / 2, 350, paint);\n paint.setTextSize(50);\n paint.setTypeface(Typeface.DEFAULT);\n paint.setFakeBoldText(false);\n canvas.drawText(\"Hi Score: \" + hiScore, screenMax_X / 2, 480, paint);\n canvas.drawText(\"Your Score: \" + score, screenMax_X / 2, 550, paint);\n paint.setTextSize(80);\n canvas.drawText(\"Tap to replay!\", screenMax_X / 2, 700, paint);\n }\n\n if(levelSwitched)\n {\n // Notify the user whenever level is switched\n paint.setTextSize(100);\n paint.setTypeface(Typeface.MONOSPACE);\n paint.setFakeBoldText(true);\n paint.setTextAlign(Paint.Align.CENTER);\n canvas.drawText(\"Level \" + level + \"!\", screenMax_X / 2, 350, paint);\n }\n\n // Unlcock canvas and draw it the scene\n surfaceHolder.unlockCanvasAndPost(canvas);\n }\n }", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "public void draw() { \n\t\tbackground(255); // Clear the screen with a white background\n\t\tfill(0);\n\t\ttextAlign(LEFT);\n\t\ttextSize(12);\n\t\t\n\t\tif (runCount == 0) {\n\t\t\tboard.onClick();\n\t\t} else if (runCount > 0) {\n\t\t\trunCount--;\n\t\t}\n\t\t\n\t\tif (board != null) {\n\t\t\tboard.draw(this, 0, 0, height, height);\n\t\t}\n\t\t\n\t}", "private void drawSquares() {\n for (Square square : gui.game) {\n new SquareRenderer(gui, g2, square);\n }\n }", "public void draw() {\n mGameBoard.draw();\n }", "public void draw()\n\t{\n\t\tdrawWalls();\n\n\t\tfor( Zombie z: zombies )\n\t\t{\n\t\t\tz.draw();\n\t\t}\n\t\tfor( Entity h: humans )\n\t\t{\n\t\t\th.draw();\n\t\t}\n\n\t\tdp.repaintAndSleep(rate);\n\t}", "public void drawAll(){\n for (Triangle triangle : triangles) {\n triangle.draw();\n }\n for (Circle circle : circles) {\n circle.draw();\n }\n for(Rectangle rectangle : rectangles){\n rectangle.draw();\n }\n }", "private void render() {\n\t\tBufferStrategy buffStrat = display.getCanvas().getBufferStrategy();\n\t\tif(buffStrat == null) {\n\t\t\tdisplay.getCanvas().createBufferStrategy(3); //We will have 3 buffered screens for the game\n\t\t\treturn;\n\t\t}\n\n\t\t//A bufferstrategy prevents flickering since it preloads elements onto the display.\n\t\t//A graphics object is a paintbrush style object\n\t\tGraphics g = buffStrat.getDrawGraphics();\n\t\t//Clear the screen\n\t\tg.clearRect(0, 0, width, height); //Clear for further rendering\n\t\t\n\t\tif(State.getState() !=null) {\n\t\t\tState.getState().render(g);\n\t\t}\n\t\t//Drawings to be done in this space\n\t\t\n\t\t\n\t\t\n\t\tbuffStrat.show();\n\t\tg.dispose();\n\t}", "public final void drawChildren() {\n // Set my clipping rectangle\n assert (window != null);\n assert (getScreen() != null);\n Screen screen = getScreen();\n\n // Special case: TStatusBar is drawn by TApplication, not anything\n // else.\n if (this instanceof TStatusBar) {\n return;\n }\n\n screen.setClipRight(width);\n screen.setClipBottom(height);\n\n int absoluteRightEdge = window.getAbsoluteX() + window.getWidth();\n int absoluteBottomEdge = window.getAbsoluteY() + window.getHeight();\n if (!(this instanceof TWindow) && !(this instanceof TVScroller)) {\n absoluteRightEdge -= 1;\n }\n if (!(this instanceof TWindow) && !(this instanceof THScroller)) {\n absoluteBottomEdge -= 1;\n }\n int myRightEdge = getAbsoluteX() + width;\n int myBottomEdge = getAbsoluteY() + height;\n if (getAbsoluteX() > absoluteRightEdge) {\n // I am offscreen\n screen.setClipRight(0);\n } else if (myRightEdge > absoluteRightEdge) {\n screen.setClipRight(screen.getClipRight()\n - (myRightEdge - absoluteRightEdge));\n }\n if (getAbsoluteY() > absoluteBottomEdge) {\n // I am offscreen\n screen.setClipBottom(0);\n } else if (myBottomEdge > absoluteBottomEdge) {\n screen.setClipBottom(screen.getClipBottom()\n - (myBottomEdge - absoluteBottomEdge));\n }\n\n // Set my offset\n screen.setOffsetX(getAbsoluteX());\n screen.setOffsetY(getAbsoluteY());\n\n // Draw me\n draw();\n\n // Continue down the chain\n for (TWidget widget: children) {\n widget.drawChildren();\n }\n }", "private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }", "public void drawScreen(int par1, int par2, float par3)\n {\n \tStringTranslate var1 = StringTranslate.getInstance();\n this.drawDefaultBackground();\n this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 16777215);\n int var4 = this.func_73907_g();\n int var5 = 0;\n\n while (var5 < this.options.keyBindings.length)\n {\n boolean var6 = false;\n int var7 = 0;\n\n while (true)\n {\n if (var7 < this.options.keyBindings.length) // checking for collisions in the minimap's bindings, and the game's bindings from 0 to the size of the minimap's bindings\n {\n if (this.options.keyBindings[var5].keyCode == Keyboard.KEY_NONE || (var7 == var5 || this.options.keyBindings[var5].keyCode != this.options.keyBindings[var7].keyCode) && (this.options.keyBindings[var5].keyCode != this.options.game.gameSettings.keyBindings[var7].keyCode))\n {\n ++var7;\n continue;\n }\n\n var6 = true; // collision\n }\n \n if (var7 < this.options.game.gameSettings.keyBindings.length) // continue checking for collisions only among the standard game's keybindings - an array larger than that of the minimap.\n {\n if (this.options.keyBindings[var5].keyCode == Keyboard.KEY_NONE || this.options.keyBindings[var5].keyCode != this.options.game.gameSettings.keyBindings[var7].keyCode)\n {\n ++var7;\n continue;\n }\n\n var6 = true; // collision\n }\n\n if (this.buttonId == var5) // buttonId is currently being edited button. Draw > ??? <\n {\n ((GuiButton)this.controlList.get(var5)).displayString = \"\\u00a7f> \\u00a7e??? \\u00a7f<\";\n }\n else if (var6) // key collision, draw red\n {\n ((GuiButton)this.controlList.get(var5)).displayString = \"\\u00a7c\" + this.options.getOptionDisplayString(var5);\n }\n else // just show current binding\n {\n ((GuiButton)this.controlList.get(var5)).displayString = this.options.getOptionDisplayString(var5);\n }\n\n this.drawString(this.fontRenderer, this.options.getKeyBindingDescription(var5), var4 + var5 % 2 * 160 + 70 + 6, this.height / 6 + 24 * (var5 >> 1) + 7, -1);\n ++var5;\n break;\n }\n }\n \n this.drawCenteredString(this.fontRenderer, var1.translateKey(\"controls.minimap.unbind1\"), this.width / 2, this.height / 6 + 115, 16777215);\n this.drawCenteredString(this.fontRenderer, var1.translateKey(\"controls.minimap.unbind2\"), this.width / 2, this.height / 6 + 129, 16777215);\n\n\n super.drawScreen(par1, par2, par3);\n }", "public void draw() {\r\n\t\tfor(int i=0; i<2; i++) {\r\n\t\t\trenderer[i].setView(camera[i]);\r\n\t\t\trenderer[i].render();\r\n\t\t}\r\n\t}", "private void render() {\n if (game.isEnded()) {\n if (endGui == null) {\n drawEndScreen();\n }\n\n return;\n }\n\n drawScore();\n drawSnake();\n drawFood();\n }", "public void draw() {\n \n // TODO\n }", "private void render() {\n\n if (state == STATE.PAUSE) {\n\n return;\n }\n\n\n if (state == STATE.MENU) {\n\n menu.draw();\n arrow.render();\n return;\n\n }\n\n if (state == STATE.INSTRUCTIONS) {\n instructions.draw();\n return;\n }\n\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).render();\n }\n\n\n for (Enemy enemy : enemies) {\n enemy.render();\n }\n\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).render();\n }\n\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).render();\n }\n\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).render();\n }\n\n topBar.render();\n bottomBar.render();\n fps.render();\n score.render();\n\n\n }", "private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n }else{\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n \n \n if(!gameover){\n player.render(g);\n borrego.render(g);\n rayo.render(g);\n \n for (Enemy brick : enemies) {\n brick.render(g);\n //bomba.render(g);\n }\n \n for (Fortaleza fortaleza : fortalezas) {\n fortaleza.render(g);\n }\n \n for (Bomba bomba: bombas){\n bomba.render(g);\n }\n \n drawScore(g);\n drawLives(g,vidas);\n }else if(gameover){\n drawGameOver(g);\n }\n \n\n if (lost && !gameover){\n drawLost(g);\n }\n if (pause && !lost && !gameover){\n drawPause(g);\n }\n if(win && !lost && !pause && !lost &&!gameover){\n \n drawWin(g);\n }\n \n bs.show();\n g.dispose();\n }\n }", "private void drawImages() {\n\t\t\r\n\t}", "public synchronized void draw() {\n // Clear the canvas\n// canvas.setFill(Color.BLACK);\n// canvas.fillRect(0, 0, canvasWidth, canvasHeight);\n canvas.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // Draw a grid\n if (drawGrid) {\n canvas.setStroke(Color.LIGHTGRAY);\n canvas.setLineWidth(1);\n for (int i = 0; i < mapWidth; i++) {\n drawLine(canvas, getPixel(new Point(i - mapWidth / 2, -mapHeight / 2)), getPixel(new Point(i - mapWidth / 2, mapHeight / 2)));\n drawLine(canvas, getPixel(new Point(-mapWidth / 2, i - mapHeight / 2)), getPixel(new Point(mapWidth / 2, i - mapHeight / 2)));\n }\n }\n\n // Draw each player onto the canvas\n int height = 0;\n for (Player p : playerTracking) {\n canvas.setStroke(p.getColor());\n\n drawName(canvas, p.getName(), height, p.getColor());\n height += 30;\n\n canvas.setLineWidth(7);\n\n // Draw each position\n Point last = null;\n int direction = 0;\n for (Point point : p.getPoints()) {\n if (last != null) {\n drawLine(canvas, getPixel(last), getPixel(point));\n\n Point dir = point.substract(last);\n if (dir.X > dir.Y && dir.X > 0) {\n direction = 1;\n } else if (dir.X < dir.Y && dir.X < 0) {\n direction = 3;\n } else if (dir.Y > dir.X && dir.Y > 0) {\n direction = 2;\n } else if (dir.Y < dir.X && dir.Y < 0) {\n direction = 0;\n }\n }\n last = point;\n }\n\n drawSlug(canvas, p.getId() - 1, getPixel(last), direction);\n }\n }", "@Override\n public void handlePaint()\n {\n for(GraphicObject obj : this.graphicObjects)\n {\n obj.draw();\n }\n \n }", "@Override\n public void draw(Canvas canvas, Paint paint) {\n paint.setColor(Color.WHITE);\n canvas.drawRect(0.0F, 0.0F, this.getScreenWidth(), this.getScreenHeight(), paint);\n if (gameState == GameState.START) {\n paint.setColor(Color.BLACK);\n paint.setTextSize(50);\n canvas.drawText(\"Catch the Easter Eggs!\",\n 0.1F * screenHeight, 0.1F * screenWidth, paint);\n } else {\n paint.setColor(Color.BLACK);\n paint.setTextSize(50);\n canvas.drawText(\"(Go back to Main Level)\",\n 0.1F * screenHeight, 0.1F * screenWidth, paint);\n canvas.drawText(\"Bonus Points: \" + this.getBonusPoints(),\n 0.1F * screenHeight, 0.2F * screenWidth, paint);\n }\n List<Drawable> drawables = this.getDrawableObjects();\n for (Drawable d : drawables) {\n d.draw(canvas, paint);\n }\n }", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "private void draw(){\n if (ourHolder.getSurface().isValid()) {\n\n if (openMainMenu) {\n mainMenu();\n } else if (openGameOverMenu) {\n gameOverMenu();\n } else if (openUpgradesMenu) {\n upgradeMenu();\n } else if (openPauseMenu) {\n pauseMenu();\n } else {\n // Lock the canvas ready to draw\n gameCanvas = ourHolder.lockCanvas();\n\n // Draw the background\n gameCanvas.drawBitmap(btBgLeft, leftSideRect.left, leftSideRect.top, null);\n gameCanvas.drawBitmap(btBgMiddle, middleSideRect.left, middleSideRect.top, null);\n gameCanvas.drawBitmap(btBgRight, rightSideRect.left, rightSideRect.top, null);\n\n // HUD Rectangle\n String padding = \" | \";\n paint.setTextSize(30);\n paint.setColor(Color.argb(125, 0, 0, 0));\n gameCanvas.drawRect(hudRect, paint);\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawText(\"Bonus: \" + multiplier + padding + \"Score: \" + totalScore + padding + \"Shields: \" + shields + padding + \"Cash: £\" + cash, hudRect.left + (hudRect.right/25), hudRect.bottom - (hudRect.height()/3), paint);\n\n // Draw the invaders bullets if active\n for(int i = 0; i < invadersBullets.length; i++){\n paint.setColor(Color.argb(255, 228, 53, 37));\n if(invadersBullets[i].getStatus()) {\n gameCanvas.drawRect(invadersBullets[i].getRect(), paint);\n }\n }\n\n // Draw the players bullet if active\n if(bullet.getStatus()){\n paint.setColor(Color.argb(255, 30, 127, 224));\n gameCanvas.drawRect(bullet.getRect(), paint);\n }\n\n // Draw the player spaceship\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawBitmap(defender.getBitmap(), defender.getX(), screenY - defender.getHeight(), paint);\n\n // Draw the invaders\n for(int i = 0; i < numInvaders; i++){\n if(invaders[i].getVisibility()) {\n if(uhOrOh) {\n gameCanvas.drawBitmap(invaders[i].getBitmap(), invaders[i].getX(), invaders[i].getY(), paint);\n }else{\n gameCanvas.drawBitmap(invaders[i].getBitmap2(), invaders[i].getX(), invaders[i].getY(), paint);\n }\n }\n }\n\n // Pause button\n paint.setColor(Color.argb(125, 0, 0, 0));\n gameCanvas.drawRect(pauseRect, paint);\n paint.setTextSize((float) (screenX*0.0138));\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawText(\"PAUSE GAME\", pauseRect.left + (pauseRect.width()/10), pauseRect.bottom - (pauseRect.height()/3), paint);\n\n // Animations\n renderAnimations();\n\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(gameCanvas);\n }\n\n }\n }", "public void draw() {\n for (Point2D i : pointsSet)\n i.draw();\n }", "public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }", "public void render(Screen screen) {\n\t\tint x1 = screen.width;\n\t\tint y1 = screen.height;\n\t\tfor(int y = 0; y < y1; y++) {\n\t\t\tfor(int x = 0; x < x1; x++) {\n\t\t\t\tgetTile(x, y).render(x, y, screen);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < entities.size(); i++) {\n\t\t\tentities.get(i).render(screen);\n\t\t}\n\t\tfor(int i = 0; i < players.size(); i++) {\n\t\t\tplayers.get(i).render(screen);\n\t\t}\n\t}", "private void draw() {\n gsm.draw(g);\n }", "public void render(){\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Sets graphics in screen and clears them\n\t\tGraphics g = bs.getDrawGraphics();\n\t\tscreen.graphics(g);\n\t\tscreen.clear();\n\t\t\n\t\tGraphics2D graphics2d = (Graphics2D) g;\n\t\t\n\t\t//Adds antialiasing to text\n\t\tgraphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tmanager.render(screen);\n\t\t\n\t\tfor(int i = 0; i < WIDTH*HEIGHT; i++){\n\t\t\tpixels[i] = screen.getPixels()[i];\n\t\t}\n\t\tg.drawImage(image, 0, 0, getWidth(), getHeight(), null);\n\t\t\n\t\t//Draw text from string buffer\n\t\tfor(StringObject so : screen.stringBuffer){\n\t\t\tString s = so.string;\n\t\t\tg.setColor(so.color);\n\t\t\tg.setFont(so.font);\n\t\t\tg.drawString(s, so.xp, so.yp);\n\t\t}\n\t\tscreen.stringBuffer.clear();\n\t\t\n\t\t//Draws pause graphics\n\t\tif(screen.pause && manager.getState() == 2){\n\t\t\tg.setColor(new Color((0xcc00aa & 0xff0000) >> 16, (0xcc00aa & 0xff00) >> 8, (0xcc00aa & 0xff), 255));\n\t\t\tg.fillRect(0, 290, screen.getWidth(), 170);\n\t\t\tg.setColor(new Color((0x222222 & 0xff0000) >> 16, (0x222222 & 0xff00) >> 8, (0x222222 & 0xff), 255));\n\t\t\tg.fillRect(0, 300, screen.getWidth(), 150);\n\t\t\t\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.setFont(new Font(\"Audiowide\", Font.PLAIN, 90));\n\t\t\tg.drawString(\"PAUSED\", 330, 380);\n\t\t\tg.setFont(new Font(\"Audiowide\", Font.PLAIN, 30));\n\t\t\tg.drawString(\"Press Escape to Resume\", 340, 420);\n\t\t}\n\t\t\n\t\tg.dispose();\n\t\tbs.show();\n\t}", "private void render() {\n\t\tBufferStrategy bufferStrategy = getBufferStrategy(); //Create BufferStrategy object\n\n\t\t//If the Buffer Strategy doesn't exist, create one\n\t\tif(bufferStrategy == null) {\n\t\t\tcreateBufferStrategy(3); //Triple buffer\n\t\t\treturn; //Return\n\t\t}\n\n\t\tGraphics g = bufferStrategy.getDrawGraphics(); //Create Graphics object\n\t\tg.setColor(Color.black); //Set the colour of the object to black\n\t\tg.fillRect(0, 0, Game.WIDTH, Game.HEIGHT); //Fill the window\n\n\t\t//Start screen\n\t\tif(!startScreen.start && !player.dead && !player.win) {\n\t\t\tstartScreen.render(g); //Render the start screen\n\t\t\t//If the user presses enter\n\t\t\tif(enter) {\n\t\t\t\tstartScreen.start = true; //Game has started\n\t\t\t}\n\t\t}\n\n\t\t//Playing screen\n\t\tif(!player.dead && !player.win && startScreen.start) {\n\t\t\tlevel.render(g); //Render the level\n\t\t\tplayer.render(g); //Render the player to the graphics object\n\t\t\thp(g); //Render the hit points\n\t\t\tif(paused) {\n\t\t\t\tpauseScreen.render(g);\n\t\t\t}\n\t\t}\n\n\t\t//Dead screen\n\t\tif(player.dead){\n\t\t\tdeadScreen.render(g); //Render the dead screen\n\t\t}\n\n\t\t//Win screen\n\t\tif(player.win) {\n\t\t\twinScreen.render(g); //Render the win screen\n\t\t}\n\t\tg.dispose(); //Dispose of the object\n\t\tbufferStrategy.show(); //Show it\n\t}", "public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }", "public void draw() {\n //Grey background, which removes the tails of the moving elements\n background(0, 0, 0);\n //Running the update function in the environment class, updating the positions of stuff in environment\n //update function is a collection of the methods needing to be updated\n if(stateOfProgram == 0) { startTheProgram.update(); }\n if(stateOfProgram == 1) {\n theEnvironment.update();\n //update function is a collection of the methods needing to be updated\n //Running the update function in the Population class, updating the positions and states of the rabbits.\n entitiesOfRabbits.update();\n entitiesOfGrass.update();\n entitiesOfFoxes.update();\n\n entitiesOfRabbits.display();\n entitiesOfGrass.display();\n entitiesOfFoxes.display();\n openGraph.update();\n }\n }", "private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }", "public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }", "private void draw() {\n frames++;\n MainFrame.singleton().draw();\n }", "private void draw() {\n if (surfaceHolder.getSurface().isValid()) {\n //lock the canvas\n canvas = surfaceHolder.lockCanvas();\n //set background colour\n canvas.drawColor(Color.BLACK);\n //draw stars\n paint.setColor(Color.WHITE);\n starManager.draw(this.canvas, this.paint);\n //draw player\n player.draw(this.canvas, this.paint);\n //draw enemies\n enemyManager.draw(this.canvas, this.paint);\n //draw asteroids\n asteroidManager.draw(this.canvas, this.paint);\n\n //draw the score as well\n paint.setTextSize(100);\n paint.setColor(Color.WHITE);\n canvas.drawText(\"\" + Constants.SCORE, 50, paint.descent() - paint.ascent(), paint);\n\n //if game is over\n if (Constants.GAME_OVER) {\n paint.setTextSize(100);\n paint.setTextAlign(Paint.Align.CENTER);\n paint.setColor(Color.WHITE);\n\n //tell the player\n int yPos = (int) ((canvas.getHeight() / 2) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Game over\", canvas.getWidth() / 2, yPos, paint);\n\n paint.setTextSize(50);\n yPos = (int) ((canvas.getHeight() - 2 * paint.descent()) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Tap anywhere to return to main menu...\", canvas.getWidth() / 2, yPos, paint);\n }\n //unlock canvas\n surfaceHolder.unlockCanvasAndPost(canvas);\n }\n }", "public void draw() {\n\t //FrameRate should only 5 when there is no activity. Otherwise, 60\n if (!EventQueue.getInstance().isTiccing() && System.currentTimeMillis() - lastActive >= 300) {\n noLoop();\n setFrameRate(5);\n println(\"no draw activity\");\n } else{\n \t setFrameRate(60);\n }\n background(255);\n //Process menu data at the beginning\n // Menu menuSing = Menu.getInstance();\n // if ((boolean) menuSing.getControllerValue(\"Button0\")) {\n // KeyMap.getInstance().run('q');\n // }\n\n pushMatrix();\n //Enable scrolling\n translate(0, verticalScroll);\n StringManager.getInstance().draw();\n\n popMatrix();\n\n //if (frameCount % 10 == 0)System.out.println(frameRate);\n\n //Draw menu after\n Menu.getInstance().draw();\n }", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void render() {\r\n\t\t //Draw all of the sprites in the game\r\n\t background.draw(0,backgroudY1);\r\n\t\tbackground.draw(0,backgroudY2);\r\n\t\tbackground.draw(0,backgroudY3);\r\n\t\tbackground.draw(WIDTH/2,backgroudY1);\r\n\t\tbackground.draw(WIDTH/2,backgroudY2);\r\n\t background.draw(WIDTH/2,backgroudY3);\r\n\t \r\n\t // call this method from Player class, to draw the plane.\r\n\t player.render();\r\n\t \r\n\t \r\n\t // loop through every enemy, draw enemy if it's not killed\r\n\t for(int i=0; i<enemy.length; i++) {\r\n\t \t\r\n \tif(enemy[i] != null && enemyKilled[i] == true) {\r\n \t\t\r\n\t \t\t\r\n\t enemy[i].render();\r\n\t \r\n\t \t}\r\n\t \r\n\t }\r\n\t // loop through every laser, if it has not made contact with any enemy,\r\n\t // call its render method to draw it\r\n\t for (int i = 0; i < arr_size; i++) {\r\n\t \tif (lasers[i] != null && laserUsed[i] == true) {\r\n\t lasers[i].render();\r\n \t}\r\n\t \t\r\n\t }\r\n\t \r\n\t}", "public void paint() {\n BufferStrategy bs;\n bs = this.getBufferStrategy();\n\n Graphics g = bs.getDrawGraphics();\n g.drawImage(background, 0, 0, this.getWidth(), this.getHeight(), null);\n if (this.blackHoles != null) {\n for (BlackHole blackHole : this.blackHoles) {\n blackHole.paint(g);\n }\n }\n if (this.balls != null) {\n for (int i = 0; i <this.balls.size() ; i++) {\n this.balls.get(i).paint(g);\n }\n\n }\n\n bs.show();\n g.dispose();\n\n }", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}", "private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n } else {\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n g.setColor(Color.white);\n g.drawLine(0, 500, 595, 500);\n player.render(g);\n for (int i = 0; i < aliens.size(); i++) {\n Alien al = aliens.get(i);\n al.render(g);\n }\n if (shotVisible) {\n shot.render(g);\n }\n\n if(gameOver==false)\n {\n gameOver();\n }\n for(Alien alien: aliens){\n Bomb b = alien.getBomb();\n b.render(g);\n }\n g.setColor(Color.red);\n Font small = new Font(\"Helvetica\", Font.BOLD, 20);\n g.setFont(small);\n g.drawString(\"G - Guardar\", 10, 50);\n g.drawString(\"C - Cargar\", 10, 70);\n g.drawString(\"P - Pausa\", 10, 90);\n\n if(keyManager.pause)\n {\n g.drawString(\"PAUSA\", 250, 300);\n }\n \n bs.show();\n g.dispose();\n }\n\n }", "public void draw(Graphics w) {\n\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].draw(w);\n\t\t\t}\n\t\t}\n\t\tif (lost) {\n\t\t\tw.drawString(\"YOU LOST\", 100, 200);\n\t\t\tw.drawString(\"Press R key to start again!\", 100, 400);\n\t\t} else if (isFinished) {\n\t\t\tw.drawString(\"YOU WIN.\", 100, 200);\n\t\t}\n\n\t}", "public void draw() {\n\t\tfor (Link link : links)\n\t\t\tlink.draw();\n\t}", "@Override\n public void drawScreen(int n, int n2) {\n void mouseY;\n void mouseX;\n super.drawScreen((int)mouseX, (int)mouseY);\n float[] hsb = Color.RGBtoHSB(this.setting.getValue().getRed(), this.setting.getValue().getGreen(), this.setting.getValue().getBlue(), null);\n Color color = Color.getHSBColor(hsb[0], Float.intBitsToFloat(Float.floatToIntBits(6.4887953f) ^ 0x7F4FA436), Float.intBitsToFloat(Float.floatToIntBits(4.629535f) ^ 0x7F142527));\n Gui.drawRect((int)this.getX(), (int)this.getY(), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 14), (int)new Color(40, 40, 40).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 2), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 12), (int)this.setting.getValue().getRGB());\n RenderUtils.drawOutline(this.getX() + this.getWidth() - 12, this.getY() + 2, this.getX() + this.getWidth() - 2, this.getY() + 12, Float.intBitsToFloat(Float.floatToIntBits(2.7144578f) ^ 0x7F2DB9AD), new Color(20, 20, 20).getRGB());\n if (this.open) {\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 14), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 28), (int)new Color(40, 40, 40).getRGB());\n float i = Float.intBitsToFloat(Float.floatToIntBits(1.3378998E38f) ^ 0x7EC94E07);\n while (i + Float.intBitsToFloat(Float.floatToIntBits(13.8331995f) ^ 0x7EDD54C9) < Float.intBitsToFloat(Float.floatToIntBits(0.07128618f) ^ 0x7F51FE7D)) {\n RenderUtils.drawRecta((float)(this.getX() + 2) + i, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(7.249331f) ^ 0x7F67FA85), Float.intBitsToFloat(Float.floatToIntBits(1.7045807f) ^ 0x7EEA2FB3), Color.getHSBColor(i / Float.intBitsToFloat(Float.floatToIntBits(0.115068644f) ^ 0x7F2BA91C), Float.intBitsToFloat(Float.floatToIntBits(4.3161592f) ^ 0x7F0A1DFA), Float.intBitsToFloat(Float.floatToIntBits(21.075346f) ^ 0x7E289A4F)).getRGB());\n i += Float.intBitsToFloat(Float.floatToIntBits(3.807338f) ^ 0x7E95CD0B);\n }\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 16, this.getX() + 2 + this.getWidth() - 4, this.getY() + 27, Float.intBitsToFloat(Float.floatToIntBits(2.7503529f) ^ 0x7F3005C8), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.hueWidth, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(5.200255f) ^ 0x7F26687D), Float.intBitsToFloat(Float.floatToIntBits(1.2665411f) ^ 0x7E921E05), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 28), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 42), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 29, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.19645536f) ^ 0x7F792B98), new Color(255, 255, 255), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 29, this.getX() + 2 + this.getWidth() - 4, this.getY() + 40, Float.intBitsToFloat(Float.floatToIntBits(103.69628f) ^ 0x7DCF647F), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.satWidth, this.getY() + 29, Float.intBitsToFloat(Float.floatToIntBits(7.3489017f) ^ 0x7F6B2A34), Float.intBitsToFloat(Float.floatToIntBits(0.1948352f) ^ 0x7F7782E1), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 42), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 56), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 42, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(1.5246161f) ^ 0x7EF3269F), new Color(0, 0, 0), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 42, this.getX() + 2 + this.getWidth() - 4, this.getY() + 53, Float.intBitsToFloat(Float.floatToIntBits(3.7803736f) ^ 0x7F71F1A4), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.briWidth, this.getY() + 42, Float.intBitsToFloat(Float.floatToIntBits(8.346171f) ^ 0x7E8589EB), Float.intBitsToFloat(Float.floatToIntBits(0.08925866f) ^ 0x7C86CD3F), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 56), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 70), (int)new Color(40, 40, 40).getRGB());\n this.renderAlphaBG(this.getX() + 2, this.getY() + 55, this.alphaBG);\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 55, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.13166903f) ^ 0x7F36D43F), new Color(0, 0, 0), color, 0, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 55, this.getX() + 2 + this.getWidth() - 4, this.getY() + 66, Float.intBitsToFloat(Float.floatToIntBits(19.69502f) ^ 0x7E9D8F67), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.alphaWidth, this.getY() + 55, Float.intBitsToFloat(Float.floatToIntBits(6.702013f) ^ 0x7F5676E4), Float.intBitsToFloat(Float.floatToIntBits(0.13652846f) ^ 0x7F3BCE1E), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 70), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 84), (int)new Color(40, 40, 40).getRGB());\n Europa.FONT_MANAGER.drawString(\"Rainbow\", this.getX() + 3, (float)(this.getY() + 78) - Europa.FONT_MANAGER.getHeight() / Float.intBitsToFloat(Float.floatToIntBits(0.8730777f) ^ 0x7F5F8205), Color.WHITE);\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 72), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 82), (int)new Color(30, 30, 30).getRGB());\n if (this.setting.getRainbow().booleanValue()) {\n RenderUtils.prepareGL();\n GL11.glShadeModel((int)7425);\n GL11.glEnable((int)2848);\n GL11.glLineWidth((float)Float.intBitsToFloat(Float.floatToIntBits(0.2713932f) ^ 0x7EAAF40D));\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015137452f) ^ 0x7F070313)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(1.1948546f) ^ 0x7CE7F0FF)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.36357376f) ^ 0x7DC52657)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015521388f) ^ 0x7F014D6B)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.01025841f) ^ 0x7F5712E4)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.10675689f) ^ 0x7EA5A35B)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8 + 4), (double)(this.getY() + 74));\n GL11.glEnd();\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.009417259f) ^ 0x7F654AD9)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.07014828f) ^ 0x7EF0A9E7)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.013465701f) ^ 0x7F239F3E)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.0155056f) ^ 0x7F010B33)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.011914493f) ^ 0x7F3C3501)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.012230922f) ^ 0x7F376434)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 10), (double)(this.getY() + 77));\n GL11.glEnd();\n RenderUtils.releaseGL();\n }\n }\n Gui.drawRect((int)(this.getX() - 1), (int)this.getY(), (int)this.getX(), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth()), (int)this.getY(), (int)(this.getX() + this.getWidth() + 1), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Europa.FONT_MANAGER.drawString(this.setting.getName(), this.getX() + 3, this.getY() + 3, Color.WHITE);\n }", "public void render() {\n int pixel = getPixelSize();\n for (int xx = x; xx<x+w; xx += pixel) {\n for (int yy = y; yy<y+h; yy += pixel) {\n Location next = getLocation(xx, yy);\n if (next != null) { // This way if a wall is spawned at the edge it's ok\n next.setColor(color(255,255,255));\n next.setType(LocationType.WALL);\n getGridCache().add(next);\n }\n }\n }\n }", "@Override\n\tpublic void paint(Graphics g) {\n\t\tg.setColor(getBackground());\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t// Draw each of the DrawSurfaces in the correct order.\n\t\tfor (Object element : aiDrawingOrder) {\n\t\t\tpaint(g, element);\n\t\t}\n\t}", "public void drawScreen(int par1, int par2, float par3)\n {\n drawRect(2, height - 14, width - 2, height - 2, 0x80000000);\n field_50064_a.drawTextBox();\n super.drawScreen(par1, par2, par3);\n }", "public void paintComponent(Graphics g){\n super.paintComponent(g);\n for(int i = 0; i < count; i++){\n drawObjects[i].draw(g);\n } \n }", "protected abstract void draw();", "public void draw() {\n\t\t/* Clear Screen */\n\t\tGdx.graphics.getGL20().glClearColor(1,1,1,0);\n\t\tGdx.graphics.getGL20().glClear( GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT );\n\n\t\t/* Iterate through draw list */\n\t\tIterator<ArrayList<Drawable>> iter = this.drawlist.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tArrayList<Drawable> layer = iter.next();\n\t\t\t/* Sort the layer. */\n\t\t\tCollections.sort(layer, new DrawableComparator());\n\t\t\t/* Iterate through the layer. */\n\t\t\tIterator<Drawable> jter = layer.iterator();\n\t\t\twhile(jter.hasNext()) {\n\t\t\t\tDrawable drawable = jter.next();\n\t\t\t\tif (drawable.isDead()) {\n\t\t\t\t\tjter.remove(); //Remove if dead.\n\t\t\t\t}//fi\n\t\t\t\telse {\n\t\t\t\t\tdrawable.draw(this, this.scalar); //Draw the drawable.\n\t\t\t\t}//else\n\t\t\t}//elihw\n\t\t}//elihw\n\t}", "public void draw() {\n draw(clientController.getUser().getShows());\n }", "@SuppressLint(\"MissingSuperCall\")\n @Override\n public void draw(Canvas canvas) {\n final float scaleX = getWidth() / (WIDTH * 1.f); //set scale factor of bg image and screen area\n final float scaleY = getHeight() / (HEIGHT * 1.f);\n if (canvas != null) {\n final int savedState = canvas.save();\n canvas.scale(scaleX, scaleY); //scale bg\n //draw order means that demons walk over gargants, demon shots go over all ground troops and under dragon.\n //also means dragons fly over all enemies cus, ya know, they fly\n bg.draw(canvas); //draw bg\n player.draw(canvas); //draw player\n for (LightningBall b : bullets) {\n b.draw(canvas); //draw each player bullet\n }\n for (Gargant g : gargants) {\n g.draw(canvas); //draw each gargant\n }\n for (Demon de : demons) {\n de.draw(canvas); //draw each demon\n }\n for (HellFire ds : demonShots) {\n ds.draw(canvas); //draw each demon shot\n }\n for (Dragon d : dragons) {\n d.draw(canvas); //draw each dragon\n }\n\n drawText(canvas); //draw the text on screen\n canvas.restoreToCount(savedState);\n }\n }", "public void draw() {\n if (!myTurn()) {\n return;\n }\n draw(4 - handPile.size());\n }", "public void draw() {\n \n }", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void draw() {\n draw(root, false);\n }", "public void drawSelf() {\n for (Point p : matches) {\n this.drawPoint(p, Color.WHITE);\n }\n }", "public void render(int x, int y, Screen screen) {\n }", "public void drawScreen(int var1, int var2, float var3) {\r\n\t\tthis.drawDefaultBackground();\r\n\t\tthis.guiLeft = (this.width - this.xSize) / 2;\r\n\t\tthis.guiTop = (this.height - this.ySize) / 2;\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glTranslatef(this.guiLeft, this.guiTop, 0.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(this.mc.renderEngine\r\n\t\t\t\t.getTexture(\"/gui/elevatorgui.png\"));\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.drawTexturedModalRect(0, 0, 0, 0, this.xSize, this.ySize);\r\n\t\tGL11.glTranslatef(0.0F, 0.0F, 0.0F);\r\n\t\tGL11.glPopMatrix();\r\n\t\tsuper.drawScreen(var1, var2, var3);\r\n\r\n\t\tif (!this.optionsOpen) {\r\n\t\t\tif (!this.screenTitle.equals(\"\")) {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer,\r\n\t\t\t\t\t\tthis.screenTitle, this.width / 2, this.titleTop, 0);\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer, \"\"\r\n\t\t\t\t\t\t+ this.screenSubtitle + \"\", this.width / 2,\r\n\t\t\t\t\t\tthis.subtitleTop, 0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer, \"\"\r\n\t\t\t\t\t\t+ this.screenSubtitle + \"\", this.width / 2,\r\n\t\t\t\t\t\tthis.titleTop, 0);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this.screenTitle != null && !this.screenTitle.equals(\"\")) {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer,\r\n\t\t\t\t\t\tthis.screenTitle, this.width / 2 - 20,\r\n\t\t\t\t\t\tthis.subtitleTop, 0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer,\r\n\t\t\t\t\t\t\"[Unnamed Elevator]\", this.width / 2, this.subtitleTop,\r\n\t\t\t\t\t\t0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer, \"Options\",\r\n\t\t\t\t\tthis.width / 2, this.titleTop, 0);\r\n\t\t\tthis.floorNamesList.drawScreen(var1, var2, var3);\r\n\t\t}\r\n\t}", "public synchronized void draw()\n\t{\n\t\t// First update the lighting of the world\n\t\t//int x = avatar.getX();\n\t\t//int y = avatar.getY();\t\t\n\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].draw(x, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = monsters.size() - 1; i >=0; i--)\n\t\t{\n\t\t\tMonster monster = monsters.get(i);\n\t\t\tint x = monster.getX();\n\t\t\tint y = monster.getY();\n\t\t\t\n\t\t\t// Check if the monster has been killed\n\t\t\tif (monster.getHitPoints() <= 0)\n\t\t\t{\n\t\t\t\tmonsters.remove(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (tiles[x][y].getLit())\n\t\t\t\t\tmonster.draw();\n\t\t\t}\n\t\t}\t\t\n\t\tavatar.draw();\n\t}", "public void display_game_screen() {\n\n myScreen.screenMode = myScreen.DISPLAY_GAME_SCREEN;\n\n pushMatrix();\n\n calc_screen_translation();\n\n imageMode(CORNER);\n image(backgroundImage, 0, 0);\n\n // draw_grid();\n\n draw_game_assets();\n\n pacman.update(isPacmanUp, isPacmanDown, isPacmanLeft, isPacmanRight);\n ghost.update(isGhostUp, isGhostDown, isGhostLeft, isGhostRight);\n\n pacman.display();\n ghost.display();\n\n score.run(pacman.xTile, pacman.yTile, ghost.xTile, ghost.yTile);\n\n popMatrix();\n }", "private void draw() {\n\t\tCanvas c = null;\n\t\ttry {\n\t\t\t// NOTE: in the LunarLander they don't have any synchronization here,\n\t\t\t// so I guess this is OK. It will return null if the holder is not ready\n\t\t\tc = mHolder.lockCanvas();\n\t\t\t\n\t\t\t// TODO this needs to synchronize on something\n\t\t\tif (c != null) {\n\t\t\t\tdoDraw(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (c != null) {\n\t\t\t\tmHolder.unlockCanvasAndPost(c);\n\t\t\t}\n\t\t}\n\t}", "public void render(Screen screen) {\n\t\tscreen.renderInterface(x, y, width, height, button, clicked); //renders all 4 pieces of the 32x32 sprite. Modifying the x or y will change where the screen is centered.\n\t}", "public void draw() {\n }", "public void render() {\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null) { //if the buffer strategy doesnt get created, then you create it\n\t\t\tcreateBufferStrategy(3); //the number 3 means it creates triple buffering\n\t\t\treturn;\t\t\t\t\t//, so when you backup frame gets displayed (2) it will also have a backup\t\n\t\t}\n\t\t\n\t\t//apply data to the buffer \"bs\"\n\t\t//this is creating a link to graphics to drawing graphics to the screen.\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t/**\n\t\t * You input all of your graphics inbetween the g object and g.dispose();\n\t\t */\n\t\t//###################\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\n\t\t//###################\n\t\tg.dispose(); //this dispose of all the graphics\n\t\tbs.show(); //this will make the next available buffer visible\n\t}", "private void drawWalls(){\n for(int i = 0 ; i < wallsArrayList.size(); i++){\n wallsArrayList.get(i).drawImage(buffer);\n }\n\n }", "public void draw() {\n draw(root, true);\n }", "private void draw() {\n\t\tgsm.draw(g);\n\t\tg.setColor(Color.WHITE);\n\t\tif (fps < 25)\n\t\t\tg.setColor(Color.RED);\n\t\tg.drawString(\"FPS: \" + fps, 10, 15);\n\t}", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "public void draw() {\n\n // Make sure our drawing surface is valid or we crash\n if (ourHolder.getSurface().isValid()) {\n // Lock the canvas ready to draw\n canvas = ourHolder.lockCanvas();\n // Draw the background color\n paint.setTypeface(tf);\n canvas.drawColor(Color.rgb(178,223,219));\n paint.setColor(Color.rgb(255,255,255));\n canvas.drawRect(offsetX, offsetY, width-offsetX, (height-100)-offsetY, paint);\n // Choose the brush color for drawing\n paint.setColor(Color.argb(50,0,0,0));\n paint.setFlags(Paint.ANTI_ALIAS_FLAG);\n // Make the text a bit bigger\n paint.setTextSize(40);\n paint.setStrokeWidth(5);\n paint.setStrokeCap(Paint.Cap.ROUND);\n // Display the current fps on the screen\n canvas.drawText(\"FPS:\" + fps, 20, 40, paint);\n paint.setTextSize(400);\n if(hasTouched == true) {\n if (count < 0) {\n canvas.drawText(0 + \"\", (width / 2) - 100, height / 2, paint);\n } else if(count<=numLines) {\n canvas.drawText(count + \"\", (width / 2) - 100, height / 2, paint);\n }\n } else {\n paint.setTextSize(100);\n canvas.drawText(\"TAP TO START\", (width / 2) - 300, height / 2, paint);\n }\n paint.setColor(Color.rgb(0,150,136));\n\n paint.setColor(color);\n\n canvas.drawCircle(xPosition, yPosition, radius, paint);\n\n paint.setColor(lineColor);\n\n if(isMoving==true && hasHit == false && count>=0) {\n canvas.drawLine(initialX, initialY, endX, endY, paint);\n }\n paint.setColor(Color.rgb(103,58,183));\n\n for(int i=0; i<verts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, verts[0].length, verts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n for (int i=0; i<innerVerts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, innerVerts[0].length, innerVerts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(canvas);\n\n //Display size and width\n\n }\n\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "public void render(){\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.screen.renderBackground();\n\t\t\n\t\t\n\t\tfor(int i=0;i<this.obstacles.size();i++){\n\t\t\tobstacles.get(i).render(screen);\n\t\t}\n\t\t\n\t\tthis.screen.renderGround();\n\t\t\n\t\t\n\t\tthis.bird.render(screen);\n\n\t\tscreen.renderLeftLim();\n\t\t\n\t\tfor(int i= 0;i<this.pixels.length;i++){\n\t\t\tthis.pixels[i] = this.screen.getPixel(i);\n\t\t}\n\t\n\n\t\t\n\t\tGraphics g = bs.getDrawGraphics();\n\t\tg.drawImage(image,0,0,getWidth(),getHeight(),null);\n\t\tg.setColor(Color.WHITE);\n\t\tg.setFont(new Font(\"Verdana\",0,30));\n\t\tg.drawString(\"\"+this.numGoals, 300, 60);\n\t\tif(this.gameOver){\n\t\t\tif(this.begin){\n\t\t\t\tg.setFont(new Font(\"Verdana\",0,50));\n\t\t\t\tg.drawString(GAMEOVER_MESSAGE, (WIDTH-300)/2, 200);\n\t\t\t\t\n\t\t\t\tg.setFont(new Font(\"Verdana\",0,20));\n\t\t\t\tg.drawString(\"press down key to restart\", (WIDTH-250)/2, 300);\n\t\t\t\tg.drawString(\"Best score:\"+this.bestScore, (WIDTH-135)/2, 350);\n\t\t\t}else{\n\t\t\t\tg.setFont(new Font(\"Verdana\",0,50));\n\t\t\t\tg.drawString(\"OPEN BIRD\", (WIDTH-270)/2, 200);\n\t\t\t\t\n\t\t\t\tg.setFont(new Font(\"Verdana\",0,20));\n\t\t\t\tg.drawString(\"press down key to start\", (WIDTH-250)/2, 300);\n\t\t\t}\n\t\t}\n\t\tg.dispose();\n\t\tbs.show();\n\t}", "private void drawScreen(Sprite spr) {\n\t\tTexture tex = spr.getTexture();\n\t\t\n\t\ttex.bind();\n\t\t\n\t\tglBegin(GL_QUADS);\n\t\t{\n\t\t\tglTexCoord2f(0, tex.getHeight());\n\t\t\tglVertex2f(0, spr.getHeight());\n\t\t\tglTexCoord2f(tex.getWidth(), tex.getHeight());\n\t\t\tglVertex2f(spr.getWidth(), spr.getHeight());\n\t\t\tglTexCoord2f(tex.getWidth(), 0);\n\t\t\tglVertex2f(spr.getWidth(), 0);\n\t\t\tglTexCoord2f(0, 0);\n\t\t\tglVertex2f(0, 0);\n\t\t}\n\t\tglEnd();\n\t}", "public void draw(Graphics2D g2)\n {\n Rectangle r1 = new Rectangle( xTopLeft, yTopLeft, screenWidth, screenHeight);\n \n Rectangle l1 = new Rectangle( xTopLeft + (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l2 = new Rectangle( xTopLeft + 3 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l3 = new Rectangle( xTopLeft + 5 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l4 = new Rectangle( xTopLeft + 7 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l5 = new Rectangle( xTopLeft + 9 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l6 = new Rectangle( xTopLeft + 11 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l7 = new Rectangle( xTopLeft + 13 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l8 = new Rectangle( xTopLeft + 15 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n Rectangle l9 = new Rectangle( xTopLeft + 17 * (screenWidth/19), yTopLeft + (screenHeight/2), (screenWidth/19), (screenHeight/10));\n \n g2.setColor(Color.BLACK);\n \n g2.draw(r1);\n g2.fill(r1);\n \n g2.setColor(Color.YELLOW);\n \n g2.draw(l1);\n g2.fill(l1);\n g2.draw(l2);\n g2.fill(l2);\n g2.draw(l3);\n g2.fill(l3);\n g2.draw(l3);\n g2.fill(l3);\n g2.draw(l4);\n g2.fill(l4);\n g2.draw(l5);\n g2.fill(l5);\n g2.draw(l6);\n g2.fill(l6);\n g2.draw(l7);\n g2.fill(l7);\n g2.draw(l8);\n g2.fill(l8);\n g2.draw(l9);\n g2.fill(l9);\n }", "public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final void draw2D()\n {\n if ( GameLevel.current() != null )\n {\n //draw player's wearpon or gadget\n GameLevel.currentPlayer().drawWearponOrGadget();\n }\n\n //draw avatar message ( if active )\n AvatarMessage.drawMessage();\n\n //draw all hud messages\n HUDMessage.drawAllMessages();\n\n //draw fullscreen hud effects\n HUDFx.drawHUDEffects();\n\n //draw frames per second last\n Fps.draw();\n\n //draw ammo if the wearpon uses ammo\n if ( GameLevel.currentPlayer().showAmmoInHUD() )\n {\n drawAmmo();\n }\n\n //draw health\n drawHealth();\n\n //draw debug logs\n //Level.currentPlayer().drawDebugLog( g );\n }", "public void draw(Canvas canvas) {\n // Draw the game\n for (int i = 0; i < width + 2; i++) {\n for (int j = 0; j < height + 2; j++) {\n canvas.setPoint(i, j, '.');\n }\n }\n\n for (int i = 0; i < width + 2; i++) {\n canvas.setPoint(i, 0, '-');\n canvas.setPoint(i, height + 1, '-');\n }\n\n for (int i = 0; i < height + 2; i++) {\n canvas.setPoint(0, i, '|');\n canvas.setPoint(width + 1, i, '|');\n }\n\n for (BaseObject object : getAllItems()) {\n object.draw(canvas);\n }\n }", "public abstract WorldImage drawBoard(int blocks);", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void drawScreen(int par1, int par2, float par3)\n {\n\t\tGL11.glClearColor(0.1f, 0.1f, 0.1f, 1.0f);\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n Tessellator var4 = Tessellator.instance;\n short var5 = 274;\n int var6 = (int)((float)(this.width / 2 - var5 / 2) * 1.2f);\n byte var7 = 30;\n GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(\"/title/emberlogo.png\"));\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n\t\tthis.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 155, 44);\n\t\tthis.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);\n\n String emberTag = \"Ember 0.1.2\";\n String var9 = \"Minecraft 1.4.5\";\n\n this.drawString(this.fontRenderer, var9, 2, this.height - 10, 16777215);\n this.drawString(this.fontRenderer, emberTag, 2, this.height - 20, 16777215);\n String var10 = \"Minecraft is a copyright of Mojang AB.\";\n this.drawString(this.fontRenderer, var10, this.width - this.fontRenderer.getStringWidth(var10) - 2, this.height - 10, 16777215);\n super.drawScreen(par1, par2, par3);\n }", "public void draw();", "public void draw();", "public void draw();", "@Override\n protected void onDraw(Canvas canvas) {\n // draw background screen\n canvas.drawBitmap(mBitmap, 0, 0, mPaintScreen);\n\n // draw line for each path\n for( Integer key : pathMap.keySet() ){\n canvas.drawPath(pathMap.get(key), mPaintLine);\n }\n }", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(.01);\n for (Point2D p : s) {\n p.draw();\n }\n }", "public void renderAll() {\n GameObjectManager.instance.renderAll(graphics);\n this.repaint();\n }", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "public void draw(){\n }", "public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }", "private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }", "protected void drawGUI() {\n batch.draw(background, 0, 0);\n }", "private void render() {\n final int numBuffers = 3;\n BufferStrategy bs = this.getBufferStrategy(); // starts value at null\n if (bs == null) {\n this.createBufferStrategy(numBuffers); // 3: buffer creations\n return;\n }\n Graphics g = bs.getDrawGraphics();\n\n g.setColor(Color.black); // stops flashing background\n g.fillRect(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);\n\n handler.render(g);\n\n if (gameStart == GAME_STATE.Game) {\n hud.render(g);\n } else if (gameStart == GAME_STATE.Menu || gameStart == GAME_STATE.Help || gameStart == GAME_STATE.GameOver || gameStart == GAME_STATE.GameVictory) {\n menu.render(g);\n }\n\n g.dispose();\n bs.show();\n }", "public void draw(Graphics window);" ]
[ "0.7413693", "0.71952975", "0.7158789", "0.7103618", "0.70325553", "0.7029127", "0.69631416", "0.6936109", "0.6935637", "0.69228214", "0.69200265", "0.6894201", "0.6887507", "0.686291", "0.68437195", "0.68081397", "0.6789361", "0.67625594", "0.6762502", "0.6759294", "0.673351", "0.67094374", "0.6695445", "0.66538316", "0.663824", "0.6632539", "0.66199094", "0.6617556", "0.6613957", "0.66090626", "0.65898335", "0.658731", "0.658204", "0.6564724", "0.65567833", "0.6540157", "0.65393126", "0.6537444", "0.6535397", "0.653461", "0.6533842", "0.6527242", "0.6523149", "0.6520554", "0.65091634", "0.65079343", "0.650793", "0.64977986", "0.6488678", "0.6485888", "0.6478017", "0.6454184", "0.6450892", "0.64378786", "0.64321595", "0.6431814", "0.6426098", "0.6415606", "0.6406829", "0.64038515", "0.6401955", "0.6398871", "0.63973325", "0.63942045", "0.6393209", "0.6387513", "0.63856685", "0.6385446", "0.63852054", "0.63827026", "0.63809365", "0.6361443", "0.6354705", "0.6345934", "0.63259435", "0.6321459", "0.63170934", "0.63145894", "0.6312736", "0.6312588", "0.6310359", "0.63075906", "0.6303379", "0.63012254", "0.6296387", "0.62943757", "0.6293745", "0.6293745", "0.6293745", "0.62933004", "0.6292266", "0.6291454", "0.62914425", "0.62914425", "0.62914425", "0.62779105", "0.6275505", "0.62729746", "0.62694854", "0.62670726", "0.62627363" ]
0.0
-1
Method that notifies the screen that it is being switched away from/to.
public void notifySwitchAway() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void screenOffBroadcast() {\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n mDoScreenOff = true;\n }\n // prize add v8.0 by zhaojian 20171102 end\n\n Intent intent = new Intent(\"prize.set.keyguard.state\");\n intent.putExtra(\"hide\",false);\n intent.putExtra(\"sleep\",true);\n getContext().sendBroadcast(intent);\n flags = false;\n // prize add v8.0 by zhaojian 20171102 start\n beforeIsLock = false;\n // prize add v8.0 by zhaojian 20171102 end\n\n handler.removeMessages(1);\n\n // prize add v8.0 by zhaojian 2017912 start\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n mIsAutoEnterReceiveUi = false;\n }\n // prize add v8.0 by zhaojian 2017912 end\n Log.d(TAG,\"screen off\");\n }", "private void handleScreenTurnedOff() {\n DejankUtils.startDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n Assert.isMainThread();\n this.mHardwareFingerprintUnavailableRetryCount = 0;\n this.mHardwareFaceUnavailableRetryCount = 0;\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onScreenTurnedOff();\n }\n }\n DejankUtils.stopDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n }", "public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}", "private void goAway() {\n CollaborationConnection connection = CollaborationConnection\n .getConnection();\n Presence presence = connection.getPresence();\n if (presence.getMode().equals(Mode.available)) {\n previousPresence = presence;\n Presence newPresence = new Presence(presence.getType(),\n presence.getStatus(), presence.getPriority(), Mode.away);\n Tools.copyProperties(presence, newPresence);\n timerSetAway = sendPresence(connection, newPresence);\n }\n }", "public void goneOffline()\n\t{\n\t\tgetMainWindow().displayOfflineSymbol();\n\t\tmainWindow.displayMessage(Resources.getString(\"msg_disconnected\"));\n\t\tcloseAllRoomWindows();\n\t}", "public void unsubscribeSwitchState() {\n\t\t\n\t}", "@Override\n protected final void onDisconnected() {\n mPilotingItf.cancelSettingsRollbacks()\n .resetLocation()\n .updateCurrentTarget(ReturnHomePilotingItf.Target.TAKE_OFF_POSITION)\n .updateGpsFixedOnTakeOff(false);\n if (!isPersisted()) {\n mPilotingItf.unpublish();\n }\n super.onDisconnected();\n }", "public void windowDeiconified(WindowEvent arg0) {\n //textArea1.append(\"Window is in normal state\");\n\n }", "private void switchToEndScreen() {\n\t\tprogram.removeAll();\n\t\tprogram.add(endScreen);\n\t\tAudioPlayer.getInstance().playSound(\"sounds\", \"HyperSpaceSound.mp3\");\n\t}", "public void showAway();", "public void deActivated() \r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tpublic void msgTurnOff() {\n\t\t\n\t}", "@Override\n public final void onGuiClosed() {\n\t\tKeyboard.enableRepeatEvents(false);\n\t\t\n\t\tif(behindScreen != null) {\n\t\t\tTaleCraft.proxy.asClient().sheduleClientTickTask(new Runnable() {\n\t\t\t\t@Override public void run() {\n\t\t\t\t\tmc.displayGuiScreen(behindScreen);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n }", "@Override\n public void windowDeactivated( WindowEvent arg0 )\n {\n\n }", "@Override\n public void windowDeactivated( WindowEvent arg0 )\n {\n\n }", "protected void goAway() {\n\t\tthis.setVisible(false);\n\t\tthis.setBounds(-800, -800, mWidth, mHeight);\n\t}", "private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }", "public void didIWinOrLose() {\n\n\t}", "public void hideScreen() {\n\t}", "@Override\n\tpublic void onHide (ScreenState mode) {\n\n\t}", "@Override\n\tpublic void onHide (ScreenState mode) {\n\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\n public void windowDeactivated(WindowEvent we) {\n }", "public void flightDisappear();", "public void onDeviceDisconnected() {\n btButton.setText(\"Disconnnected\");\n }", "@Override\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\n\t}", "public void msgAtHome() {\n\t\tatHome.release();\n\t\tstateChanged();\n\t}", "void onDisconnected();", "@Override\n\tpublic void windowDeactivated(WindowEvent arg0)\n\t{\n\t\t\n\t}", "@Override\n\tpublic void windowDeactivated(WindowEvent arg0)\n\t{\n\t}", "public void onStateLeft();", "@Override\n\t\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "public void interactWhenLeaving() {\r\n\t\t\r\n\t}", "public void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\r\n\t\tif (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {\r\n\t\t\tthis.mc.thePlayer.closeScreen();\r\n\t\t}\r\n\t}", "public void toBack() {\n WindowPeer peer = (WindowPeer) this.peer;\n if (peer != null) {\n peer.toBack();\n }\n }", "@Override\n public void windowDeactivated(WindowEvent arg0) {\n\n }", "@Override\n public void windowDeiconified( WindowEvent arg0 )\n {\n\n }", "@Override\n public void windowDeiconified( WindowEvent arg0 )\n {\n\n }", "@Override\r\n public void windowDeactivated(WindowEvent e) {\n }", "public void backToMenu() {\n\t\tcurrentGameGraphics.setVisible(false);\n\t\tcurrentGameGraphics = null;\n\t\tgameScreen.setVisible(true);\n\t}", "public void onTurnOver() {}", "public void windowDeactivated(WindowEvent event)\n {\n\n }", "@Override\n public void windowDeactivated(WindowEvent e)\n {\n\n }", "public void onDisconnected() {\n\t\t\r\n\t}", "@Override\r\n public void windowDeactivated(WindowEvent e) {\r\n\r\n }", "@Override\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void onDeactivation() { }", "@Override\n\tpublic void windowDeactivated(WindowEvent arg0) {\n\n\t}", "private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeactivated(WindowEvent e) {\n\t\t\r\n\t}", "public void windowDeactivated(WindowEvent arg0) {\n //textArea1.append(\"Window is NOT active\");\n\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "@Override\n public void windowDeactivated(WindowEvent e) {\n }", "public void windowDeactivated(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void onMachineDeactivated()\n {\n \n }", "@Override\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\n\n\t\t\t}", "@Override\n\tpublic void windowDeactivated( WindowEvent e ) {\n\t\t\n\t}", "public void endTurn()\n {\n revealedCardsScreen.setVisible(false);\n accusationScreen.setVisible(false);\n\n this.played = false;\n\n //call client controller's end turn method\n clientController.endTurn();\n }", "@Override\n\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\n\t\t}", "public void windowDeactivated(WindowEvent e) {\n\r\n\t}", "@Override\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\n\t}" ]
[ "0.64897007", "0.63894093", "0.6311387", "0.62601364", "0.618706", "0.6142115", "0.6103475", "0.6092113", "0.6079959", "0.604048", "0.60347056", "0.6030754", "0.6013907", "0.59973186", "0.59973186", "0.59927976", "0.5984867", "0.59784776", "0.5970764", "0.5960167", "0.5960167", "0.5940223", "0.5940223", "0.5940223", "0.5940223", "0.5940223", "0.5940223", "0.5940223", "0.5940223", "0.59255135", "0.59231895", "0.5916509", "0.5903249", "0.5903249", "0.5903249", "0.5903249", "0.5900373", "0.589947", "0.58953184", "0.5894724", "0.5893744", "0.58886814", "0.58856726", "0.58856726", "0.58820194", "0.5878295", "0.5878043", "0.5872289", "0.5867271", "0.5865441", "0.5865441", "0.58641106", "0.5863139", "0.5849817", "0.5845445", "0.58407295", "0.5838544", "0.58354336", "0.5828627", "0.5828627", "0.582631", "0.58259964", "0.58187586", "0.5817657", "0.5817657", "0.5817657", "0.5817657", "0.5817657", "0.58140546", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.58062506", "0.5803522", "0.579573", "0.57943374", "0.5786311", "0.57842076", "0.57840073", "0.57824564", "0.5778222", "0.5776845", "0.5776845" ]
0.75583094
0
TODO Autogenerated method stub
public static void main(String[] args) throws IOException, UnknownHostException{ Scanner scan = new Scanner(System.in); System.out.println("Bitte hostname und port eingeben:"); String hostname= scan.nextLine(); int port = scan.nextInt(); Socket client = new Socket(hostname,port); //rfhpc987 InputStream in = client.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); OutputStream out = client.getOutputStream(); PrintWriter writer = new PrintWriter(out); //BufferedReader msgReader = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Bitte geben Sie einen Text ein: "); Scanner msgReader = new Scanner(System.in); // Nachricht an server senden String result= msgReader.nextLine(); writer.println(result); writer.flush(); // die von Server gesendete Nachricht String msgServer = reader.readLine(); // Nachricht von Client System.out.println("Message von Server:"+msgServer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
saving attachment and uploading
@Override protected void onHandleIntent(Intent intent) { Uri uri = intent.getData(); String parentId = intent.getStringExtra(EXTRA_PARENT_ID); File file; String type; String extension; String eventId; // this should not happen but seems to happen in some cases ... // possible due to the way a third party app might be return the photo if (uri == null) return; switch (intent.getAction()) { case ACTION_CASE_ATTACHMENT_UPLOAD: file = saveFile(uri, Attachment.attachmentDirectoryForCases(parentId)); if (file != null) { eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_CASE); // only start upload if we have an actual id for this parent if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_CASE); } } break; case ACTION_ACCOUNT_ATTACHMENT_UPLOAD: file = saveFile(uri, Attachment.attachmentDirectoryForAccount(parentId)); if (file != null) { eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_ACCOUNT); if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_ACCOUNT); } } break; case ACTION_ASSET_PHOTO_UPLOAD: type = getContentResolver().getType(uri); extension = type != null ? type.substring(type.lastIndexOf("/") + 1, type.length()) : "jpg"; file = saveFile(uri, Attachment.attachmentDirectoryForAssets(parentId), Attachment.getAssetPhotoFileName() + "." + extension); if (file != null) { eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_ASSET); if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_ASSET); } } break; case ACTION_ACCOUNT_PHOTO_UPLOAD: extension = Attachment.getAccountPhotoFileType(); file = saveFile(uri, Attachment.attachmentDirectoryForAccount(parentId), Attachment.getAccountPhotoFileName() + extension); if (file != null) { eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_ACCOUNT); if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_ACCOUNT); } } break; case ACTION_ACCOUNT_LICENSE_PHOTO_UPLOAD: extension = Attachment.getAccountPhotoFileType(); file = saveFile(uri, Attachment.attachmentDirectoryForAccount(parentId), Attachment.getAccountLicensePhotoFileName() + extension); if (file != null) { eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_ACCOUNT); if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_ACCOUNT); } } break; case ACTION_CHECK_IN_PHOTO_UPLOAD: type = getContentResolver().getType(uri); extension = type != null ? type.substring(type.lastIndexOf("/") + 1, type.length()) : "jpg"; file = saveFile(uri, Attachment.attachmentDirectoryForEvents(parentId), Attachment.getCheckInPhotoFileName() + "." + extension); if (file != null) { eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_EVENT); if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_EVENT); } } break; case ACTION_CHECK_OUT_PHOTO_UPLOAD: type = getContentResolver().getType(uri); extension = type != null ? type.substring(type.lastIndexOf("/") + 1, type.length()) : "jpg"; file = saveFile(uri, Attachment.attachmentDirectoryForEvents(parentId), Attachment.getCheckOutPhotoFileName() + "." + extension); if (file != null) { eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_EVENT); if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_EVENT); } } break; case ACTION_SURVEY_PHOTO_UPLOAD: String fileName = uri.getLastPathSegment(); Log.e(TAG, "fileName in surveyPhotoUpload: " + fileName); file = saveFile(uri, Attachment.attachmentDirectoryForSurveyQR(parentId), fileName); if (file != null) { Log.e(TAG, "deleting file: " + uri.getPath()); ContentUtils.deleteContent(this, uri); Uri thumbnailUri = getThumbnailUri(uri); Log.e(TAG, "deleting thumbnail: " + thumbnailUri.getPath()); ContentUtils.deleteContent(this, thumbnailUri); eventId = getCurrentEventId(); createPictureAuditStatus(file, parentId, eventId, Attachment.ParentType.PARENT_SURVEY_QR); if (!mDataManager.isClientId(parentId)) { uploadFile(file, parentId, Attachment.ParentType.PARENT_SURVEY_QR); } } break; case ACTION_ACCOUNT_FLUSH: if (!mDataManager.isClientId(parentId)) { uploadFile(new File(uri.getPath()), parentId, Attachment.ParentType.PARENT_ACCOUNT); } break; case ACTION_ASSET_FLUSH: if (!mDataManager.isClientId(parentId)) { uploadFile(new File(uri.getPath()), parentId, Attachment.ParentType.PARENT_ASSET); } break; case ACTION_CASE_FLUSH: if (!mDataManager.isClientId(parentId)) { uploadFile(new File(uri.getPath()), parentId, Attachment.ParentType.PARENT_CASE); } break; case ACTION_EVENT_FLUSH: if (!mDataManager.isClientId(parentId)) { uploadFile(new File(uri.getPath()), parentId, Attachment.ParentType.PARENT_EVENT); } break; case ACTION_SURVEY_FLUSH: if (!mDataManager.isClientId(parentId)) { uploadFile(new File(uri.getPath()), parentId, Attachment.ParentType.PARENT_SURVEY_QR); } break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSaveAttachment(AttachmentViewInfo attachment) {\n\n getAttachmentController(attachment).saveAttachment();\n }", "private void saveAndUpload(String name, String email, Uri photoUri){\n\n // TODO implement save to local DB\n // TODO implement safe upload to Server\n }", "public void upload() {\r\n if (file != null) {\r\n try {\r\n String filepath = super.getUploadFolder() + \"/\" + file.getFileName();\r\n filepath = FileUtil.alternativeFilepathIfExists(filepath);\r\n FileUtil.createFile(filepath);\r\n\r\n file.write(filepath);\r\n super.info(\"Succesful\", file.getFileName() + \" is uploaded.\");\r\n\r\n Upload upload = new Upload();\r\n upload.setDescription(description);\r\n upload.setFilepath(filepath);\r\n upload.setTag(Md5Util.getMd5Sum(filepath));\r\n this.description = null;\r\n uploads.add(upload);\r\n // update ui and ready for save in db\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }\r\n }", "public void upload(){\n put(\"Title\",title);\n put(\"Location\",location);\n put(\"DateMonth\", dateMonth);\n put(\"DateDay\", dateDay);\n put(\"DateYear\",dateYear);\n put(\"StartHour\",startHour);\n put(\"StartMinute\", startMinute);\n put(\"EndHour\", endHour);\n put(\"EndMinute\", endMinute);\n put(\"NumGoing\",numGoing);\n put(\"Description\",description);\n put(\"Category\",category);\n put(\"Author\", author);\n put(\"Contact\", contact);\n put(\"Attending\", attending);\n saveInBackground();\n }", "public void uploadObject() {\n\n\t}", "@POST\n @Path(\"{id}/coverupload\")\n @Consumes(MediaType.MULTIPART_FORM_DATA)\n public Response uploadAttach(@PathParam(\"id\") Integer id, MultipartFormDataInput newcover) {\n Map<String, List<InputPart>> uploadForm = newcover.getFormDataMap();\n // Get file data to save\n List<InputPart> inputParts = uploadForm.get(\"file\");\n String filename = null;\n for (InputPart inputPart : inputParts) {\n // convert the uploaded file to inputstream and write it to disk\n InputStream inputStream = null;\n OutputStream out = null;\n try {\n inputStream = inputPart.getBody(InputStream.class, null);\n List<String> contDisp = inputPart.getHeaders().get(\"Content-Disposition\");\n for (String cd : contDisp) {\n if (cd.contains(\"filename\")) {\n filename = \"cover.jpg\";\n LOGGER.info(\"FILENAME : \" + filename);\n }\n }\n String path = conf.getMovieFS() + id + \"/\";\n File pathtest = new File(path);\n if (!pathtest.exists()) {\n if (!pathtest.mkdirs()) {\n LOGGER.error(\"While saving cover : \"\n + \"unable to create repository tmp dir => \" + path);\n }\n }\n File up = new File(path + filename);\n if (!up.createNewFile()) {\n \tif (up.exists()) {\n \t\tup.delete();\n \t\tif (!up.createNewFile()) {\n LOGGER.error(\"While saving cover : \" + \"unable to overwrite existing file => \"\n + up.getAbsolutePath());\n \t\t}\n \t} else {\n LOGGER.error(\"While saving cover : \" + \"unable to create new file => \"\n + up.getAbsolutePath());\n \t}\n }\n out = new FileOutputStream(up);\n\n int read = 0;\n byte[] bytes = new byte[2048];\n while ((read = inputStream.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n inputStream.close();\n out.flush();\n out.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover : \", e);\n return Response.ok(new JsonSimpleResponse(false), MediaType.APPLICATION_JSON).build();\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover - closing inputstream : \", e);\n }\n }\n if (out != null) {\n try {\n out.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover - closing outputstream : \", e);\n }\n }\n }\n }\n return Response.ok(new JsonSimpleResponse(true), MediaType.APPLICATION_JSON).build();\n }", "public String guardarArchivo(MultipartFile archivo) throws IOException;", "public void savePhoto() {\n\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\tSystem.err.println(\"save photo: url----------\" + url);\n\n\t\ttry {\n\n\t\t\t// if not uploading file\n\t\t\tif (url == null || url.equals(\"null\") || url.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_warn_info\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_warn_charge_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.err.println(\"etudiantid:\" + this.dossierEtudiantId);\n\n\t\t\tif (this.dossierEtudiantId == null || this.dossierEtudiantId.equals(\"null\")\n\t\t\t\t\t|| this.dossierEtudiantId.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_passage_parametres_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tdossierEtudiantDto = dossierEtudiantService.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tDossierEtudiantDto oldDossierEtudiant = dossierEtudiantService\n\t\t\t\t\t.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tif (oldDossierEtudiant.getPhoto() == null || oldDossierEtudiant.getPhoto().trim().isEmpty()) {\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"--------oldDossierEtudiant---------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\t\t\t\tSystem.err.println(\"-----------------file moved------\");\n\t\t\t\t// deleteTempFileByName(url);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif (!oldDossierEtudiant.getPhoto().equals(url)) {\n\n\t\t\t\t// String oldUrl = oldDossierEtudiant.getPhoto();\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"-------------------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\n\t\t\t\t// deleteFileByName(oldUrl);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t}\n\n\t\t} catch (Exception e2) {\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_echec\") + \": \"\n\t\t\t\t\t+ bundleDocument.getString(\"document_error_persistence_photo\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\tlog.info(e2.getMessage());\n\t\t}\n\t}", "public void upload() {\n try {\n BufferedImage bufferedProfile = ImageIO.read(profilePicture.getInputStream());\n FaceImage face = new FaceImage(bufferedProfile);\n\n if (face.foundFace()) {\n\n face.setNoCropMultiplier(1);\n face.setAdditionPadding(20);\n face.setDimension(128, 128);\n BufferedImage profilePicture = face.getScaledProfileFace();\n\n File outfile = new File(Settings.NEW_PROFILE_IMAGE_PATH.replace(\"~~username~~\", student.getUserName()));\n ImageIO.write(profilePicture, \"png\", outfile);\n\n success = true;\n\n student.setProfilePicturePath(\"profile/\" + student.getUserName() + \".png\");\n save();\n\n } else {\n FacesContext.getCurrentInstance().addMessage(\"imageContainer:file\", new FacesMessage(\"Kein Gesicht gefunden!\"));\n\n }\n\n } catch (IOException e) {\n System.err.println(\"something went wrong \" + e.getMessage());\n }\n\n }", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "private void saveFile(String filename, InputStream in) throws Exception {\r\n\r\n String dir = mReceiverInfo.getAttachmentDir();\r\n String separator = \"\";\r\n\r\n File storefile = new File(MimeUtility.decodeText(dir) +\r\n MimeUtility.decodeText(separator) +\r\n MimeUtility.decodeText(filename));\r\n BufferedOutputStream bos = null;\r\n BufferedInputStream bis = null;\r\n\r\n try {\r\n\r\n bos = new BufferedOutputStream(new FileOutputStream(storefile));\r\n bis = new BufferedInputStream(in);\r\n\r\n int c;\r\n\r\n while ((c = bis.read()) != -1) {\r\n bos.write(c);\r\n bos.flush();\r\n }\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new Exception(\"Failed saving file!\");\r\n }\r\n finally {\r\n bos.close();\r\n bis.close();\r\n }\r\n }", "void fileUploaded(String path);", "Path fileToUpload();", "UploadDocumentResponseModel saveFile(MultipartFile multipartFile, String userId,\n String category) throws IOException, UploadDocumentException;", "public void uploadFile() {\n \n InputStream input = null;\n try {\n input = file.getInputStream();\n System.out.println(\"chay qua inpustream\");\n String itemName = file.getSubmittedFileName();\n String filename = itemName.substring(\n itemName.lastIndexOf(\"\\\\\") + 1);\n String dirPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/upload/images\");\n fileNamed = \"/upload/images/\"+filename;\n File f = new File(dirPath + \"\\\\\" + filename);\n if (!f.exists()) {\n f.createNewFile();\n }\n FileOutputStream output = new FileOutputStream(f);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n // resize(dirPath + \"\\\\\" + filename, dirPath + \"\\\\\" + filename, 200, 200);\n input.close();\n output.close();\n } catch (IOException ex) {\n System.out.println(\"loi io\");\n Logger.getLogger(ArtistsManagedBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@Override\n\tpublic void doSaveAs() {\n\t}", "public void saveFile(MultipartFile file,Document document){\n document.setKey(UUID.randomUUID().toString());\n document.setLink(UUID.randomUUID().toString());\n\n }", "@Override\n public String persistAttachmentBinary(HttpServletRequest request, Attachment attachment)\n throws PersistenceException {\n if (request == null) {\n return null;\n }\n\n String path = getAttachmentAbsolutePath(attachment, request);\n try {\n FileUtil.write(path, attachment.getData());\n } catch (IOException e) {\n throw new PersistenceException(\"Unable to persist file \" + attachment.getFilename()\n + \"to path \" + path, e);\n }\n\n final String context = request.getContextPath();\n final String urlPath = context + PATH_FORMAT.format(new Object[]{ attachment.getGuid(),attachment.getFilename()});\n return urlPath;\n }", "private static void saveFileToDisk(String dir,MultipartFile frontFile, String fileId) throws IOException {\n String filename = frontFile.getOriginalFilename();\n File file = new File(dir+filename+\"_\"+fileId);\n //file.createNewFile();\n System.out.println(\"-----------\");\n System.out.println(file.getAbsolutePath());\n frontFile.transferTo(file);\n BufferedReader bufferedReader = new BufferedReader(new FileReader(file));\n bufferedReader.readLine();\n bufferedReader.close();\n\n }", "String saveFile(FileStoreDto dto);", "void save(Media media);", "public void uploadMultipart() {\n //getting the actual path of the image\n String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, \"todo\")\n .addFileToUpload(path, \"image\") //Adding file\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "void uploadingFile(String path);", "@Override\n\tpublic void saveUserAvatar(String userId, ForumAttachment fileAttachment)\n\t\t\tthrows Exception {\n\n\t}", "public synchronized void upload(){\n\t}", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;", "private void save(FileItem file) throws Exception {\n FileHandler fileHandler = new FileHandler(oriImgFile());\n fileHandler.saveFile(file);\n }", "@Override\n\tpublic void save(Photo photo) {\n\t\t\n\t}", "private void uploadFile(Uri data) {\n\n //displaying a progress dialog while upload is going on\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.setCancelable(false);\n progressDialog.show();\n\n StorageReference sRef = mStorageReference.child(cloud_base_path + new_notice_key + \"/\" + attchmentFIleName.replace(\" \",\"_\") + \".pdf\");\n sRef.putFile(data)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @SuppressWarnings(\"VisibleForTests\")\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n Upload upload = new Upload(attchmentFIleName, taskSnapshot.getDownloadUrl().toString());\n\n String newKey = mDatabase.child(\"Global\").child(StartUpActivity.userDetails.getState()).child(\"Notice_Board\").child(new_notice_key).child(\"Attachments\").push().getKey();\n mDatabase.child(\"Global\").child(StartUpActivity.userDetails.getState()).child(\"Notice_Board\").child(new_notice_key).child(\"Attachments\").child(newKey).setValue(upload);\n\n // Update Attachment field\n String atthline = textView_new_notice_vlu.getText().toString() + \"\\n\" + attchmentFIleName +\".pdf\";\n textView_new_notice_vlu.setText(atthline);\n\n // Update Attachments Name\n updateAttachmentsNames();\n\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n\n //hiding the progress dialog\n progressDialog.dismiss();\n\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @SuppressWarnings(\"VisibleForTests\")\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n\n //displaying percentage in progress dialog\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\n }\n });\n\n }", "int setAttachment(Attachment attachment) throws NotAuthorizedException;", "public void storePhoto(int receiptId, FileArguments args);", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tll.setDrawingCacheEnabled(true);\n\t\t\t\t\t\t\t\tBitmap b = ll.getDrawingCache();\n\t\t\t\t\t\t\t\tb.compress(\n\t\t\t\t\t\t\t\t\t\tCompressFormat.JPEG,\n\t\t\t\t\t\t\t\t\t\t95,\n\t\t\t\t\t\t\t\t\t\tnew FileOutputStream(\n\t\t\t\t\t\t\t\t\t\t\t\tEnvironment\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getExternalStoragePublicDirectory(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnvironment.DIRECTORY_PICTURES)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPath()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ File.separator\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"image.jpg\"));\n\t\t\t\t\t\t\t\tfile=new File(Environment\n\t\t\t\t\t\t\t\t\t\t.getExternalStoragePublicDirectory(\n\t\t\t\t\t\t\t\t\t\t\t\tEnvironment.DIRECTORY_PICTURES)\n\t\t\t\t\t\t\t\t\t\t.getPath()\n\t\t\t\t\t\t\t\t\t\t+ File.separator\n\t\t\t\t\t\t\t\t\t\t+ \"image.jpg\");\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t pd = ProgressDialog.show(getActivity(), \"Working..\", \"Uploading Item\", true,\n\t\t\t\t false);\n\t\t\t\t\t\t\t\t try\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t entity=new MultipartEntity();\n\t\t\t\t\t\t\t\t\tentity.addPart(\"days\",new StringBody( days.getText().toString()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"id\", new StringBody( idItems.get(spinner2.getSelectedItemPosition())));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"title\", new StringBody(title.getText().toString()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"desc\", new StringBody(desc.getText().toString()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"advertype\", new StringBody(B2BUtils.getUser().getUsertype()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"catid\", new StringBody(B2BUtils.categoryId.get(B2BUtils.categoryNames.indexOf(spinner1.getSelectedItem().toString().toUpperCase(Locale.getDefault())))));\n\t\t\t\t\t\t\t\t\tSystem.out.println((B2BUtils.categoryId.get(B2BUtils.categoryNames.indexOf(spinner1.getSelectedItem().toString().toUpperCase(Locale.getDefault())))));\n\t\t\t\t\t\t\t\t\tThread t=new Uploader(file, url, handler, entity);\n\t\t\t\t\t\t\t\t\tt.start();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tLog.d(\"Error\", e.toString());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "public void upload(FileUploadEvent event){\n UploadedFile file = event.getFile();\n if(file != null){\n try {\n imagePic = new OracleSerialBlob(file.getContents());\n Long size = imagePic.length();\n putProfPic(imagePic);\n //setPhoto_profile(new ByteArrayContent(imagePic.getBytes(1, size.intValue())));\n } catch (SQLException ex) {\n LOG.error(ex);\n GBMessage.putErrorMessage(\"Error al subir el archivo\");\n } catch (IOException ex) {\n Logger.getLogger(StaffBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n GBMessage.putInfoMessage(\"Carga correcta\");\n }\n }", "public void save(){\r\n if (inputValidation()) {\r\n if (modifyingPart) {\r\n saveExisting();\r\n } else {\r\n saveNew();\r\n }\r\n closeWindow();\r\n }\r\n\r\n }", "@Override\n public void onSaveAttachmentToUserProvidedDirectory(final AttachmentViewInfo attachment) {\n MessageViewFragment fragment = messageViewFragmentWeakReference.get();\n if (fragment == null) {\n return;\n }\n\n Intent intent = new Intent();\n intent.putExtra(\"attachmentInfo\", attachment);\n FileBrowserHelper.getInstance().showFileBrowserActivity(fragment, null,\n MessageViewFragment.ACTIVITY_CHOOSE_DIRECTORY, new FileBrowserHelper.FileBrowserFailOverCallback() {\n @Override\n public void onPathEntered(String path) {\n getAttachmentController(attachment).saveAttachmentTo(path);\n }\n\n @Override\n public void onCancel() {\n // Do nothing\n }\n }, intent);\n\n }", "private void uploadFromDataStorage() {\n }", "public void saveImage(){\n fixMediaDir(); // fixes bug in Android 4.4\n\n // name file eSketch + timestamp\n final String filename = \"eSketch\" + System.currentTimeMillis() + \".jpg\";\n\n // insert image on the device\n String location = MediaStore.Images.Media.insertImage(\n getContext().getContentResolver(), mBitmap, filename, \"eSketch Drawing\"\n );\n\n if( location != null ){\n // notify user image was saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_saved, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n } else {\n // notify user image was NOT saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_error_saving, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n }", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "org.hl7.fhir.Attachment addNewValueAttachment();", "private Result uploadFile(StoryModel storyModel) {\n if (isStopped())\n return Result.failure();\n\n\n String storyId = storyModel.get_id();\n if (storyModel.getType() != null && storyModel.getType().equals(\"image\")) {\n\n sendStartStatus(\"image\", storyModel.get_id());\n\n NotificationsManager.getInstance().showUpDownNotification(getApplicationContext(),\n storyModel.get_id(),\n storyModel.getUserId());\n if (uploadImageFile(storyModel.getFile())) {\n return Result.success();\n } else {\n if (compositeDisposable.isDisposed()) {\n sendErrorStatus(\"image\", storyId);\n }\n return Result.retry();\n }\n } else if (storyModel.getType() != null && storyModel.getType().equals(\"video\")) {\n\n sendStartStatus(\"video\", storyModel.get_id());\n\n NotificationsManager.getInstance().showUpDownNotification(getApplicationContext(),\n storyModel.get_id(),\n storyModel.getUserId());\n if (uploadVideoFile(storyModel.getFile())) {\n return Result.success();\n } else {\n if (compositeDisposable.isDisposed()) {\n sendErrorStatus(\"video\", storyId);\n }\n return Result.retry();\n }\n } else {\n return Result.failure();\n }\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == GALLERY_INTETN && resultCode==RESULT_OK) {\n dialog.setMessage(\"Uploading\");\n dialog.show();\n Uri uri= data.getData();\n\n StorageReference filepath= mStorage.child(\"volunteer_aadhar_pic\").child(uri.getLastPathSegment());\n try\n {\n compressed = MediaStore.Images.Media.getBitmap(ApplyAsVolunteer.this.getContentResolver(), uri);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressed.compress(Bitmap.CompressFormat.JPEG, 30, baos);\n byte[] cimg = baos.toByteArray();\n filepath.putBytes(cimg).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n path = taskSnapshot.getDownloadUrl();\n //accountref = FirebaseDatabase.getInstance().getReference().child(\"user_details\").child(auth.getUid());\n //accountref.child(\"userImgUrl\").setValue(String.valueOf(path));\n Toast.makeText(ApplyAsVolunteer.this, \"Document uploaded\", Toast.LENGTH_LONG).show();\n //finish();\n //startActivity(getIntent());\n afterText.setVisibility(View.VISIBLE);\n clicksubmit.setVisibility(View.GONE);\n dialog.dismiss();\n }\n });\n }\n }", "Integer saveExerciseGif(Long exerciseId, MultipartFile exerciseGif) throws IOException;", "private void doUpload(Part img1, String image) throws IOException{\n OutputStream out = null;\n InputStream filecontent = null;\n try {\n out = new FileOutputStream(new File(path \n + image));\n System.out.println(path \n + image);\n filecontent = img1.getInputStream();\n\n int read = 0;\n final byte[] bytes = new byte[1024];\n\n while ((read = filecontent.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n \n } catch (Exception fne) {\n System.out.println(\"You either did not specify a file to upload or are \"\n + \"trying to upload a file to a protected or nonexistent \"\n + \"location.\");\n fne.printStackTrace();\n\n } finally {\n if (out != null) {\n out.close();\n }\n if (filecontent != null) {\n filecontent.close();\n }\n }\n }", "int uploadEto(File file, DataDate date, DataDate updated) throws IOException, SQLException;", "@Override\n\tvoid postarFoto() {\n\n\t}", "private void saveProfile()\n {\n mFirebaseUser = mFirebaseAuth.getCurrentUser();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n mUserId = mFirebaseUser.getUid();\n\n StorageReference filePath = mStorage.child(\"UserPic\").child(mImageUri.getLastPathSegment());\n //UserProfile userProfile = new UserProfile();\n filePath.putFile(mImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n mDatabase.child(\"users\").child(mUserId).child(\"userName\").setValue(fname);\n mDatabase.child(\"users\").child(mUserId).child(\"userImage\").setValue(downloadUrl.toString());\n }\n });\n\n }", "private void uploadToServer(String filePath, String title) {\n APIClient apiClient = new APIClient();\n Retrofit retrofit = apiClient.getApiClient();\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n File file = new File(filePath);\n\n MultipartBody.Part filePart =\n MultipartBody.Part.createFormData(\"file\", title+\".jpg\", //file.getName(),\n RequestBody.create(MediaType.parse(\"image/*\"), file));\n\n\n Call call = apiInterface.uploadImage(filePart);\n call.enqueue(new Callback() {\n @Override\n public void onResponse(Call call, Response response) {\n Toast.makeText(AddPost.this, \"Worked\",Toast.LENGTH_SHORT).show();\n }\n @Override\n public void onFailure(Call call, Throwable t) {\n t.printStackTrace();\n Toast.makeText(AddPost.this, \"Didn't work\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "String saveData(MultipartFile md5File) throws IOException;", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n int geekid = Integer.parseInt(request.getParameter(\"geekid\"));\n if (ServletFileUpload.isMultipartContent(request)) {\n try {\n\n List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\n\n for (FileItem item : multiparts) {\n\n if (!item.isFormField()) {\n item.write(new File(UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\"));\n\n }\n \n String fileName = UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\";\n\n }\n\n //File uploaded successfully\n request.setAttribute(\"message\", \"File Uploaded Successfully\");\n\n } catch (Exception ex) {\n\n request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\n\n }\n\n } else {\n\n request.setAttribute(\"message\",\n \"Sorry this Servlet only handles file upload request\");\n\n }\n\n request.getRequestDispatcher(\"/result.jsp\").forward(request, response);\n\n }", "public void save() {\t\n\t\n\t\n\t}", "private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }", "private boolean saveFile(ClientInterface client, MyTubeFile file){\n try{\n byte[] content = client.readFile(file.getFilename());\n String savepath = uploadsPath+\"/\"+Integer.toString(file.getId());\n new File(savepath).mkdir();\n savepath += \"/\"+ file.getFilename();\n\n try (FileOutputStream fos = new FileOutputStream(savepath)) {\n fos.write(content);\n return true;\n }\n }catch(IOException e){\n return false;\n }\n }", "public ActionSaveAs() {\r\n putValue(SMALL_ICON, IconFactory.get().create(\"fa:floppy-o\"));\r\n Messages.get().message(\"saveAs\").subscribe((msg) -> {\r\n putValue(NAME, msg);\r\n });\r\n }", "public void uploadMultipart() {\n String path = getPath(filePath);\n // Toast.makeText(getContext(),path,Toast.LENGTH_LONG).show();\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n\n //Creating a multi part request\n new MultipartUploadRequest(getContext(), uploadId, Const.CompanyProfile)\n .addFileToUpload(path, \"logo\") //Adding file\n .addParameter(\"companyname\", \"BGn\") //Adding text parameter to the request\n .addParameter(\"companyemail\", \"[email protected]\")\n .addParameter(\"description\", desc.getText().toString())\n .addParameter(\"address\", address.getText().toString())\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n // startActivity(new Intent(getContext(), HOME.class));\n Toast.makeText(getContext(), \"Thanks for Submit your Property..\", Toast.LENGTH_LONG).show();\n Fragment fragment = new EmployerHomeFragment();\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.newview, fragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n\n } catch (Exception exc) {\n Toast.makeText(getContext(), exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n //finish();\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n String savePath = request.getServletContext().getRealPath(\"/\") + \"images\";\n File fileSaveDir=new File(savePath);\n if(!fileSaveDir.exists()){\n fileSaveDir.mkdir();\n }\n\n \n Part imagePart = request.getPart(\"photo\");\n String fileName = extractFileName(imagePart);\n String fileLocalPath = File.separator + fileName;\n imagePart.write(savePath + fileLocalPath);\n String description = request.getParameter(\"description\");\n \n Conexion c=new Conexion();\n Connection con=c.getConexion();\n CallableStatement cs = null;\n \n try{\n String query = \"call sp_pv_insertPost(?,?,1)\";\n cs = con.prepareCall(query);\n cs.setString(1, fileLocalPath);\n cs.setString(2, description);\n cs.execute(); \n }catch(SQLException e){\n e.printStackTrace();\n }finally{\n BDUtil.cerrarStatement(cs);\n c.cerrarConexion();\n }\n \n response.setContentType(\"text/plain\"); \n response.setCharacterEncoding(\"UTF-8\");\n response.getWriter().write(\"success\"); \n \n }", "@Override\r\n\t@Transactional\r\n\tpublic void saveFile(List<MultipartFile> mpf, Board board) {\n\t\t\r\n\t\tList<File> files = new ArrayList<>();\r\n\t\t\r\n\t\tfor(MultipartFile mf : mpf) {\r\n\t\t\t\r\n\t\t\tString uuid = UUIDCreator.makeUUID();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\tFile file = File\r\n\t\t\t\t\t.builder()\r\n\t\t\t\t\t.originalName(mf.getOriginalFilename())\r\n\t\t\t\t\t.UUID(uuid)\r\n\t\t\t\t\t.path(FileUtil.parseInsertFile(mf, uuid))\r\n\t\t\t\t\t.UUID(uuid)\r\n\t\t\t\t\t.build();\r\n\t\t\t\r\n\t\t\tfiles.add(file);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tList<File> savedFileList = fileRepository.save(files);\r\n\t\t\r\n\t\tfor(File savedFile : savedFileList) {\r\n\t\t\tsaveService.saveSave(savedFile, board);\r\n\t\t\tSystem.out.println(savedFile.getOriginalName());\r\n\t\t}\r\n\t}", "private void keepRecordSaving(RecordRequest recordRequest) {\n \tLog.d(C.LOG_TAG, \"start of keepRecordSaving thread \" + recordRequest.recordIdx);\n \tLog.d(C.LOG_TAG, \"record = \" + recordRequest.dump());\n \t\n \t//Boolean writeResult = Highgui.imwrite(shotRequest.filePath, shotRequest.imageToSave);\n \ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(recordRequest.filePath);\n\t\t\trecordRequest.byteStreamToSave.writeTo(fos);\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLog.e(C.LOG_TAG, \"ERROR: can't open file when saving record\");\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.e(C.LOG_TAG, \"IOERROR: can't open file when saving record\");\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void save(final UploadFile uploadFile) {\n\t\t uploadFileDAO.persist(uploadFile);\n\t }", "@Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\r\n updateRealTimeDB(userId, path);\r\n\r\n //and displaying a success toast\r\n finish();\r\n\r\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\r\n }", "public void upload(UploadedFile file) {\n FacesContext faces = FacesContext.getCurrentInstance();\n\n getSelected().setUrlImage(file.getFileName());\n String fileExtension = file.getFileName().split(\"\\\\.\")[file.getFileName().split(\"\\\\.\").length - 1];\n\n //String generatedFileName = \"file\" + System.currentTimeMillis();\n File directory = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE));\n\n if (!directory.exists()) {\n directory.mkdir();\n }\n\n File newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + file.getFileName());\n try {\n if (!newFile.createNewFile()) {\n String nameGenerated = \"file_generated\" + System.currentTimeMillis();\n newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + nameGenerated + \".\" + fileExtension);\n getSelected().setUrlImage(nameGenerated);\n }\n\n FileOutputStream output = new FileOutputStream(newFile);\n\n byte[] buffer = new byte[BUFFER];\n\n int bulk;\n\n InputStream input = file.getInputstream();\n\n while (true) {\n bulk = input.read(buffer);\n\n if (bulk < 0) {\n break;\n }\n\n output.write(buffer, 0, bulk);\n output.flush();\n }\n\n output.close();\n input.close();\n\n } catch (Exception ex) {\n ex.printStackTrace();\n FacesContext.getCurrentInstance().addMessage(\"\", new FacesMessage(bundle.getString(\"Error_file_created\")));\n }\n\n }", "private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}", "public void save(boolean create) {\r\n if (!readyToSave) {\r\n super.error(\"Upload objects are not ready to save\");\r\n LOG.error(\"Upload objects are not ready to save, container view failed to call update method\");\r\n }\r\n // check duplicate uploads especially in edit mode\r\n if (create) {\r\n super.getBasebo().persist(uploads);\r\n } else {\r\n super.getBasebo().update(uploads);\r\n }\r\n readyToSave = false;\r\n }", "private void saveFile(final FileMessage fm) {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setInitialFileName(fm.getFilename());\n FileChooser.ExtensionFilter extFilter;\n extFilter = new FileChooser.ExtensionFilter(\"Any files (*.*)\", \"*.*\");\n fileChooser.getExtensionFilters().add(extFilter);\n File dest = fileChooser.showSaveDialog(this);\n if (dest != null) {\n try {\n Files.write(\n Paths.get(\n String.valueOf(dest)),\n fm.getData(),\n StandardOpenOption.CREATE);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "public abstract void addAttachmentPart(AttachmentPart attachmentpart);", "public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {\n GWT.log(event.getResults());\n mywebapp.log(\"saveMediaFile complete non-markdata style\");\n if (event.getResults().equals(\"SUCCESS\")) {\n doSave();\n } else {\n postDialog.hide();\n mywebapp.getMessagePanel().displayError(event.getResults());\n }\n }", "public static String saveFile( MultipartFile filedata, HttpServletRequest request) {\n String pathval = \"C://KCGLIMG//\";\n String newFileName = String.valueOf( System.currentTimeMillis());\n String saveFilePath = \"images//equipment//\";\n\n File fileDir = new File(pathval + saveFilePath);\n if (!fileDir.exists()) {\n fileDir.mkdirs();\n }\n\n String filename=filedata.getOriginalFilename();\n\n String extensionName = filename.substring(filename.lastIndexOf(\".\") + 1);\n try {\n String imgPath = saveFilePath + newFileName + \".\" +extensionName;\n System.out.println(pathval + imgPath);\n FileOutputStream out = new FileOutputStream(pathval + imgPath);\n \n out.write(filedata.getBytes());\n out.flush();\n out.close();\n\n String path=pathval+imgPath;\n return path;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n taskSnapshot.getMetadata().getReference().getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n FirebaseStorage.getInstance().getReference().child(\"faculty_images\").child(imageIdentifier).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Useremail.photouri = uri;\n FirebaseFirestore.getInstance().collection(\"Faculty_Bag\").document(Useremail.email).update(\"photo_uri\",Useremail.photouri.toString()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Showfancytoasr.show(MainActivity.this,\"Uploading process was successful\");\n progressDialog.dismiss();\n finish();\n startActivity(getIntent());\n }\n });\n }\n });\n }\n }\n });\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n uploadFile(request, response);\n\n }", "private void fileUpload(HttpServletRequest request, HttpServletResponse response) {\n\t \ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * String appPath = request.getServletContext().getRealPath(\"\");\r\n\t\t\t\t\t * System.out.println(appPath); String savePath = appPath + File.separator +\r\n\t\t\t\t\t * SAVE_DIR; System.out.println(savePath);\r\n\t\t\t\t\t */\r\n\t \t\t\r\n\t \t\t//String appPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \t\tSystem.out.println(appPath);\r\n\t \t\t String savePath = appPath + \"//\" +SAVE_DIR; \r\n\t \t\t System.out.println(savePath);\r\n\t\t\t\t\t\tCollection<Part>cp= request.getParts();\r\n\t \t String fileName = up.fileUpload(cp,appPath);\r\n\t \t System.out.println(fileName);\r\n\t \t \r\n\t \t request.setAttribute(\"message\", \"The file \"+fileName+\" has been uploaded successfully!\");\r\n\t \t RequestDispatcher dispatcher = request.getRequestDispatcher(\"success.jsp\");\r\n\t \t dispatcher.forward(request, response);\r\n\t}catch(Exception ex) {\r\n System.out.println(ex);\r\n }\r\n\t }", "public void postPhoto() throws InterruptedException, IOException, AWTException{\n\t\tString filepath= getTargetFilePath(\"PhotoToUpload\", \"Image\", \"jpeg\");\n\t\tSystem.out.println(\"File path is:\"+ filepath);\n\t\t\n\t\tclick(profileIcon);\n\t\tThread.sleep(1000);\n\t\tclick(PhotoTab);\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(PhotoUpload).sendKeys(filepath);\n\t\tclick(PostBttn);\n\t}", "public void uploadMultipart(String path, final String name) {\n //getting name for the image\n // String name = editText.getText().toString().trim();\n\n //getting the actual path of the image\n // String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, UPLOAD_URL)\n .addFileToUpload(path, \"image\") //Adding file\n .addParameter(\"name\", name) //Adding text parameter to the request\n .addParameter(\"alert\", mAlertId) //Adding text parameter to the request\n .addParameter(\"device\",\n android.os.Build.MODEL) //Adding text parameter to the request\n .addParameter(\"title\", currentCaptureDirectory.getName())\n .setNotificationConfig(new UploadNotificationConfig()).setMaxRetries(2)\n .setDelegate(new UploadStatusDelegate() {\n @Override\n public void onProgress(Context context, UploadInfo uploadInfo) {\n // your code here\n }\n\n @Override\n public void onError(Context context, UploadInfo uploadInfo,\n Exception exception) {\n // your code here\n }\n\n @Override\n public void onCompleted(Context context, UploadInfo uploadInfo,\n ServerResponse serverResponse) {\n Log.i(\" _ \", \" \");\n Log.d(TAG, \"JSON RESPONSE::: \" + serverResponse.toString());\n Log.d(TAG, \"JSON RESPONSE::: \" + serverResponse.getBodyAsString());\n Log.i(\" _ \", \" \");\n\n File photo = new File(currentCaptureDirectory, name);\n if (photo.exists()) photo.delete();\n\n if (mSendEmail) {\n mSendEmail = false;\n mEmailResetHandler.removeCallbacks(emailResetRunnable);\n mEmailResetHandler.postDelayed(emailResetRunnable, 1000 * 600);\n String link = mServerUrl + \"sendEmail.php?device=\" + mDeviceName +\n \"&name=\" + name + \"&title=\" +\n currentCaptureDirectory.getName();\n new updateData().execute(link);\n\n String link2 = mServerUrl + \"init.php?device=\" + mDeviceName;\n new updateData().execute(link2);\n\n mHandler.postDelayed(runnable, 6000);\n }\n\n // your code here\n // if you have mapped your server response to a POJO, you can easily get it:\n // YourClass obj = new Gson().fromJson(serverResponse.getBodyAsString(), YourClass.class);\n // File photo = new File(Environment.getExternalStorageDirectory(), name + \".jpg\");\n // if (photo.exists()) photo.delete();\n }\n\n @Override\n public void onCancelled(Context context, UploadInfo uploadInfo) {\n // your code here\n }\n }).startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Log.i(TAG, exc.getMessage());\n }\n }", "@Override\n public void saveFile(Object o, File file, String ext)\n throws IOException {\n dest = file;\n }", "public void submit() {\n fileUploadContainer.upload.submit();\n }", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "public void saveTicket(Ticket ticket) throws DavException;", "@Override\r\n protected Boolean doInBackground(Void... params) {\n try{\r\n String ImgPath = ImageUtils.getImageSavePath(GlobalDefinitions.TAG);\r\n PhotoUtils.saveBitmap(mFaceEditor.getDisplayImage(), ImgPath,PhotoUtils.IMAGE_FORMAT_JPG, BeautyfaceActivity.this);\r\n GlobalDefinitions.IMAGE_EDIT_DONE = true;\r\n\r\n }\r\n catch(Exception e)\r\n {\r\n return false;\r\n }\r\n return true;\r\n }", "public void onSaveFile(){\n\n\t\t\n\t\tFormUtil.dlg.setText(\"Saving...\");\n\t\tFormUtil.dlg.show();\n\t\tGWT.runAsync(new RunAsyncCallback() {\n\t public void onFailure(Throwable caught) {}\n\t public void onSuccess() {\t \n\t\t\t\t//DeferredCommand.addCommand(new Command() {\n\t \t Scheduler scheduler = Scheduler.get();\n\t \t scheduler.scheduleDeferred(new Command() {\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t FormDef form = controller.getSelectedForm();\t\t\t\t \t\t\t\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tif(form != null){\n\t\t\t\t\t\t\t\tsaveFile(false);\n\t\t\t\t\t\t\t\tFormUtil.dlg.hide();\n\t\t\n\t\t\t\t\t\t\t\tString fileName = \"filename\";\n\t\t\t\t\t\t\t\tfileName = form.getName();\n\t\t\t\t\t\t\t\tString xmlFormStr = FormHandler.writeToXML(form);\n\t\t\t\t\t\t\t\tSaveToFileDialog dlg = SaveToFileDialog.getInstnace(xmlFormStr, fileName);\n\t\t\t\t\t\t\t\tdlg.center();\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tFormUtil.dlg.hide();\n\t\t\t\t\t\t\t\tWindow.alert(\"No form to save\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Exception ex){\n\t\t\t\t\t\t\tFormUtil.displayException(ex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t }\n\t\t});\n\t}", "private void uploadFile() {\n if (filePath != null) {\n //displaying a progress dialog while upload is going on\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.show();\n\n StorageReference riversRef = mStorageRef.child(previously);\n riversRef.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //if the upload is successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n // picup =true;\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n //if the upload is not successfull\n //hiding the progress dialog\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n //calculating progress percentage\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n\n //displaying percentage in progress dialog\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\n }\n });\n }\n //if there is not any file\n else {\n //you can display an error toast\n }\n }", "private void saveFile(InputStream uploadedInputStream,\r\n String serverLocation) {\r\n \r\n try {\r\n OutputStream outpuStream = new FileOutputStream(new File(serverLocation));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n \r\n outpuStream = new FileOutputStream(new File(serverLocation));\r\n while ((read = uploadedInputStream.read(bytes)) != -1) {\r\n outpuStream.write(bytes, 0, read);\r\n }\r\n outpuStream.flush();\r\n outpuStream.close();\r\n } catch (IOException e) {\r\n \r\n e.printStackTrace();\r\n }\r\n \r\n }", "private void save() {\n File personFile = mainApp.getFilmFilePath();\n if (personFile != null) {\n mainApp.saveFilmDataToFile(personFile);\n } else {\n saveAs();\n }\n }", "@Override\n public void onSuccess(Uri uri) {\n Log.i(\"upload diary\", \"photo in storage\");\n uploadDiary.setPhotoUri(uri.toString());\n db.collection(\"Diary\").document(diary.getTime() + \":\" + diary.getUsername()).set(uploadDiary).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"upload diary\", \"photo succ\");\n }\n });\n }", "private void databaseUpload() {\n StorageReference reference;\n\n// Toast.makeText(NewBeneficiary2.this, \"\"+by.length, Toast.LENGTH_SHORT).show();\n\n reference = FirebaseStorage.getInstance().getReference().child(\"Applications/\").child(FirebaseAuth.getInstance().getUid() + \"_doc\");\n reference.putBytes(by).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n String generatedFilePath = uri.toString();\n NewBeneficiary1.applicationModel.setDocPic(generatedFilePath);\n\n FirebaseFirestore.getInstance().document(\"Applications/\"+FirebaseAuth.getInstance().getUid()+\"/\")\n .set(NewBeneficiary1.applicationModel)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n StatusModel statusModel = new StatusModel();\n statusModel.setStageName(\"Application Submitted\");\n statusModel.setTimestamp(Timestamp.now());\n FirebaseFirestore.getInstance().collection(\"Applications/\"+FirebaseAuth.getInstance().getUid()+\"/Statuses\")\n .document()\n .set(statusModel)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Toast.makeText(NewBeneficiary2.this, \"Completed\", Toast.LENGTH_LONG).show();\n dialog.dismiss();\n startActivity(new Intent(NewBeneficiary2.this, MainActivity.class));\n }\n });\n }\n });\n\n }\n });\n }\n });\n\n }", "public void saveImage(MultipartFile imageFile) throws IOException {\n\t\tlogger.info(\"ComicDetail ID is \"+imageFile.getOriginalFilename());\r\n\t\tString folder=\"/images/comiccover\";\r\n\t\tbyte[] bytes = imageFile.getBytes();\r\n\t\tlogger.info(\"ComicDetail ID is \"+imageFile.getOriginalFilename());\r\n\t\t//Path path = Paths.get(folder+imageFile.getOriginalFilename());\r\n\t\r\n\t\t//Files.write(path, bytes);\r\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n //\"/storage/emulated/0/IRON-HID/captures\" <== can open~!!\n //\"file:///mnt/sdcard/Download/20141025_170314.jpg\"\n if (requestCode == CHOOSE_FILE_TO_UPLOAD)\n {\n if (resultCode == RESULT_OK)\n {\n Uri uri = data.getData();\n if (uri != null)\n {\n // Send file\n String filePath = uri.getPath();\n filePath = filePath.replace(\"file://\", \"\");\n mPutCommand += \" \" + filePath;\n mCommandManager.SendCommand(mPutCommand);\n }\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "void saveRequestToFile(MovilizerRequest request, Path filePath);", "public void saveAs() {\n editorManager.currentFileManager().saveAs();\n mimaUI.fileChanged();\n }", "private void saveEntity(E entity){\n try (BufferedWriter bw = new BufferedWriter(new FileWriter(this.fileName, true))) {\n bw.write(entity.toFile());\n bw.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void attachment() throws Exception {\n SynapseHelper synapseHelper = spy(new SynapseHelper());\n doReturn(\"dummy-filehandle-id\").when(synapseHelper).uploadFromS3ToSynapseFileHandle(MOCK_TEMP_DIR,\n TEST_PROJECT_ID, TEST_FIELD_NAME, UploadFieldTypes.ATTACHMENT_BLOB, \"dummy-attachment-id\");\n\n String retVal = synapseHelper.serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.ATTACHMENT_BLOB, new TextNode(\"dummy-attachment-id\"));\n assertEquals(retVal, \"dummy-filehandle-id\");\n }", "@RequestMapping(value = {\"/edit-user-{id}\"}, method = RequestMethod.POST)\r\n public String updateUser(@Valid FileBucket fileBucket, BindingResult result,\r\n ModelMap model, @PathVariable String id, HttpServletRequest req) {\r\n\r\n MultipartFile[] files = fileBucket.getFiles();\r\n String originalImgPath = \"\";\r\n String resizedImgPath = \"\";\r\n //String serverFileName = \"\";\r\n String photoName = \"\";\r\n String itemViewName = \"\";\r\n String imgLocation = \"\";\r\n int width = 580;\r\n int height = 450;\r\n boolean saved = false;\r\n String serverFileName = \"\";\r\n\r\n FileBucket fb = new FileBucket();\r\n User user = new User();\r\n if (result.hasErrors()) {\r\n return \"registration\";\r\n }\r\n if (files != null && files.length > 0) {\r\n for (int i = 0; i < files.length; i++) {\r\n try {\r\n\r\n byte[] bytes = null;\r\n // Creating the directory to store file\r\n String rootPath = System.getProperty(\"catalina.home\");\r\n File dir = new File(rootPath + File.separator + \"tmpFiles\");\r\n if (!dir.exists()) {\r\n dir.mkdirs();\r\n }\r\n\r\n FilenameUtils fileUTIL = new FilenameUtils();\r\n\r\n String path = req.getServletContext().getRealPath(\"/image\");\r\n //String ext = fileUTIL.getExtension(file.getOriginalFilename());\r\n //String baseName = fileUTIL.getBaseName(file.getOriginalFilename());\r\n\r\n imgLocation = dir + File.separator;\r\n // get files name in the array\r\n if (i == 0) {\r\n photoName = files[i].getOriginalFilename();\r\n bytes = files[i].getBytes();\r\n serverFileName = imgLocation + photoName;\r\n System.out.println(\"photoName:: \" + photoName);\r\n } else if (i == 1) {\r\n itemViewName = files[i].getOriginalFilename();\r\n bytes = files[i].getBytes();\r\n serverFileName = imgLocation + itemViewName;\r\n System.out.println(\"itemViewName:: \" + itemViewName);\r\n }\r\n\r\n System.out.println(\"serverFileName :: \" + serverFileName);\r\n\r\n // resize image\r\n //utility.resize(originalImgPath, resizedImgPath, width, height);\r\n //create the file on server\r\n File serverFile = new File(serverFileName);\r\n BufferedOutputStream stream = new BufferedOutputStream(\r\n new FileOutputStream(serverFile));\r\n stream.write(bytes);\r\n stream.close();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n System.out.println(\"fileBucket.getPhoneNumber() ::\" + fileBucket.getPhoneNumber());\r\n user.setId(fileBucket.getId());\r\n user.setFirstName(fileBucket.getFirstName());\r\n user.setLastName(fileBucket.getLastName());\r\n user.setPhoneNumber(fileBucket.getPhoneNumber());\r\n user.setItemView(fileBucket.getItemView());\r\n user.setAddress(fileBucket.getAddress());\r\n user.setPassportPhotograph(photoName);\r\n user.setImgLocation(imgLocation);\r\n user.setImgName(photoName);\r\n user.setImgItemName(itemViewName);\r\n\r\n saved = userService.updateUser(user);\r\n\r\n } else {\r\n System.out.println(\"File is empty / No image uploaded\");\r\n }\r\n\r\n //model.addAttribute(\"user\", user);\r\n model.addAttribute(\"user\", fb);\r\n // model.addAttribute(\"success\", \"User \" + user.getFirstName() + \" \" + user.getLastName() + \" saved successfully\");\r\n // model.addAttribute(\"saved\", saved);\r\n\r\n //return \"adduser\";\r\n \r\n return \"redirect:/register\";\r\n }", "public void doSaveAs() {\n\t\tif (activePage == 0 && introEditor.isUpdated() || introEditor.isDirty())\n\t\t\tupdateIntroEditor();\n\t\tif (activePage == 1 && (pageMainEditor.isUpdated() || pageMainEditor.isDirty()))\n\t\t\tupdateFile();\n\t\tIEditorPart editor = getTextEditor();\n\t\teditor.doSaveAs();\n\t\tsetPageText(getTextEditorIndex(), editor.getTitle());\n\t\tsetInput(editor.getEditorInput());\n\t}", "void whenUploadFile(MultipartFile file, HttpServletRequest request);", "public void upoadFile(MultipartFile file) {\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t if(!Files.isDirectory(path))\n\t\t {\n\t\t\t System.out.println(\"Directory Created\"+path);\n\t\t\t Files.createDirectories(path);\n\t\t }\n\t\t String fileName=file.getOriginalFilename();\n\t\t Files.copy(file.getInputStream(), this.path.resolve(fileName));\n\t\t System.out.println(\"File uploade details \");\n\t }catch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"File uploade error \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "void saveDocument(SingleDocumentModel model, Path newPath);", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "void uploadCompleted(String blobId);", "public void save(Activity e){ \n\t template.save(e); \n\t}", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "private void uploadFile() {\r\n //if there is a file to upload\r\n if (filePath != null) {\r\n //displaying a progress dialog while upload is going on\r\n final ProgressDialog progressDialog = new ProgressDialog(this);\r\n progressDialog.setTitle(\"Uploading\");\r\n progressDialog.show();\r\n FirebaseAuth fAuth;\r\n fAuth = FirebaseAuth.getInstance();\r\n String userId =fAuth.getCurrentUser().getUid();\r\n String path = \"uploads\"+ \"/\" +university + \"/\" +course + \"/\" + teacher+ \"/\" + year+ \"/\" + semester + \"/\" + userId;\r\n// String path = \"uploads\"+ \"/\" +editInput(university.getText().toString()) + \"/\" +editInput(course.getText().toString()) + \"/\" +\r\n// editInput(teacher.getText().toString()) + \"/\" + year.getText().toString() + \"/\" + simester.getText().toString().toLowerCase() + \"/\" + userId;\r\n\r\n// MimeTypeMap.getFileExtensionFromUrl(filePath.toString())\r\n// StorageReference riversRef = mStorageRef.child(\"uploads\").child(university.toString()).child(teacher.toString()).child(course.toString()).child(year.toString()).child(simester.toString()).child(MimeTypeMap.getFileExtensionFromUrl(filePath.toString()));\r\n StorageReference riversRef = mStorageRef.child(path+\".pdf\" );\r\n riversRef.putFile(filePath)\r\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\r\n @Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\r\n //if the upload is successfull\r\n //hiding the progress dialog\r\n progressDialog.dismiss();\r\n updateRealTimeDB(userId, path);\r\n\r\n //and displaying a success toast\r\n finish();\r\n\r\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception exception) {\r\n //if the upload is not successfull\r\n //hiding the progress dialog\r\n progressDialog.dismiss();\r\n\r\n //and displaying error message\r\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\r\n }\r\n })\r\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\r\n @Override\r\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\r\n //calculating progress percentage\r\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\r\n\r\n //displaying percentage in progress dialog\r\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\r\n }\r\n });\r\n }\r\n //if there is not any file\r\n else {\r\n Toast.makeText(getApplicationContext(), \"File not found \", Toast.LENGTH_LONG).show(); }\r\n }" ]
[ "0.71406627", "0.680739", "0.6656118", "0.65600365", "0.6484079", "0.64191145", "0.62847763", "0.62523395", "0.6195425", "0.6186152", "0.6169637", "0.61608666", "0.6157582", "0.61488235", "0.61250407", "0.61210823", "0.6119328", "0.60656154", "0.6051018", "0.60454315", "0.6044404", "0.6036936", "0.6012858", "0.60120666", "0.59946287", "0.5988923", "0.5980342", "0.5958972", "0.59565693", "0.5954856", "0.5921677", "0.5909758", "0.5879909", "0.58664376", "0.5842394", "0.5825723", "0.5803484", "0.5791923", "0.57410663", "0.5738552", "0.5735306", "0.57315904", "0.5728746", "0.5721685", "0.5711414", "0.5704388", "0.56962436", "0.5691354", "0.5690084", "0.56876475", "0.56847984", "0.568453", "0.56841713", "0.5679635", "0.5674225", "0.56673527", "0.56657326", "0.5664546", "0.56643003", "0.5663615", "0.5658914", "0.565757", "0.5656683", "0.5656163", "0.5655507", "0.56381", "0.5621926", "0.5620512", "0.56193167", "0.5618532", "0.5617409", "0.56135195", "0.5613347", "0.56114066", "0.56028724", "0.55999964", "0.55901426", "0.55830836", "0.558042", "0.5576927", "0.55649066", "0.5564092", "0.5560811", "0.55603683", "0.5552366", "0.55521214", "0.5551549", "0.5551169", "0.55497485", "0.5548088", "0.554556", "0.5539752", "0.55388486", "0.5536746", "0.55322266", "0.5518593", "0.55182076", "0.5514764", "0.5509186", "0.5502162", "0.5498455" ]
0.0
-1
fUNCION QUE CONTROLA QUE NO HAYA _ Y ASI SABER SI HEMOS TERMINADO
private static boolean mirarSiTerminado(char[] a) { boolean terminado = true; for (int i = 0; i <= a.length - 1; i++) {// COMPRUEBO QUE NO HAYA '_' if (a[i] == '_') { terminado = false; break; } } return terminado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "public void terminaCansancio(){\n \tthis.fuerza = 100; \n }", "static boolean continuar(){\r\n\t\tchar respuesta = Teclado.leerCaracter(\"¿Desea continuar? (s/n): \");\r\n\t\tif (respuesta == 's' || respuesta == 'S')\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public void acaba() \n\t\t{\n\t\t\tsigo2 = false;\n\t\t}", "@Action\n public void fecharTela()\n {\n try\n {\n float valor = sv.nfMoeda.parse( ftfEncaminhado.getText() ).floatValue();\n if ( valor < 0 )\n {\n JOptionPane.showMessageDialog( sv.getComponent(), \"O valor encaminhado não pode ser negativo. Tente novamente.\", \"Resultados\", JOptionPane.WARNING_MESSAGE );\n ftfEncaminhado.setText( \"\" );\n ftfEncaminhado.grabFocus();\n }\n else\n {\n bOk.grabFocus();\n jornada.setEncaminhamento( valor );\n bd.realizarEncaminhamento( valor );\n }\n }\n catch ( ParseException ex )\n {\n JOptionPane.showMessageDialog( sv.getComponent(), \"Valor informado inválido. Tente novamente.\", \"Resultados\", JOptionPane.WARNING_MESSAGE );\n Logger.getLogger( TelaResultadoJornada.class.getName() ).log( Level.SEVERE, null, ex );\n }\n catch ( SQLException e )\n {\n JOptionPane.showMessageDialog( sv.getComponent(), \"Erro ao escrever valor encaminhado no banco de dados. Informe ao responsável.\", \"Resultados\", JOptionPane.WARNING_MESSAGE );\n }\n\n // Rotina de fechamento:\n int resposta = JOptionPane.showConfirmDialog( painelPrincipal,\n \"Confirma o encaminhameto de \" + ftfEncaminhado.getText() + \" para a matriz?\",\n \"Resultados\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE );\n\n if ( resposta == JOptionPane.YES_OPTION )\n {\n resposta = JOptionPane.showConfirmDialog( painelPrincipal,\n \"Os dados de quantidade e valor vendido de cada produto foram anotados?\",\n \"Resultados\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE );\n\n if ( resposta == JOptionPane.YES_OPTION )\n {\n try\n {\n bd.setEncaminhamento( jornada );\n float novoCaixa = jornada.getCaixaFinal() - jornada.getEncaminhamento();\n sv.sugerirCaixaInicial( novoCaixa );\n dispose();\n }\n catch ( SQLException ex )\n {\n JOptionPane.showMessageDialog( painelPrincipal,\n \"Erro ao gravar valor encaminhado no banco de dados. Informe o responsável.\",\n \"Resultados\",\n JOptionPane.WARNING_MESSAGE);\n Logger.getLogger( TelaResultadoJornada.class.getName() ).log( Level.SEVERE, null, ex );\n } \n }\n }\n }", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "public void cambieSentido() {\n\t\tsentidoLR=(!sentidoLR);\n\t}", "public static void tienda(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int opcionCompra; //variables locales a utilizar\n Scanner scannerDos=new Scanner(System.in);\n //mostrando en pantalla las opciones de la tienda\n System.out.println(\"Bienvenido a la tienda, que deceas adquirir:\\n\");\n\tSystem.out.println(\"PRODUCTO \\tPRECIO \\tBENEFICIO\");\n\tSystem.out.println(\"1.Potion \\t50 oro \\tcura 25 HP\");\n\tSystem.out.println(\"2.Hi-Potion\\t100 oro \\tcura 75 HP\");\n\tSystem.out.println(\"3.M-Potion \\t75 oro \\trecupera 10 MP\");\n //ingresando numero de opcion\n System.out.println(\"\\n\\nIngrese numero de opcion:\");\n opcionCompra=scannerDos.nextInt();\n //comparando la opcion de compra\n switch(opcionCompra){\n case 1:{//condicion de oro necesario para el articulo1 \n\t\t\tif(oro>=50){\n articulo1=articulo1+1;\n System.out.println(\"compra exitosa\");\n }else {\n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t\tcase 2:{//condicion de oro necesario para el articulo2\n if(oro>=100){\n articulo2=articulo2+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t default:{//condicion de oro necesario para el articulo3\n if(oro>=75){\n articulo3=articulo3+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\"); //poner while para ,ejora\n \t\t}\n break;\n }\n }\n }", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "public void IngresarGasolina() throws InterruptedException{\n System.out.println(\"Buen dia, lo atiende \"+nombre+\". Ingrese por favor la cantidad de litros que desea\");\r\n String litros = sc.nextLine();\r\n System.out.println(\"Muy bien\");\r\n Thread.sleep(1000);\r\n String tipo = null;\r\n do{\r\n System.out.println(\"¿Que tipo de gasolina desea?, indique magna o premium\");\r\n tipo = sc.nextLine();\r\n }while((!tipo.equalsIgnoreCase(\"magna\"))&&(!tipo.equalsIgnoreCase(\"premium\")));\r\n System.out.println(\"Por favor abra la tapa para ingresar la manguera\");\r\n Thread.sleep(2000);\r\n System.out.println(\"Se ha ingresado la manguera al carro\");\r\n Thread.sleep(2000);\r\n System.out.println(\"Inicia el deposito de gasolina\");\r\n Thread.sleep(2000);\r\n System.out.println(\"Se han cargado los \"+litros+\" que pidio\");\r\n \r\n }", "private static void imprimirMensajeEnPantalla() {\n\tSystem.out.println(\"########### JUEGO EL AHORCADO ###########\");\n\timprimirAhorcado(intentosRestantes);\n\tSystem.out.println(\"\\nPALABRA ACTUAL: \" + getPalabraActualGuionBajo());\n\tSystem.out.println(\"INTENTOS RESTANTES: \" + intentosRestantes);\n\t}", "public static void poder(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n if(experiencia>=100){ //condicion de aumento de nivel\n nivel=nivel+1;\n System.out.println(\"Aumento de nivel exitoso\");\n }\n else{\n System.out.println(\"carece de experiencia para subir su nivel\");\n }\n }", "private void xuLyThemSD(){\n if (checkNgay(txtNgaySD.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải thuộc dạng [YYYY-MM-DD].\\n Vui lòng kiểm tra lại!\");\n txtNgaySD.requestFocus();\n return;\n }//kiem tra ngay su dung\n \n if (checkGia(txtGiaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải là ký tự số.\\n Vui lòng kiểm tra lại!\");\n txtGiaDV.requestFocus();\n return;\n }//kiem tra gia dich vu\n \n \n SuDungService suDungService = new SuDungService();\n int x = suDungService.themSuDung(cbbMaDV.getSelectedItem().toString(),\n cbbMaKH.getSelectedItem().toString(),\n txtNgaySD.getText(), Float.valueOf(txtGiaDV.getText()));\n \n if (x>0){\n hienThiSuDung();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n cbbMaDV.requestFocus();\n return;\n }\n }", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public String accionemergencia(){\n\t\tString resp=\"\";\n\t\tif(puntosvida<=5 && acc!=1){\n\t\t\tpuntosvida=puntosvida+15;\n\t\t\tresp=\"\\nAccion de emergencia \"+ tipo +\"activada vida +15\";\n\t\t\tacc=1;\n\t\t}\n\t\treturn resp;\n\t}", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "public void primerTicketDisponibleEncontrado() {\n\t\tprimerTicketDisponible();\n\t\tint f; int c;\n\t\tString ticket = primerTicketDisponible();\n\t\tString[] dividir = ticket.split(\" \");\n\t\tString fila = dividir[0];\n\t\tString columna = dividir[1];\n\t\tSystem.out.println(fila);\n\t\tSystem.out.println(columna);\n\t\tf = Integer.parseInt(fila);\n\t\tc = Integer.parseInt(columna);\n\t\tactualizarPlazas(f, c);\n\t}", "public static String IngresarRazaCorrecta (){\n boolean condicion;\r\n int razaPerro;\r\n String razaElegida=\"\";\r\n do {\r\n MenuRaza();\r\n razaPerro = TecladoIn.readLineInt();\r\n if ((razaPerro > 0) && (razaPerro < 13)) {\r\n razaElegida=TiposDeRaza(razaPerro - 1);\r\n condicion = true;\r\n } else {\r\n System.out.println(\"Ingrese una raza Correcta del 1 al 12.\");\r\n System.out.println(\".........................................\");\r\n condicion = false;\r\n }\r\n } while (condicion != true);\r\n return razaElegida;}", "private void chkKeyPressed(KeyEvent e) {\n\t\tif (UtilityPtoVenta.verificaVK_F1(e)) // Reservado para ayuda\n\t\t{\n\t\t} else if (UtilityPtoVenta.verificaVK_F11(e)) {\n \n boolean valor=true;\n if (datosValidados()){\n //JCORTEZ 14.03.09 solo para tipo ticket no se podra modificar la cola de impresion con una que ya exista\n if (VariablesImpresoras.vTipoComp.trim().equalsIgnoreCase(ConstantsPtoVenta.TIP_COMP_TICKET)){\n if(!validaRuta()){\n FarmaUtility.showMessage(this,\"No se puede asignar una ruta de impresion que ya existe.\",txtColaImpresion);\n valor=false;\n }\n }\n if(valor)\n if (JConfirmDialog.rptaConfirmDialog(this,\"¿Está seguro que desea grabar los datos ?\")) {\n try {\n if (existenDatos) {\n actualizarImpresora();\n } else {\n insertarImpresora();\n actualizaNumeracionImpresoras();\n }\n\n FarmaUtility.aceptarTransaccion();\n FarmaUtility.showMessage(this,\"La operación se realizó correctamente\",txtDescImpresora);\n\n } catch (SQLException ex) {\n FarmaUtility.liberarTransaccion();\n FarmaUtility.showMessage(this,\"Error al grabar datos de la impresora: \\n\"+ ex.getMessage(), txtDescImpresora);\n log.error(\"\",ex);\n\n }\n cerrarVentana(true);\n }\n }\n\n\t\t} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\tcerrarVentana(false);\n\t\t}\n\n\t}", "public void Entrada(int cantidad) {\n if(cantidad*-1>this.stock) {\n System.out.println(\"La cantidad a retirar es mayor que la que hay en stock, no es posible hacer la operacion.\");\n }else {\n this.stock+=cantidad;\n }\n }", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }", "public void renovarBolsa() {\n\t\tSystem.out.println(\"Bolsa renovada com suceso!\");\n\t}", "private void matar() {\n dead = true;\n tareaRestar.cancel();\n ventana.matar();\n\n juego.getFabricaE().seguir();\n\n ventana.dispose();\n }", "public void quemaRueda() {\n System.out.println(\"¡Huele a plástico quemado de tanto quemar ruedas!\");\n }", "private static void cajas() {\n\t\t\n\t}", "private void agregarDiccionario(Palabra palabra){\n if (!dic.contiene(palabra)) {\n boolean su = sugerencia(palabra);\n if(su){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea agregar: ´\"+palabra.getCadena()+\"´ al diccionario?\", \"Agregar!\", JOptionPane.YES_NO_OPTION);\n if (d == 0) \n dic.agrega(palabra);\n }\n }else {\n JOptionPane.showMessageDialog(null,\"--La palabra ya se encuentra en el diccionario.--\\n --\"+dic.busca(palabra).toString());\n }\n }", "public void main(String[] args) {\n \n Scanner entrada = new Scanner(System.in); \n String nombre;\n \n System.out.println(\"¿Cual es tu Nombre? \");\n nombre = entrada.nextLine();\n mensaje(nombre);\n \n \n \n imprimir(28, 12);\n imprimir(67, 6);\n imprimir(84, 16);\n imprimir(57, 23);\n imprimir(92, 12);\n \n \n\n \n int resultado=sumar(1, 2);\n System.out.println(\n concatenar(\"El resultado es\", \"\" +resultado));\n \n int resultado2= sumar(sumar(1, 2), 7);\n\n boolean mayor= comprobar(resultado2);\n \nif(comprobar(resultado2))\n System.out.println(\"Es mayor\");\n else\n System.out.println(\"No es mayor\");\n}", "public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }", "public void carroAgregado(){\n System.out.println(\"Su carro fue agregado con exito al sistema\");\n }", "public void cliquerSauverContinuer() {\r\n\t\t\t\r\n\t\t\t//Identification du bouton et clic\r\n\t\t\tWebElement boutonSaveContinue = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//table[@id='\"+prefix()+\"y5-box']/tbody/tr[2]/td[2]\")));\r\n\t\t\tboutonSaveContinue.click();\r\n\t\t}", "private void xuLyThanhToanDichVu() {\n if(checkGia(txtThanhToanDVSoLuongCu.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongCu.requestFocus();\n return;\n }//Kiem tra so luong cu\n \n if(checkGia(txtThanhToanDVSoLuongMoi.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongMoi.requestFocus();\n return;\n }//kiem tra so luong moi\n \n float soLuongCu = Float.valueOf(txtThanhToanDVSoLuongCu.getText().trim());\n float soLuongMoi = Float.valueOf(txtThanhToanDVSoLuongMoi.getText().trim());\n float soLuong = soLuongMoi - soLuongCu;\n txtThanhToanDVSoLuong.setText(soLuong+\"\");\n tongCong += soLuong * Float.valueOf(txtThanhToanDVGiaDV.getText().trim());\n txtThanhToanTongCong.setText(tongCong+\" VNĐ\");\n \n }", "private void almacenarFallos() {\n BaseDatos bd = new BaseDatos(this);\n// Log.i(\"FALLOS\",\"Nmero de fallos final: \"+fallos);\n bd.updatePalabra(palabraActual.getId(),fallos);\n\n bd.close();\n }", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\r\n\t}", "public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }", "private void trocaFase() {\n\n\t\tif (score == mudaFase && fase == 1) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 2) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 3) {\n\t\t\tJOptionPane.showMessageDialog(null, \"VOCÊ VENCEU, PARABÉNS!\");\n\t\t\tint continuar;\n\t\t\tcontinuar = JOptionPane.showConfirmDialog(null, \"Deseja jogar novamente?\", \"Game Over\",\n\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\tif (continuar == 0) {\n\t\t\t\tfase = 1;\n\t\t\t\tvida += 3;\n\t\t\t\tmudaFase += valorDeFase;\n\t\t\t\tpaddle.paddleInicio();\n\t\t\t\tbola.bolaInicio();\n\t\t\t\tmove = false;\n\t\t\t\tcriaBlocos();\n\t\t\t} else {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} // fecha else if\n\t}", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void confirmar(){\r\n if((gato[0][0]==gato[0][1])&&(gato[0][0]==gato[0][2])&&(gato[0][0]!=' ')){\r\n //si encuentra alguna victoria la variable ganador agarra el simbolo del ganador 'o' o 'x'\r\n //para confirmar quien gano\r\n ganador=gato[0][0];\r\n //es lo que tomara tirar para salir del while si hay una victoria\r\n victoria=1; \r\n \r\n }\r\n\r\n if((gato[1][0]==gato[1][1])&&(gato[1][0]==gato[1][2])&&(gato[1][0]!=' ')){\r\n ganador=gato[1][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[2][1])&&(gato[2][0]==gato[2][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][0])&&(gato[0][0]==gato[2][0])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][1]==gato[1][1])&&(gato[0][1]==gato[2][1])&&(gato[0][1]!=' ')){\r\n ganador=gato[0][1];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][2]==gato[1][2])&&(gato[0][2]==gato[2][2])&&(gato[0][2]!=' ')){\r\n ganador=gato[0][2];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][1])&&(gato[0][0]==gato[2][2])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[1][1])&&(gato[2][0]==gato[0][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n }", "public static void main(String[] args) {\n \n String palabaras[], palabraSelected=\"\";\n char juego[];\n char letra; \n char seguir; \n \n \n //puede volver a jugar.\n //con las palabras que no ha salido. Gastando palabras\n //en caso de no existir palabra terminar el juego e indicar el mensaje respectivo.\n\n\n do {\n aciertos=0; errores=0;\n bandera=false;\n\n palabaras= leerArchivo();\n \n if(palabaras.length==0){\n System.out.println(\"No se puede jugar porque no hay palabras\");\n break; \n }\n\n \n \n String nombre= palabaras[0].substring(0,18).trim().toUpperCase();\n\n String pa= String.format(\"%1$-20s\", \"walter\");\n System.out.println(pa.length());\n\n // escribirLineaArchivo(palabaras);\n \n //obtenerPalabra\n //random para obtener la palabara\n \n palabraSelected= obtenerPalabra(palabaras);\n //palabraSelected= palabraSelected.toUpperCase();\n \n //obtnerVectorJuego\n //instacia del venctor juego con el tamaño de la palabra seleccionada\n juego= obtenerVectorJuego(palabraSelected);\n \n /*//1 manera apata de llenar el vector juego con la palabra seleccinada\n for(int i=0; i<palabraSelected.length(); i++){\n \n juego[i]=palabraSelected.charAt(i);\n \n }\n */\n \n //segunda manera\n\n /* if(!palabraSelected.equals(\"fdd\")){\n\n\n }*/\n \n System.out.println(\"BIENVENIDO AL JUEGO DEL AHORCADO..\"); \n \n do {\n \n bandera=false;\n //imprimirJuego\n imprimirJuego(palabraSelected, juego);\n \n letra = solicitarLetra();\n \n //validarLetra\n validarLetra(letra, juego);\n \n //imprimirResultado\n imprimirResultado();\n \n \n } while (aciertos!=juego.length && errores!=7);\n \n \n //imprimirResultadoFinal\n imprimirResultadoFinal(juego, palabraSelected);\n\n\n\n System.out.println(\"Desea volver a jugar(S/N)? \"); \n seguir= scan.next().toUpperCase().charAt(0);\n \n eliminarPalabraArchivo(palabraSelected, palabaras);\n \n\n\n\n\n } while (seguir=='S');\n }", "public boolean Victoria(){\n boolean respuesta=false;\n if(!(this.palabra.contains(\"-\"))&& this.oportunidades>0 && !(this.palabra.isEmpty())){\n this.heGanado=true;\n respuesta=true;\n }\n return respuesta;\n }", "@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}", "public static void saludo(){\n System.out.println(\"Bienvenido al Sistema\");\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "private void vuoronToinenHeitto() {\n while (heittojaJaljella == 2) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole heitetty tai laitettu tulosta\");\n }\n }\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "@Test\n\tpublic void deveAtualizarSaldoAoEcluirMovimentacao(){\n\t\tAssert.assertEquals(\"534.00\", home.obterSaldoConta(\"Conta para saldo\"));\n\t\t\n\t\t//ir para resumo\n\t\tmenuSB.acessarResumo();\n\t\t\n\t\t//excluir Movimentacao 3\n\t\tresumo.excluirMovimentacao(\"Movimentacao 3, calculo saldo\");\n\t\t\n\t\t//validar a mensagem \"Movimentação removida com sucesso\"\n\t\tAssert.assertTrue(resumo.existeElementoPorTexto(\"Movimentação removida com sucesso!\"));\n\t\t\n\t\t//voltar home\n\t\tmenuSB.acessarHome();\n\t\t\n\t\t//atualizar saldos\n\t\tesperar(1000);\n\t\thome.scroll(0.2, 0.9);\n\t\t\n\t\t//verificar saldo = -1000.00\n\t\tAssert.assertEquals(\"-1000.00\", home.obterSaldoConta(\"Conta para saldo\"));\n\t}", "public void anulaAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAnulaAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n int CodRad = mBRadicacion.Radi.getCodAvaluo();\r\n mBRadicacion.Radi.AnulaRadicacion(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"El Avaluo N*: \" + CodRad + \" ha sido anulada\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n mbTodero.resetTable(\"FormMisAsignados:RadicadosSegTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".anulaAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "public void aceptarAction (ActionEvent event){\r\n cadena+=hilera.getText();\r\n escribirHilera.setText(cadena);\r\n hilera.setText(\"\");\r\n hilera.setVisible(false);\r\n aceptar.setDisable(true);\r\n hileraNula.setDisable(false);\r\n hileraNoNula.setDisable(false);\r\n concatenar.setDisable(false);\r\n union.setDisable(false);\r\n abreParentesis.setDisable(true);\r\n finSecuencia.setDisable(true);\r\n if(contadorParentesis>0){\r\n cierraParentesis.setDisable(false);\r\n }\r\n }", "public void encerrarJogo(){\n if (isAndamento()) {\n situacao = SituacaoJogoEnum.ENCERRADO;\n }\n }", "public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }", "public void eisagwgiAstheni() {\n\t\t// Elegxw o arithmos twn asthenwn na mhn ypervei ton megisto dynato\n\t\tif(numOfPatient < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tpatient[numOfPatient] = new Asthenis();\n\t\t\tpatient[numOfPatient].setFname(sir.readString(\"DWSTE TO ONOMA TOU ASTHENH: \")); // Pairnei to onoma tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU ASTHENH: \")); // Pairnei to epitheto tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setAMKA(rnd.nextInt(1000000)); // To sistima dinei automata ton amka tou asthenous\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t//Elegxos monadikotitas tou amka tou astheni\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tif(patient[i].getAMKA() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfPatient++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS ASTHENEIS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "public String procesarPrestamo(int carneEstudiante, String codigoLibro, Date fechaPrestamo, boolean validarCantidadCopias) {\n //PASO 1----------------------------------------------------------------------------------------------------\n if (!buscarEstudiante(carneEstudiante)) {\n return \"El estudiante no se encuentra registrado en el sistema\";\n } \n //PASO 2----------------------------------------------------------------------------------------------------\n else {\n if (comprobarLibrosPrestados(estudiante)) {\n return \"Se ha llegado al limite de prestamos por estudiante\";\n }\n //PASO 3---------------------------------------------------------------------------------------------------- \n else {\n if (!buscarLibro(codigoLibro)) {\n return \"El libro no se encuentra registrado en el sistema\";\n }\n //PASO 4---------------------------------------------------------------------------------------------------- \n else {\n if(validarCantidadCopias){\n \n if (!comprobarExistencias(libro)) {\n return \"Se han agotado las existencias del libro solicitado\"; \n }\n }\n //PASO 5---------------------------------------------------------------------------------------------------- \n fechaLimitePrestamo = manejadorFechas.sumarDias(fechaPrestamo,2); \n prestamo = new Prestamo(0,libro.getCodigo(), estudiante.getCarne(), fechaPrestamo, fechaLimitePrestamo,true, 0,0);\n guardarPrestamo(prestamo);\n agregarListado(estudiante, prestamo);\n if(validarCantidadCopias){\n disminuirCantidad(libro);\n }\n return \"Prestamo Realizado Exitosamente\"; \n } \n }\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Instrucciones: \" + \"\\n1. Has de darle al boton iniciar juego \"\n\t\t\t\t\t\t+ \"\\n2. Aparecen los espacios de las letras de una palabra oculta \"\n\t\t\t\t\t\t+ \"\\n3. Has de adivinar la palabra pulsando en el teclado de palabras que hay abajo \"\n\t\t\t\t\t\t+ \"\\n4. Si te equivocas, el ahorcado se ira completando \"\n\t\t\t\t\t\t+ \"\\n5. Tienes 10 intentos antes de que se complete el ahorcado \"\n\t\t\t\t\t\t+ \"\\n6. Puedes usar las pistas las cuales te descubriran una letra, tienes una pista por partida\"\n\t\t\t\t\t\t+ \"\\n7. al principio del juego puedes elegir hasta 5 vidas, cada vez que solicitas una pista perderas una vida \"\n\t\t\t\t\t\t+ \"\\n8. cada vez que pierdes la partida, perderas una vida \");\n\n\t\t\t}", "public void comprobarEstado() {\n if (ganarJugadorUno = true) {\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (ganarJugadorDos = true) {\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tirar == 9 && !ganarJugadorUno && !ganarJugadorDos) {\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }", "public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }", "public static void batalla(){\n\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int turno; //declaracion de variables locales a utilizar\n int numeroAleatorio;\n int numeroAleatorio2;\n int ataqueEnemigo;\n int experienciaGanada;\n int oroGanado;\n String enemigo;\n Random aleatorio = new Random();//declarando variables tipo random para aleatoriedad\n Random aleatorio2 = new Random();\n Random aleatorio3 = new Random();\n //Inicializando la batalla\n System.out.println(\"...Bienvenido a la batalla...\");\n System.out.println(\"El turno de atacar es aleatorio.\");\n //eligiendo al oponente en battalla mediante el llamado de la funcion enemigos\n enemigo = enemigos();\n System.out.printf(\"\\nTu oponente es: \"+enemigo);\n //eligiendo turno aleatorio si es 1 inicia enemigo, si es 2 inicia jugador\n turno = (aleatorio.nextInt(2)+1);\n do{//condicion si primer turno es del jugador\n if(turno%2==0){\n turnoJugador();//llamando a funcion turnoJugador \n\t\t\t\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n \t\tSystem.out.flush(); \n }\n else{\n System.out.println(\"\\nturno de:\"+enemigo);\n ataqueEnemigo= turnoEnemigo(enemigo);//enviando parametro enemigo\n puntosDeVida= puntosDeVida-ataqueEnemigo;//descontando vida a jugador \n } \n turno=turno+1;//contador para los turnos correspondientes\n //validando la continuidad del juego mediante los puntos de vida.\n }while(puntosDeVida>0 && puntosDeVidaEnemigo>0&&opcionMiedo!=1);\n\n if(opcionMiedo!=1){//condicion de huida del jugador \n \t//condicion si el ganador de la battala es el Jugador\n \tif(puntosDeVida>puntosDeVidaEnemigo){\n \t\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n \t\tSystem.out.flush();\n \t\tSystem.out.println(\"Ganador de la batalla: \"+nombrePersonaje);\n \t//sumando los atributos ganados en battala\n \t\tnumeroAleatorio = (aleatorio2.nextInt(30-20+1)+20);\n \t\texperienciaGanada= ((nivel+1)*10)+numeroAleatorio;\n \t\texperiencia=experiencia+experienciaGanada;\n \n \t\tnumeroAleatorio2 = (aleatorio3.nextInt(45-15+1)+15);\n \t\toroGanado= ((nivel+1)*10)+numeroAleatorio2;\n \t\toro=oro+oroGanado;\n \t//imprimiendo los atributos ganados en batalla\n \t\tSystem.out.println(\"Oro Ganado: \"+oroGanado);\n \t\tSystem.out.println(\"experiencia Ganada: \"+experienciaGanada);\n \t//reiniciando la vida a los enemigos\n \t\tpuntosDeVidaEnemigo=0;\n \t//contador de derrotas para los enemigos disponibles\n\t\t\tswitch(enemigo){\n\t\t\t\tcase \"Dark_Wolf\":{\n \t\tenemigoVencido1=enemigoVencido1+1;\n \tbreak;\n \t\t}\n \tcase \"Dragon\":{\n \t\tenemigoVencido2=enemigoVencido2+1;\n \tbreak;\n \t\t}\n \tdefault:{\n enemigoVencido3=enemigoVencido3+1;\n break;\n }\n }\n }\n \telse{//mostrando al enemigo ganador en pantalla\n \t\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n \t\tSystem.out.flush();\n \t\tSystem.out.println(\"Ganador de la batalla: \"+enemigo);\n \t\t//reiniciando las caracteristicas principales al jugador\n \t\tpuntosDeVida=150;\n \t\tpuntosDeMana=10;\n \t\tnivel=0;\n \t\texperiencia=0;\n \t\toro=0;\n \t\tarticulo1=0;\n \t\tarticulo2=0;\n \t\tarticulo3=0;\n \t\tenemigoVencido1=0;\n \t\tenemigoVencido2=0;\n \t\tenemigoVencido3=0;\n }\n }else{\n\t\t\tSystem.out.println(\"Huiste de la batalla!!!\");\n\t\t\tSystem.out.println(\"oro perdido:\"+oroPerdido);\n\t\t\tpuntosDeVidaEnemigo=0;}//reiniciando solo la vida del enemigo despues de la huida del jugador\n }", "@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}", "public void preguntarDespegue(){\n String respuesta = this.mediador.preguntarDespegue(this);\n System.out.println(respuesta);\n if (respuesta==\"SI\"){\n this.setPosicion(1);\n this.indicarEstado(\"Preparando para el despegue\");\n }\n }", "public void actionPerformed(ActionEvent evento){//este es el unico metodo que hay que implementer de la interfaz actionlistener\n\t\t\t//lo siguiente es el evento que se desencadena cada ves que se cumpla e tiempo del temporizador\n\t\t\tDate hora=new Date();//se crea un objeto de tipo date\n\t\t\t\n\t\t\tSystem.out.println(\"la hora del sistema es: \" + hora);\n\t\t\t\n\t\t\tif(sonido){//se evalua el valor de la variable booleana, no es necesario realizar comparacion en las variables booleanas\n\t\t\t\t\n\t\t\t\tToolkit.getDefaultToolkit().beep(); //esta metodo ejecuta un bip\n\t\t\t}\n\t\t}", "public void ingresaAdministrativo() {\n\tEstableceDatosAdministrativos();\n\tint cambio=0;\n\tdo {\n\t\t\n\t\ttry {\n\t\t\tsetMontoCredito(Double.parseDouble(JOptionPane.showInputDialog(\"Ingrese el monto del credito (�3 600 000 maximo)\")));\n\t\t\tcambio=1;\n\t\t\tif(getMontoCredito()<0||getMontoCredito()>3600000) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El monto debe ir de �0 a �3600000\");\n\t\t\t}\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese solo numeros\");\n\t\t}\n\t}while(getMontoCredito()<0||getMontoCredito()>3600000||cambio==0);\n\tsetInteres(12);\n\tsetPlazo(60);\n\tsetCuotaPagar(calculoCuotaEspecialOrdinario());\n\testableceEquipoComputo();\n}", "public void nace() {\n System.out.println(\"Ostia, acabo de nacer tío.\");\n }", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}", "public void anazitisiSintagisVaseiGiatrou() {\n\t\tString doctorName = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tdoctorName = sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \"); // Zitaw apo ton xrhsth na mou dwsei to onoma tou giatrou pou exei grapsei thn sintagh pou epithumei\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tif(doctorName.equals(prescription[i].getDoctorLname())) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou exei grapsei o giatros\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t// Emfanizw thn/tis sintagh/sintages pou exoun graftei apo ton sygkekrimeno giatro\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON IATRO ME EPWNYMO: \" + doctorName);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private static void saluti() {\n\t\tUtilityIO.header(MSG_CHIUSURA, SIMBOLO_MESSAGGIO_BENV_USCITA);\n\t\tSystem.out.println();\n\t}", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "public boolean HayObstaculo(int avenida, int calle);", "public synchronized void abilitarAbordaje() {\n abordar = true;\r\n notifyAll();\r\n while(pedidoAbordaje != 0){//Mientras los pasajeros esten abordando\r\n try {\r\n wait();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Vuelo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n //Cuando los pasajeros hayan abordado el vuelo sale\r\n salio = true;\r\n System.out.println(\"El vuelo \" + nro + \" de \" + aerolinea + \" ha despegado\");\r\n }", "public String elegirtipoqueso(){\n //es un metodo void, o string?\n \n Scanner entrada = new Scanner(System.in);\n int queso;\n System.out.println(\"Elije el queso que deseas\");\n System.out.println(\"1.- Parmesano\");\n System.out.println(\"2.- Mozzalera\");\n queso = entrada.nextInt();\n if (queso==1){\n \n Scanner entrada2 = new Scanner(System.in);\n System.out.println(\"¿Cuantas pizzas deses comprar?\");\n int valor2 = entrada2.nextInt();\n int tamano;\n int c1=75*valor2,m1=89*valor2,g1=112*valor2,f1=135*valor2;\n System.out.println(\"Elije el tamaño\");\n System.out.println(\"1.- Chica \"+c1/valor2+\"$\"); \n System.out.println(\"2.-Mediana \"+m1/valor2+\"$\"); \n System.out.println(\"3.-Grande \"+g1/valor2+\"$\");\n System.out.println(\"4.-Familiar \"+f1/valor2+\"$\");\n tamano = entrada2.nextInt();\n String t2 = String.valueOf(tamano);\n if (tamano==1){\n System.out.println(\"La pizza se corta en 4 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+c1+\"$\");\n }\n else if(tamano==2){\n System.out.println(\"La pizza se corta en 8 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+m1+\"$\");\n }\n else if(tamano==3){\n System.out.println(\"La pizza se corta en 12 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+g1+\"$\");\n }\n else if(tamano==4){\n System.out.println(\"La pizza se corta en 16 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+f1+\"$\");\n }\n return t2;\n }\n if (queso==2){\n Scanner entrada3 = new Scanner(System.in);\n int tamano2;\n System.out.println(\"¿Cuantas pizzas desea comprar?\");\n int valor2 = entrada3.nextInt();\n int c2=89*valor2,m2=115*valor2,g2=135*valor2,f2=175*valor2;\n System.out.println(\"Elije el tamaño\");\n System.out.println(\"1.- Chica \"+c2/valor2+\"$\"); \n System.out.println(\"2.-Mediana \"+m2/valor2+\"$\"); \n System.out.println(\"3.-Grande \"+g2/valor2+\"$\");\n System.out.println(\"4.-Familiar \"+f2/valor2+\"$\");\n tamano2 = entrada3.nextInt();\n String t2 = String.valueOf(tamano2);\n if (tamano2==1){\n System.out.println(\"La pizza se corta en 4 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+c2+\"$\");\n }\n else if(tamano2==2){\n System.out.println(\"La pizza se corta en 8 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+m2+\"$\");\n }\n else if(tamano2==3){\n System.out.println(\"La pizza se corta en 12 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+g2+\"$\");\n }\n else if(tamano2==4){\n System.out.println(\"La pizza se corta en 16 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+f2+\"$\");\n }\n return t2;\n }\n String q = String.valueOf(queso);\n return q;\n }", "public void transQuest(){\n System.out.println(\"Que cantidad desea transferir?\");\n System.out.println(\"\");\n}", "public void anazitisiSintagisVaseiAstheni() {\n\t\tint amkaCode = 0;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tamkaCode = sir.readPositiveInt(\"EISAGETAI TO AMKA TOU ASTHENH: \"); // Zitaw apo ton xrhsth na mou dwsei ton amka tou asthenh pou thelei\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t\tif(amkaCode == prescription[i].getPatientAmka()) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou proorizetai gia ton sygkekrimeno asthenh\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t\tprescription[i].print(); // Emfanizw thn/tis sintagh/sintages oi opoies proorizontai gia ton sigkekrimeno asthenh\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\ttmp_2++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON ASTHENH ME AMKA: \" + amkaCode);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }", "private boolean jogadorTerminouAVez() {\n return this.terminouVez;\n }", "public static void main(String[] args) {\n Scanner Misca = new Scanner (System.in);\r\n \r\n Integer edad; //Mayor a 0 y menos a 100\r\n Integer sueldo; //mayor a 0\r\n String sexo; //f o m\r\n String tipoAlumno; // C: Cursante - E: Egresado - L:Libre\r\n Integer temperatura; //-200 y +200\r\n String respuesta; //si o no\r\n \r\n System.out.println(\" Ingrese sueldo : \");\r\n sueldo=Misca.nextInt();\r\n \r\n while (sueldo>0){\r\n \r\n System.out.println(\" Error, reingrese sueldo : \");\r\n sueldo=Misca.nextInt();\r\n \r\n }\r\n \r\n System.out.println(\" Ingrese edad : \");\r\n edad=Misca.nextInt();\r\n \r\n while (edad<1 || edad>100 ){\r\n \r\n System.out.println(\" Error, reingrese la edad : \");\r\n edad=Misca.nextInt();\r\n \r\n }\r\n \r\n System.out.println(\" Ingrese la temperatura : \");\r\n temperatura = Misca.nextInt();\r\n \r\n while (temperatura<-200 || temperatura>200){\r\n \r\n System.out.println(\" Error, reingrese la temperatura : \");\r\n temperatura=Misca.nextInt();\r\n \r\n }\r\n \r\n System.out.println(\" Ingrese su sexo : \");\r\n sexo=Misca.next();\r\n \r\n while (!sexo.equalsIgnoreCase(\"f\") && !sexo.equalsIgnoreCase(\"m\")){\r\n \r\n System.out.println(\" Error, reingrese su sexo : \");\r\n sexo = Misca.next();\r\n sexo=sexo.toLowerCase();\r\n \r\n }\r\n \r\n System.out.println(\"Ingrese si es Cursante[C], libre [L] o egresado [E]\");\r\n tipoAlumno=Misca.next();\r\n \r\n while(!tipoAlumno.equalsIgnoreCase(\"c\") && !tipoAlumno.equalsIgnoreCase(\"l\") && !tipoAlumno.equalsIgnoreCase(\"e\"))\r\n {\r\n System.out.println(\"Error, re Ingrese si es Cursante[C], libre [L] o egresado [E]\");\r\n tipoAlumno=Misca.next();\r\n \r\n }\r\n \r\n System.out.println(\"Ingrese respuesta\");\r\n respuesta=Misca.next();\r\n \r\n while(!respuesta.equalsIgnoreCase(\"si\") && !respuesta.equalsIgnoreCase(\"no\"))\r\n {\r\n System.out.println(\"Error, re Ingrese respuesta\");\r\n respuesta=Misca.next();\r\n }\r\n }", "public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }", "private String pedirCasilla(String mensaje) {\n char columna;\n int fila;\n String casilla;\n do {\n casilla = ManejoInfo.getTextoSimple(\"la casilla \" + mensaje);\n columna = casilla.charAt(0);\n fila = Character.getNumericValue(casilla.charAt(1));\n if (!validarColum(columna) && fila >= 9) {\n System.out.println(\"\\nIngrese una casilla valida!\\n\");\n }\n } while (!validarColum(columna) && fila >= 9);\n return casilla;\n }", "public String apavada_vriddhi(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA UNO**********\");\n Log.info(\"X_adi == \" + X_adi);\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta);\n // x.transform(X_anta); // anta is ITRANS equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi);\n // x.transform(X_adi); // adi is ITRANS equivalent\n\n Log.info(\"adi == \" + adi);\n\n String return_me = \"UNAPPLICABLE\";\n\n boolean bool1 = VowelUtil.isAkaranta(X_anta) && (adi.equals(\"eti\") || adi.equals(\"edhati\"));\n boolean bool2 = VowelUtil.isAkaranta(X_anta) && adi.equals(\"UTh\");\n\n // 203\n // **********IF****************//\n if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"f\")) // watch out!!! must\n // be SLP not ITRANS\n {// checked:29-6\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"f\" + strip2;\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRiti RRi vA vacanam\");\n comments.setSutraProc(\"hrasva RRikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"small RRi followed by small RRi merge to become small RRi.\\n\" + \"RRi + RRi = RRi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 204\n // **********IF****************//\n else if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"x\")) // watch out!!!\n // must be SLP\n // not ITRANS\n { // checked:29-6 // SLP x = ITRANS LLi\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"x\" + strip2; // SLP\n // x =\n // ITRANS\n // LLi\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"LLiti LLi vA vacanam\");\n comments.setSutraProc(\"hrasva LLikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \" RRi/RRI followed by small LLi merge to become small LLi.\\n RRi/RRI + LLi = LLi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 207a-b\n // **********ELSE IF****************//\n else if (bool1 || bool2)\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.86\");\n comments.setSutraPath(\"eti-edhati-UThsu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.sutra);\n\n String cond1 = \"akaara followed by declensions of 'iN', 'edha' and 'UTh\" + \"<eti/edhati/UTh> are replaced by their vRRiddhi counterpart.\\n\" + \"a/A/a3 + eti/edhati/UTha = VRRiddhi Counterpart.\\n\" + \"Pls. Note.My Program cannot handle all the declensions of given roots.\" + \"Hence will only work for one instance of Third Person Singular Form\";\n comments.setConditions(cond1);\n\n String cond2 = \"Blocks para-rupa Sandhi given by 'e~ni pararUpam' which had blocked Normal Vriddhi Sandhi\";\n\n if (bool1)\n comments.append_condition(cond2);\n else if (bool2) comments.append_condition(\"Blocks 'Ad guNaH'\");\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 208\n // **********ELSE IF****************//\n else if (anta.equals(\"akSa\") && adi.equals(\"UhinI\"))\n {// checked:29-6\n return_me = \"akzOhiRI\"; // u to have give in SLP..had\n // ITRANS....fixed\n // not sending to vrridhit_sandhi becose of Na-inclusion\n // vriddhi_sandhi(X_anta,X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // ***/vowel_notes.decrement_pointer();/***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"akSAdUhinyAm\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"akSa + UhinI = akshauhiNI.Vartika blocks guna-sandhi ato allow vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // 209\n // **********ELSE IF****************//\n else if (anta.equals(\"pra\") && (adi.equals(\"Uha\") || adi.equals(\"UDha\") || adi.equals(\"UDhi\") || adi.equals(\"eSa\") || adi.equals(\"eSya\")))\n // checked:29-6\n {\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"prAd-Uha-UDha-UDhi-eSa-eSyeSu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"upasarga 'pra' + <prAd/Uha/UDha/UDhi/eSa/eSya> = vRRiddhi-ekadesha.\" + \"\\nVartika blocks para-rupa Sandhi and/or guna Sandhi to allow vRRidhi-ekadesh.\";\n\n comments.setConditions(cond1);\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 210\n // **********ELSE IF****************//\n else if (anta.equals(\"sva\") && (adi.equals(\"ira\") || adi.equals(\"irin\")))\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"svaadireriNoH\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"sva + <ira/irin> = vRRIddhi.\\n Blocks Guna Sandhi.\" + \"\\nPls. note. My program does not cover sandhi with declensions.\";\n comments.setConditions(cond1);\n }\n\n // **********END OF ELSE IF****************//\n\n // 211 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (VowelUtil.isAkaranta(X_anta) && X_adi.equals(\"fta\"))// adi.equals(\"RRita\"))\n {\n // checked:29-6\n // not working for 'a' but working for 'A'. Find out why...fixed\n\n return_me = utsarga_prakruti_bhava(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRite ca tRRitIyAsamAse\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If an akaranta ('a/aa/a3'-terminating phoneme) is going to form a Tritiya Samas compound with a RRi-initial word\" + \" vRRiddhi-ekadesha takes place blocking other rules.\\n\" + \"a/A/a3 + RRi -> Tritiya Samaasa Compound -> vRRiddhi-ekadesh\" + depend;\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 212-213\n // **********ELSE IF****************//\n else if ((anta.equals(\"pra\") || anta.equals(\"vatsatara\") || anta.equals(\"kambala\") || anta.equals(\"vasana\") || anta.equals(\"RRiNa\") || anta.equals(\"dasha\")) && adi.equals(\"RRiNa\"))\n\n // checked:29-6\n { // pra condition not working...fixed now . 5 MAR 05\n // return_me = guna_sandhi(X_anta,X_adi) + \", \" +\n // prakruti_bhava(X_anta,X_adi)\n\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n // vowel_notes.set_sutra_num(\"\") ;\n comments.setVartikaPath(\"pra-vatsatara-kambala-vasanArNa dashaanAm RRiNe\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If 'pra' etc are followed by the word 'RRiNa',\" + \" vRRiddhi-ekadesh takes place blocking Guna and Prakruti Bhava Sandhis.\" + \"\\n<pra/vatsatara/kambala/vasana/RRiNa/dash> + RRiNa = vRRiddhi\";\n comments.setConditions(cond1);\n }\n // ???? also implement prakruti bhava\n\n /**\n * **YEs ACCORDING TO SWAMI DS but not according to Bhaimi Bhashya else\n * if ( adi.equals(\"RRiNa\") && (anta.equals(\"RRiNa\") ||\n * anta.equals(\"dasha\")) ) { return_me = vriddhi_sandhi(X_anta,X_adi);\n * //*sandhi_notes = VE + apavada + vartika + \"'RRiNa dashAbhyAm ca'.\" +\n * \"\\nBlocks Guna and Prakruti Bhava Sandhi\";\n * \n * vowel_notes.start_adding_notes(); vowel_notes.set_sutra_num(\"\") ;\n * vowel_notes.set_vartika_path(\"RRiNa dashAbhyAm ca\") ;\n * vowel_notes.set_sutra_proc(\"Vriddhi-ekadesh\");\n * vowel_notes.set_source(tippani.vartika) ; String cond1 =depend +\n * \"Blocks Guna and Prakruti Bhava Sandhi\";\n * vowel_notes.set_conditions(cond1);\n * /* return_me = utsarga_prakruti_bhava(X_anta,X_adi) + \", \" +\n * vriddhi_sandhi(X_anta,X_adi) + \"**\"; sandhi_notes = usg1 +\n * sandhi_notes; sandhi_notes+= \"\\n\" + usg2 + VE +apavada + vartika +\n * \"'RRiNa dashAbhyAm ca'.\" + depend; // .... this was when I assumed\n * this niyama is optional with other // ???? also implement prakruti\n * bhava }\n */\n // **********END OF ELSE IF****************//\n // 214 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (anta.equals(\"A\") && VowelUtil.isAjadi(X_adi))\n {\n // checked:29-6\n // rules is A + Vowel = VRddhi\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n /*******************************************************************\n * sandhi_notes = usg1 + sandhi_notes + \"\\n\" + usg2 ; // We have to\n * remove vriddhi_sandhi default notes // this is done by /\n ******************************************************************/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.87\");\n comments.setSutraPath(\"ATashca\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"if String 1 equals 'aa' and implies 'AT'-Agama and \" + \"String 2 is a verbal form. E.g. A + IkSata = aikSata not ekSata.\\n\" + \" 'aa' + Verbal Form = vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n // akaranta uparga mein error....fixed 4 MAR\n // 215 Vik Semantic Dependency\n else if (is_akaranta_upsarga(X_anta) && X_adi.startsWith(\"f\")) // RRi\n // ==\n // SLP\n // 'f'USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n { // according to Vedanga Prakash Sandhi Vishaya RRIkara is being\n // translated\n // but checked with SC Basu Trans. it is RRIta not RRikara\n // checked:29-6\n\n Log.info(\" Rules 215 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // vowel_notes.decrement_pointer();\n\n // July 14 2005.. I have removed the above line\n // vowel_notes.decrement_pointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.88\");\n comments.setSutraPath(\"upasargAdRRiti dhAtau\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"akaranta upsarga(preverb) followed by verbal form begining with short RRi.\\n \" + \"preverb ending in <a> + verbal form begining with RRi = vRRiddhi-ekadesha\\n\";\n\n /*\n * \"By 6.1.88 it should block all \" + \"optional forms but by 'vA\n * supyApishaleH' (6.1.89) subantas are \" + \"permitted the Guna\n * option.\";\n */\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA UNO**********\");\n\n if (return_me.equals(\"UNAPPLICABLE\"))\n {\n return_me = apavada_para_rupa(X_anta, X_adi); // search for more\n // apavada rules\n }\n return return_me; // apavada rules formulated by Panini apply\n }", "public boolean buy() throws Exception {\n\n int jogador = this.jogadorAtual();\n\n String lugar = this.tabuleiro.getPlaceName(posicoes[jogador]);\n // System.out.println(\"lugar[jogador]\" + lugar);\n boolean posicaoCompravel = this.posicaoCompravel(posicoes[jogador]);\n boolean isEstatal = this.isPosicaoEstatal(this.posicoes[jogador]);\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true && verificaSeServicoPublicoFoiComprado(this.posicoes[jogador]))) {\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true)) {\n this.listaJogadores.get(jogadorAtual()).addQuantidadeCompanhias();\n\n }\n int posicaoTabuleiro = posicoes[jogador];\n int preco = this.tabuleiro.getLugarPrecoCompra(posicaoTabuleiro);\n Jogador j = listaJogadores.get(jogador);\n this.terminarAVez();\n if (preco <= j.getDinheiro()) {\n this.print(\"\\tPossui dinheiro para a compra!\");\n j.retirarDinheiro(preco);\n this.Donos.put(posicaoTabuleiro, j.getNome());\n\n String nomeLugar = this.tabuleiro.getPlaceName(posicaoTabuleiro);\n j.addPropriedade(nomeLugar);\n if (nomeLugar.equals(\"Reading Railroad\") || nomeLugar.equals(\"Pennsylvania Railroad\") ||\n nomeLugar.equals(\"B & O Railroad\") || nomeLugar.equals(\"Short Line Railroad\")) {\n DonosFerrovias[jogador]++;\n }\n this.print(\"\\tVocê adquiriu \" + nomeLugar + \" por \" + preco);\n this.print(\"\\tAtual dinheiro: \" + j.getDinheiro());\n if (j.temPropriedades() && hipotecaAtiva) {\n j.adicionarComandoHipotecar();\n }\n if (j.verificaSeTemGrupo(posicaoTabuleiro)) {\n if (this.build == true) {\n j.adicionarComandoBuild();\n }\n\n this.tabuleiro.duplicarAluguelGrupo(posicaoTabuleiro);\n\n }\n } else {\n this.print(\"\\tNão possui dinheiro para realizar a compra!\");\n throw new Exception(\"Not enough money\");\n }\n\n } else {\n\n if (this.jaTemDono(posicoes[jogador])) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n\n if (isEstatal && this.publicServices == false) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n if (!posicaoCompravel) {\n throw new Exception(\"Place doesn't have a deed to be bought\");\n }\n }\n\n\n\n return false;\n\n\n\n }", "private void hienThi() {\n try {\n if (isInsert) {\n txtMaThucAn.setText(ThucPhamController.hienMa());\n txtMaThucAn.setEnabled(false);\n hienTrangThai();\n } else {\n txtMaThucAn.setText(tp.getMathucpham());\n txtMaThucAn.setEnabled(false);\n txtTenThucAn.setText(tp.getTenthucpham());\n jSpinSoLuong.setValue(tp.getSoluong());\n String sDonGia = Integer.toString((int) tp.getDongia());\n txtDonGia.setText(sDonGia);\n hienTrangThai();\n if (tp.getTrangthai() == 1) {\n cbbTrangThai.setSelectedIndex(0);\n } else {\n cbbTrangThai.setSelectedIndex(1);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "public void mandar_al_cliente_destino_nuevo_mensaje(String salida) throws SQLException, InterruptedException{\n this.multiServer.acceder_a_hebra_y_mandar_mensaje(this.usuario_destino, salida);\n //2-Cambiar el booleano enviado de la bd\n this.controladorMensajes.change_boolean_send(this.usuario, this.usuario_destino,this.fechahora_men_enviado);\n }", "public static void eventoArticuloClienteDistribuidor(boolean preguntar) {\n if (preguntar) {\n if (Logica.Cuadros_Emergentes.confirmacionDefinida(\"\"\n + \"-Se borraran todos los datos escritos del nuevo distribuidor.\\n\\n\") == 0) {\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldNombre.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldContacto.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldDireccion.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_botonHistorialDeDistribuidor.setVisible(false);\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setEditable(true);\n Diseño.Facturacion.paneles_base.panelBase_inventarioClientesDistribuidores.reestablecerComponentes();\n }\n } else {\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldNombre.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldContacto.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldDireccion.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_botonHistorialDeDistribuidor.setVisible(false);\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setEditable(true);\n Diseño.Facturacion.paneles_base.panelBase_inventarioClientesDistribuidores.reestablecerComponentes();\n }\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public int \tqueCelulaHay(Casilla pos)\r\n\t{\r\n\t\t\r\n\t\tint queHay = ES_VACIA;\r\n\t\t\r\n\t\t//si no esta vacia miro que celula es\r\n\t\tif(superficie[pos.getFila()][pos.getCol()]!=null)\r\n\t\t{\r\n\t\t\tif(superficie[pos.getFila()][pos.getCol()].soyComestible()) queHay = ES_SIMPLE;\r\n\t\t\telse if(!superficie[pos.getFila()][pos.getCol()].soyComestible()) queHay = ES_COMPLEJA;\r\n\t\t}\r\n\t\t\r\n\t\treturn queHay;\r\n\t\r\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "private void xuLyThemDV(){\n if (checkMaDV(txtMaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Mã dịch vụ phải thuộc dạng [DV+Số].\\n Vui lòn kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }//Kiem tra maDV \n \n if(checkTenDV(txtTenDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Tên dịch vụ không được bỏ trống!\");\n txtTenDV.requestFocus();\n return;\n }//Kiem tra tenDV\n \n DichVuService dichVuService = new DichVuService();\n if (dichVuService.kiemTraDichVuDaTonTai(txtMaDV.getText())==false){\n int x = dichVuService.themDV(txtMaDV.getText(), txtTenDV.getText());\n if(x>0){\n hienThiDichVu();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n txtMaDV.requestFocus();\n return;\n }\n }else{\n JOptionPane.showMessageDialog(null, \"Dịch vụ đã tồn tại. Vui lòng kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }\n \n }", "public synchronized boolean comprobarLineas(String sala) throws InterruptedException{\n \tSet<UserBean> userbeans = gestorSesions.dameUserBeans(\"jugador\",sala);\n \tPocketBingo pb = gestorSesions.getJugadasSalas(sala);\n \tList<Integer>numerosCalled = pb.getNumerosCalled();\n \tPeticionPremio userBeanPeticiones=null;\n \tint resultControlLinea;\n \tboolean hayLinea=false;\n \t\n \t\tIterator<UserBean> it = userbeans.iterator();\n \t\t//HashMap<UserBean,Carton> pilaAnunciaPremios = new HashMap<UserBean,Carton> ();\n \t\twhile(it.hasNext()){\n \t\t\tString hayPremioPresente=\"No\";\n \t\t\tUserBean user = it.next();\n \t\t\tVector<Carton>vCarton = user.getvCarton();\t\n \t\t\tIterator<Carton> itCarton = vCarton.iterator();\n \t\t\twhile(itCarton.hasNext()){\n \t\t\t\tCarton carton = (Carton)itCarton.next();\n \t\t\t\tint numeros[][] = carton.getNumeros();\n \t\t\t\tresultControlLinea=0;\n \t\t\t\t//Thread.sleep(3000);\n \t\t\t\tfor(int f=0;f < 3; f++){\n \t\t\t\t\tresultControlLinea=0;\n \t\t\t\t\tfor(int c=0; c<9 ; c++){\n \t\t\t\t\t\tint numero = numeros[f][c];\n \t\t\t\t\t\tif(numerosCalled.contains(numero)){\n \t\t\t\t\t\t\t//Enviar mensaje de encender numero a Carton por numero OK (En cliente marcar el numero como OK)\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t try {\n \t\t\t\t\t\t\t\t\tuser.getSesionSocket().getBasicRemote().sendText(\"numeroOK_\"+carton.getnOrden()+\"F\"+(f+1)+\"C\"+(c+1));\n \t\t\t\t\t\t\t\t\t//Thread.sleep(1000);\n \t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// \tTODO Auto-generated catch block\n \t\t\t\t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\tif(f==0)resultControlLinea+=5;\n \t\t\t\t\t\t\t\tif(f==1)resultControlLinea+=50;\t\n \t\t\t\t\t\t\t\tif(f==2)resultControlLinea+=500;\t \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tif (resultControlLinea == 25 || resultControlLinea == 250 || resultControlLinea == 2500 ) {\n \t\t\t\t\t\t\t//\tuser.getSesionSocket().getBasicRemote().sendText(\"Hay Linea ,result:\"+resultControlLinea);\n \t\t\t\t\t\tString key = user.getUsername();\n \t\t\t\t\t\tuserBeanPeticiones = gestorSesions.getListaPeticionesPremios().get(key);\n \t\t\t\t\t\t\tif(!(userBeanPeticiones==null)){\n \t\t\t\t\t\t\t\tif(userBeanPeticiones.getUserbean().getSalonInUse().equals(sala)&&userBeanPeticiones.getPremio().equals(\"Linea\")){\n \t\t\t\t\t\t\t\t\t// Debido a la naturaleza del Objeto Mapa, cada insercion de instancia userBeanPeticiones (put)machaca\n \t\t\t\t\t\t\t\t\t// a cualquiera existente previamente, lo cual garantiza que solo un premio por usuario (el ultimo regitrado)\n \t\t\t\t\t\t\t\t\t//se registra\n \t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\tgestorSesions.getPilaAnunciaPremios(sala).put(userBeanPeticiones, carton);\n \t\t\t\t\t\t\t\t\t\n \t \t\t\t\t\t\t\tlog.info(\"Hay Linea ,result:\"+resultControlLinea+\" Fila \"+ (f+1) + \" Carton:\" + carton.getnRef());\n \t \t\t\t\t\t\t\tlog.info(\"tamaño en Pila ahora(\"+gestorSesions.getPilaAnunciaPremios(sala).size()+\")\");\n \t \t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tuser.getSesionSocket().getBasicRemote().sendText(\"Hay premio Linea en Carton:\"+carton.getnRef()+\", Enhorabuena \");\n\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\thayLinea=true;\n \t \t\t\t\t\t\t\t//f=3;\n \t\t\t\t\t\t\t\t}\n\n \t\t\t\t\t\t\t}else{\n\t \t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tuser.getSesionSocket().getBasicRemote().sendText(\"Habia Linea y no la has cantado ...\");\n\t\t\t\t\t\t\t\t\t\t//f=3;\n\t\t\t\t\t\t\t\t\t\thayPremioPresente=\"Si\";\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t}\n\n\n \t\t\t\t\t\t\t\n \t\t\t\t\t}else{\n \t\t\t\t\t\t//if(!hayLinea){\n \t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t//Para no borrar un premio anunciado antes, solo se procesa esta parte si no ha habido\n \t\t\t\t\t\t\t\t//premio antes.\n \t\t\t\t\t\t\t\tif(esteUsuarioYaTienePremio(userBeanPeticiones,gestorSesions.getPilaAnunciaPremios(sala))){\n \t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t//Para evitar que se sobrescriban mensajes anteriores\n \t\t\t\t\t\t\t\t\tif(hayPremioPresente.equals(\"No\"))user.getSesionSocket().getBasicRemote().sendText(\"No tienes Linea... \");\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\tlog.info(\"No Hay Linea ,result:\"+resultControlLinea +\" Carton:\" + carton.getnRef());\n \t\t\t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\t\t\t// \t\tTODO Auto-generated catch block\n \t\t\t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t} \n \t\t}\n\n \t\t\n \t\treturn hayLinea;\n }", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }" ]
[ "0.6933638", "0.6799816", "0.6527048", "0.64252716", "0.6338383", "0.6326699", "0.6284607", "0.6234416", "0.62235105", "0.61935854", "0.61843586", "0.617075", "0.6149474", "0.61266965", "0.6124007", "0.61162305", "0.60871285", "0.608443", "0.6056709", "0.6045314", "0.603793", "0.6016167", "0.60132545", "0.60024536", "0.59899944", "0.5988809", "0.5984889", "0.5960172", "0.5948157", "0.59442025", "0.5930058", "0.5927634", "0.5923932", "0.5900475", "0.58914876", "0.5889895", "0.58865315", "0.588208", "0.58805686", "0.5876131", "0.5864018", "0.58583945", "0.5856643", "0.58535767", "0.5845772", "0.58454955", "0.58421683", "0.58174586", "0.58167094", "0.5804436", "0.58043957", "0.5804364", "0.5788617", "0.57885534", "0.5787595", "0.5771543", "0.5761496", "0.57549304", "0.5751033", "0.5748068", "0.57461196", "0.5745607", "0.57371426", "0.57358253", "0.5733631", "0.57322013", "0.5731758", "0.5731512", "0.57244056", "0.5722546", "0.5717145", "0.57149804", "0.57138205", "0.57118344", "0.5709225", "0.5709107", "0.5707902", "0.5707294", "0.5705099", "0.57033813", "0.57014817", "0.5696422", "0.56949925", "0.5694838", "0.5693968", "0.56905764", "0.5689318", "0.5686041", "0.56825626", "0.56811166", "0.5679725", "0.5678203", "0.56749725", "0.5672402", "0.5672177", "0.56654054", "0.5662895", "0.56584334", "0.56559634", "0.5653472", "0.56517935" ]
0.0
-1
AttributeLink object instance interface.
public interface AttributeLink extends org.omg.uml.foundation.core.ModelElement { /** * Returns the value of reference attribute. * @return Value of reference attribute. */ public org.omg.uml.foundation.core.Attribute getAttribute(); /** * Sets the value of reference attribute. See {@link #getAttribute} for description * on the reference. * @param newValue New value to be set. */ public void setAttribute(org.omg.uml.foundation.core.Attribute newValue); /** * Returns the value of reference value. * @return Value of reference value. */ public org.omg.uml.behavioralelements.commonbehavior.Instance getValue(); /** * Sets the value of reference value. See {@link #getValue} for description * on the reference. * @param newValue New value to be set. */ public void setValue(org.omg.uml.behavioralelements.commonbehavior.Instance newValue); /** * Returns the value of reference instance. * @return Value of reference instance. */ public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance(); /** * Sets the value of reference instance. See {@link #getInstance} for description * on the reference. * @param newValue New value to be set. */ public void setInstance(org.omg.uml.behavioralelements.commonbehavior.Instance newValue); /** * Returns the value of reference linkEnd. * @return Value of reference linkEnd. */ public org.omg.uml.behavioralelements.commonbehavior.LinkEnd getLinkEnd(); /** * Sets the value of reference linkEnd. See {@link #getLinkEnd} for description * on the reference. * @param newValue New value to be set. */ public void setLinkEnd(org.omg.uml.behavioralelements.commonbehavior.LinkEnd newValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Link createLink();", "SimpleLink createSimpleLink();", "LINK createLINK();", "public Link getLink() {\r\n return link;\r\n }", "private Link() {\n }", "public interface Attribute {\n\n /**\n * The id of the attribute. This will be unique for all attributes in a\n * graph. However, if an attribute is removed from the graph, future\n * attributes may (and probably will) reuse this id.\n *\n * @return the id of the attribute.\n */\n public int getId();\n\n /**\n * Sets the id of this attribute.\n *\n * @param id the new id of this attribute.\n */\n public void setId(final int id);\n\n /**\n * Returns the element type that this attribute is associated with.\n *\n * @return the element type that this attribute is associated with.\n */\n public GraphElementType getElementType();\n\n /**\n * Sets the element type of this attribute.\n *\n * @param elementType the new element type of this attribute.\n */\n public void setElementType(final GraphElementType elementType);\n\n /**\n * The type of this attribute.\n * <p>\n * This is a String as returned by\n * {@link au.gov.asd.tac.constellation.graph.attribute.AttributeDescription#getName()}\n * from one of the registered AttributeDescription instances.\n *\n * @return The type of this attribute.\n */\n public String getAttributeType();\n\n /**\n * Sets the type of this attribute.\n *\n * @param attributeType the new type of the attribute.\n */\n public void setAttributeType(final String attributeType);\n\n /**\n * Return the name of the attribute. This name will be unique for all\n * attributes associated with the same element type in a graph. This is the\n * value that is presented to the user in the UI and the most common way in\n * which attributes are looked up in the graph.\n *\n * @return the name of the attribute.\n */\n public String getName();\n\n /**\n * Sets a new name for this attribute.\n *\n * @param name the new name for the attribute.\n * @see Attribute#getName()\n */\n public void setName(final String name);\n\n /**\n * Returns the description of an attribute. The description provides more\n * detailed information about the attribute such as how it is being used or\n * and constraints that should be observed.\n *\n * @return the description of an attribute.\n */\n public String getDescription();\n\n /**\n * Sets a new description of an attribute.\n *\n * @param description the new description of the attribute.\n * @see Attribute#getDescription()\n */\n public void setDescription(final String description);\n\n /**\n * Returns the current default value for this attribute. This is the value\n * that new elements will get when they are created.\n *\n * @return the current default value for this attribute.\n */\n public Object getDefaultValue();\n\n /**\n * Sets the new default value for this attribute. This will not change the\n * values of any existing elements but rather the value that new elements\n * will get given when they are created.\n *\n * @param defaultValue the new default value for the attribute.\n */\n public void setDefaultValue(final Object defaultValue);\n\n /**\n * Returns the class of the attribute description that defines this\n * attribute.\n *\n * @return the class of the attribute description that defines this\n * attribute.\n */\n public Class<? extends AttributeDescription> getDataType();\n\n /**\n * Sets the data type of this attribute.\n *\n * @param dataType the new datatype of this attribute.\n */\n public void setDataType(final Class<? extends AttributeDescription> dataType);\n\n /**\n * Returns the attribute merger for this attribute.\n *\n * @return the attribute merger for this attribute.\n */\n public GraphAttributeMerger getAttributeMerger();\n\n /**\n * Sets the attribute merger for this attribute.\n *\n * @param attributeMerger the attribute merger for this attribute.\n */\n public void setAttributeMerger(final GraphAttributeMerger attributeMerger);\n}", "public LinkElement() { }", "public PhysicalLink() {\n\n }", "public LinkImpl(String href) {\n this.href = href;\n }", "public abstract Link getLink(LinkContext context) throws AccessException;", "public Link() {\n }", "Attribute createAttribute();", "Attribute createAttribute();", "LinkRelation createLinkRelation();", "public interface Link<C> {\n \n /**\n * @param context an arbitrary context.\n * @return <code>true</code> if this instance accepts the given context.\n */\n public boolean accepts(C context);\n }", "@objid (\"780bebb2-6884-4789-bdef-ca10444ad5fb\")\n Link getLink();", "protected DefaultLink() {\n }", "public DoublyLink() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public ModuleObjectAttributeItem() {}", "public String getLink();", "public Links() {\n }", "@objid (\"cd72633c-53d3-4556-b5de-b52113e3a225\")\n void setLink(Link value);", "public Linka getLinka() {\n return linka;\n }", "public <T> Link addAttributeType(IAttributeType<T> type);", "public LinksResource() {\n }", "IAttributes getAttributes();", "Attribute getAttribute();", "@Override\n\tpublic void visitAttribute(Object attr) {\n\t}", "@Override public void visitAttribute(Attribute attr) {\n }", "@Override public void visitAttribute(Attribute attr) {\n }", "public Link(long id) // constructor\r\n { iData = id; }", "public LinkDisplay()\n\t{\n\t\treturn;\n\t}", "@Override public void visitAttribute(Attribute attr) {\n }", "public interface LinkGenerator {\n\n String ATTRIBUTE_CONTROLLER = \"controller\";\n String ATTRIBUTE_RESOURCE = \"resource\";\n String ATTRIBUTE_ACTION = \"action\";\n String ATTRIBUTE_METHOD = \"method\";\n String ATTRIBUTE_URI = \"uri\";\n String ATTRIBUTE_RELATIVE_URI = \"relativeUri\";\n String ATTRIBUTE_INCLUDE_CONTEXT = \"includeContext\";\n String ATTRIBUTE_CONTEXT_PATH = \"contextPath\";\n String ATTRIBUTE_URL = \"url\";\n String ATTRIBUTE_BASE = \"base\";\n String ATTRIBUTE_ABSOLUTE = \"absolute\";\n String ATTRIBUTE_ID = \"id\";\n String ATTRIBUTE_FRAGMENT = \"fragment\";\n String ATTRIBUTE_PARAMS = \"params\";\n String ATTRIBUTE_MAPPING = \"mapping\";\n String ATTRIBUTE_EVENT = \"event\";\n String ATTRIBUTE_ELEMENT_ID = \"elementId\";\n String ATTRIBUTE_PLUGIN = \"plugin\";\n String ATTRIBUTE_NAMESPACE = \"namespace\";\n \n\n Set<String> LINK_ATTRIBUTES = CollectionUtils.newSet(\n ATTRIBUTE_RESOURCE,\n ATTRIBUTE_METHOD,\n ATTRIBUTE_CONTROLLER,\n ATTRIBUTE_ACTION,\n ATTRIBUTE_URI,\n ATTRIBUTE_RELATIVE_URI,\n ATTRIBUTE_CONTEXT_PATH,\n ATTRIBUTE_URL,\n ATTRIBUTE_BASE,\n ATTRIBUTE_ABSOLUTE,\n ATTRIBUTE_ID,\n ATTRIBUTE_FRAGMENT,\n ATTRIBUTE_PARAMS,\n ATTRIBUTE_MAPPING,\n ATTRIBUTE_EVENT,\n ATTRIBUTE_ELEMENT_ID,\n ATTRIBUTE_PLUGIN,\n ATTRIBUTE_NAMESPACE\n );\n\n Map<String, String> REST_RESOURCE_ACTION_TO_HTTP_METHOD_MAP = CollectionUtils.<String, String>newMap(\n \"create\", \"GET\",\n \"save\", \"POST\",\n \"show\", \"GET\",\n \"index\", \"GET\",\n \"edit\", \"GET\",\n \"update\", \"PUT\",\n \"patch\", \"PATCH\",\n \"delete\", \"DELETE\"\n );\n\n Map<String, String> REST_RESOURCE_HTTP_METHOD_TO_ACTION_MAP = CollectionUtils.<String, String>newMap(\n \"GET_ID\", \"show\",\n \"GET\", \"index\",\n \"POST\", \"save\",\n \"DELETE\", \"delete\",\n \"PUT\", \"update\",\n \"PATCH\", \"patch\"\n );\n\n\n /**\n * Generates a link to a static resource for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>base - The base path of the URL, typically an absolute server path</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>dir - The directory to link to</li>\n * <li>file - The file to link to (relative to the directory if specified)</li>\n * <li>plugin - The plugin that provides the resource</li>\n * <li>absolute - Whether the link should be absolute or not</li>\n * </ul>\n *\n * @param params The named parameters\n * @return The link to the static resource\n */\n String resource(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @param encoding The character encoding to use\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params, String encoding);\n\n /**\n * Obtains the context path from which this link generator is operating.\n *\n * @return The base context path\n */\n String getContextPath();\n\n /**\n * The base URL of the server used for creating absolute links.\n *\n * @return The base URL of the server\n */\n String getServerBaseURL();\n}", "public String getLink() {\n return link;\n }", "public interface Link<T> {\n\n /**\n * Resolve the link and get the underlying object.\n *\n * @return the target of the link, not null\n * @throws DataNotFoundException if the link is not resolved\n */\n T resolve();\n\n /**\n * Get the type of the object that this link targets.\n *\n * @return the type of the object, not null\n */\n Class<T> getTargetType();\n\n // TODO - do we want a method to generate a resolved version of a config object e.g. new ResolvedConfigLink(resolver.resolve())\n}", "Link(Object it, Link inp, Link inn) { e = it; p = inp; n = inn; }", "@Override\n public void visitAttribute(Attribute attribute) {\n }", "public String getLink() {\r\n return link;\r\n }", "NamedLinkDescriptor createNamedLinkDescriptor();", "public String getLink(){\n return mLink;\n }", "LinkLayer getLinkLayer();", "public LinkButton() {\n\t\tsuper();\n\t\tinit();\n\t}", "public Attr() {\n\t\t\tsuper();\n\t\t}", "public CMSLinkComponentDTO()\n\t{\n\t\tsuper();\n\t}", "public String getLink()\n {\n return link;\n }", "public LinkButton( Action a) {\n\t\tsuper( a);\n\t\tinit();\n\t}", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "ReferenceLink createReferenceLink();", "public OntologyLinkModeTool()\n \t{\n \tedu.tufts.vue.ontology.ui.OntologyBrowser.getBrowser().addOntologySelectionListener(this);\n \t//creationLink.setID(\"<creationLink>\"); // can't use label or it will draw one \n \t//invisibleLinkEndpoint.addLinkRef(creationLink);\n \tcreationLink=null;\n invisibleLinkEndpoint.setSize(0,0);\n \n \t}", "public LinkBuilder() {\n }", "public Linkable next();", "public interface IAttributes {\n\n\t/***\n\t * Integer index of the attribute. Should be used with defined public static final int values.\n\t * Chosen because of better extensibility (an enum cannot extend another enum).\n\t * More specific object attribute definitions should extend the ObjectAttributesBase class in order\n\t * to have access to all derived attributes.\n\t * \n\t * @param attribute integer index of attribute\n\t * @return\n\t */\n\tObject getAttribute(int attribute);\n\t\n\tvoid setAttribute(int attribute, Object value);\n}", "protected abstract Content getClassLink(LinkInfo linkInfo);", "public HtmlComponent createComponent()\r\n\t{\r\n\t\tJspLink link = new JspLink(getName(), _href, getHelper().getController());\r\n\t\tif (_target != null)\r\n\t\t\tlink.setTarget(_target);\r\n\t\tif (_onClick != null)\r\n\t\t\tlink.setOnClick(_onClick);\r\n\t\tif (_onMouseOver != null)\r\n\t\t\tlink.setOnMouseOver(_onMouseOver);\r\n\t\tif (_onMouseOut != null)\r\n\t\t\tlink.setOnMouseOut(_onMouseOut);\r\n\t\tif (getClassname() != null)\r\n\t\t\tlink.setStyle(getClassname());\r\n\t\tif (_dataSource != null)\r\n\t\t\tlink.setDataSource(_dataSource);\r\n\t\tif (_bracket != null)\r\n\t\t {\r\n\t\t link.setBracket(BaseTagHelper.stringToBoolean(getBracket(),false));\r\n\t\t if (_bracketFont != null)\r\n\t\t\tlink.setBracketFont(_bracketFont);\r\n\t\t }\r\n\t\treturn link;\r\n\t}", "Link getL();", "public Hyperlink(){\n this.href = \"\";\n this.text = new TextSpan(\"\");\n }", "public GenericAttribute getAttribute () {\n return attribute;\n }", "public interface LinkOpt extends Link {\n\n}", "@objid (\"000fb1bc-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface LinkEnd extends UmlModelElement {\n /**\n * The metaclass simple name.\n */\n @objid (\"e6dd0ee9-d2ae-459e-911e-137b205a96a9\")\n public static final String MNAME = \"LinkEnd\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"62f5bc44-c159-4a21-873f-c9ba90f5653c\")\n public static final String MQNAME = \"Standard.LinkEnd\";\n\n /**\n * Get the 'graphical owner' related to this end.\n * The owner is the current source or the opposite end's target according to the navigability.\n */\n @objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();\n\n @objid (\"006058b0-2963-1080-943a-001ec947cd2a\")\n void setTarget(final Instance value, final boolean fixModel);\n\n @objid (\"006059f0-2963-1080-943a-001ec947cd2a\")\n void setSource(final Instance value, final boolean fixModel);\n\n /**\n * Sets both ends sources and targets according to the given navigability.\n * <ul>\n * <li>THISSIDE: only current source and target must be filled.</li>\n * <li>OHERSIDE: only opposite source and target must be filled.</li>\n * <li>BOTHSIDES: current source must be equals to opposite target as well as current target and opposite source.</li>\n * <li>NONE: both sources must be filled, but no target</li>\n * </ul>\n * @param value whether or not to synchronize the other end and both source/target values. This end will be made navigable whatever the current navigability is.\n */\n @objid (\"50d3075c-1fcb-4a03-a648-16729171986f\")\n void setNavigable(boolean value);\n\n @objid (\"6d12e031-ad22-449a-9171-6a88d4158b48\")\n boolean isNavigable();\n\n /**\n * Getter for attribute 'LinkEnd.IsOrdered'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is ordered.</i>\n */\n @objid (\"fcf73d01-d406-41e9-9490-067237966153\")\n boolean isIsOrdered();\n\n /**\n * Setter for attribute 'LinkEnd.IsOrdered'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is ordered.</i>\n */\n @objid (\"85e0d2fc-c5f1-47a6-a7a9-d1d92c110978\")\n void setIsOrdered(boolean value);\n\n /**\n * Getter for attribute 'LinkEnd.IsUnique'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is unique.</i>\n */\n @objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();\n\n /**\n * Setter for attribute 'LinkEnd.IsUnique'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is unique.</i>\n */\n @objid (\"d7a49a3a-2f15-4f2c-91a0-847c1e869a0c\")\n void setIsUnique(boolean value);\n\n /**\n * Getter for attribute 'LinkEnd.MultiplicityMax'\n * \n * Metamodel description:\n * <i>Maximum value of the Link's multiplicity.</i>\n */\n @objid (\"7bba25c1-4310-45fa-b2ce-d6cdc992be70\")\n String getMultiplicityMax();\n\n /**\n * Setter for attribute 'LinkEnd.MultiplicityMax'\n * \n * Metamodel description:\n * <i>Maximum value of the Link's multiplicity.</i>\n */\n @objid (\"0ef18ad8-3371-4bb9-933d-7b4e156bea34\")\n void setMultiplicityMax(String value);\n\n /**\n * Getter for attribute 'LinkEnd.MultiplicityMin'\n * \n * Metamodel description:\n * <i>Minimum value of the Link's multiplicity. When placed on a target end, the multiplicity specifies the number of target instances that may be associated with a single source instance across the given Link.</i>\n */\n @objid (\"258318a3-c0bd-4ddc-971b-1e72b90fcbb1\")\n String getMultiplicityMin();\n\n /**\n * Setter for attribute 'LinkEnd.MultiplicityMin'\n * \n * Metamodel description:\n * <i>Minimum value of the Link's multiplicity. When placed on a target end, the multiplicity specifies the number of target instances that may be associated with a single source instance across the given Link.</i>\n */\n @objid (\"06670c6b-fb3b-41b3-aefd-29ea57042310\")\n void setMultiplicityMin(String value);\n\n /**\n * Getter for relation 'LinkEnd->Link'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"780bebb2-6884-4789-bdef-ca10444ad5fb\")\n Link getLink();\n\n /**\n * Setter for relation 'LinkEnd->Link'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cd72633c-53d3-4556-b5de-b52113e3a225\")\n void setLink(Link value);\n\n /**\n * Getter for relation 'LinkEnd->Target'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();\n\n /**\n * Setter for relation 'LinkEnd->Target'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"8fb70c43-b102-4a64-9424-c7cc07d58fcf\")\n void setTarget(Instance value);\n\n /**\n * Getter for relation 'LinkEnd->OppositeOwner'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"aaf16daa-ed28-496e-bee1-ebf665987a0e\")\n LinkEnd getOppositeOwner();\n\n /**\n * Setter for relation 'LinkEnd->OppositeOwner'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"67ebbbfe-83e1-4802-a6be-2ffada70c737\")\n void setOppositeOwner(LinkEnd value);\n\n /**\n * Getter for relation 'LinkEnd->RealizedInformationFlow'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d5ab3449-47f3-49a5-9936-6634cda6cb2a\")\n EList<InformationFlow> getRealizedInformationFlow();\n\n /**\n * Filtered Getter for relation 'LinkEnd->RealizedInformationFlow'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"b9cdbb67-9b00-43b4-aa83-a5150ca375e9\")\n <T extends InformationFlow> List<T> getRealizedInformationFlow(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'LinkEnd->Model'\n * \n * Metamodel description:\n * <i>The LinkEnd is an occurrence of this AssociationEnd.</i>\n */\n @objid (\"661a22c1-2de2-4b65-a955-6b755461b1ac\")\n AssociationEnd getModel();\n\n /**\n * Setter for relation 'LinkEnd->Model'\n * \n * Metamodel description:\n * <i>The LinkEnd is an occurrence of this AssociationEnd.</i>\n */\n @objid (\"1a8cb555-55ca-418e-8378-2f50ba867c6b\")\n void setModel(AssociationEnd value);\n\n /**\n * Getter for relation 'LinkEnd->Consumer'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the RequiredInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"8f1c9d42-a8ac-4f52-b3f8-2b5f076b4348\")\n RequiredInterface getConsumer();\n\n /**\n * Setter for relation 'LinkEnd->Consumer'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the RequiredInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"443e3927-5e5c-43bb-9d78-44c58df8e6fd\")\n void setConsumer(RequiredInterface value);\n\n /**\n * Getter for relation 'LinkEnd->Opposite'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"e10bb26d-c5e7-4f7e-b4cb-8c5551328d52\")\n LinkEnd getOpposite();\n\n /**\n * Setter for relation 'LinkEnd->Opposite'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"322f7781-7f9f-47de-8df7-a12ebfa5784a\")\n void setOpposite(LinkEnd value);\n\n /**\n * Getter for relation 'LinkEnd->Source'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"4e37aa68-c0f7-4404-a2cb-e6088f1dda62\")\n Instance getSource();\n\n /**\n * Setter for relation 'LinkEnd->Source'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"fddcf86a-595c-4c38-ad3f-c2a660a9497b\")\n void setSource(Instance value);\n\n /**\n * Getter for relation 'LinkEnd->Provider'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the ProvidedInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"13e63a4b-fab3-4b16-b7f9-69b4d6187c94\")\n ProvidedInterface getProvider();\n\n /**\n * Setter for relation 'LinkEnd->Provider'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the ProvidedInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"a3188449-2f95-4e02-a233-e2e48fa5e5b0\")\n void setProvider(ProvidedInterface value);\n\n}", "public static workflowexecution.proxies.LinkVisit initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)\r\n\t{\r\n\t\treturn new workflowexecution.proxies.LinkVisit(context, mendixObject);\r\n\t}", "TAttribute createTAttribute();", "public IRAttribute ( ) {\n\t\tsuper();\n\t}", "private LinkLayer() {\r\n }", "public java.lang.String getLink()\n {\n return this.link;\n }", "protected interface ILinkCallback extends IClusterable\n\t{\n\t\t/**\n\t\t * Called when the click is executed.\n\t\t *\n\t\t * @param target\n\t\t * The ajax request target\n\t\t */\n\t\tvoid onClick(AjaxRequestTarget target);\n\t}", "default Attribute getAttribute(AttributeName attributeName) {return (Attribute) attributeName;}", "public String getLink() {\n\t\treturn link;\n\t}", "public String getLink() {\n\t\treturn link;\n\t}", "public LinkButton( Icon icon) {\n\t\tsuper( icon);\n\t\tinit();\n\t}", "public Attributes getAttributes() { return this.attributes; }", "String getLink();", "public Link(DvText meaning, DvText type, DvEHRURI target) {\n if(meaning == null) {\n throw new IllegalArgumentException(\"null meaning\");\n }\n if(type == null) {\n throw new IllegalArgumentException(\"null type\");\n }\n if(target == null) {\n throw new IllegalArgumentException(\"null target\");\n }\n this.meaning = meaning;\n this.type = type;\n this.target = target;\n }", "Attributes getAttributes();", "public interface Link<T> extends ITable<T>, List<T>, RandomAccess {\r\n /**\r\n * Set number of the linked objects \r\n * @param newSize new number of linked objects (if it is greater than original number, \r\n * than extra elements will be set to null)\r\n */\r\n public void setSize(int newSize);\r\n \r\n /**\r\n * Returns <tt>true</tt> if there are no related object\r\n *\r\n * @return <tt>true</tt> if there are no related object\r\n */\r\n boolean isEmpty();\r\n\r\n /**\r\n * Get related object by index\r\n * @param i index of the object in the relation\r\n * @return referenced object\r\n */\r\n public T get(int i);\r\n\r\n /**\r\n * Get related object by index without loading it.\r\n * Returned object can be used only to get it OID or to compare with other objects using\r\n * <code>equals</code> method\r\n * @param i index of the object in the relation\r\n * @return stub representing referenced object\r\n */\r\n public Object getRaw(int i);\r\n\r\n /**\r\n * Replace i-th element of the relation\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n * @return the element previously at the specified position.\r\n */\r\n public T set(int i, T obj);\r\n\r\n /**\r\n * Assign value to i-th element of the relation.\r\n * Unlike Link.set methos this method doesn't return previous value of the element\r\n * and so is faster if previous element value is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n */\r\n public void setObject(int i, T obj);\r\n\r\n /**\r\n * Remove object with specified index from the relation\r\n * Unlike Link.remove methos this method doesn't return removed element and so is faster \r\n * if it is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n */\r\n public void removeObject(int i);\r\n\r\n /**\r\n * Insert new object in the relation\r\n * @param i insert poistion, should be in [0,size()]\r\n * @param obj object inserted in the relation\r\n */\r\n public void insert(int i, T obj);\r\n\r\n /**\r\n * Add all elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n */\r\n public void addAll(T[] arr);\r\n \r\n /**\r\n * Add specified elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n * @param from index of the first element in the array to be added to the relation\r\n * @param length number of elements in the array to be added in the relation\r\n */\r\n public void addAll(T[] arr, int from, int length);\r\n\r\n /**\r\n * Add all object members of the other relation to this relation\r\n * @param link another relation\r\n */\r\n public boolean addAll(Link<T> link);\r\n\r\n /**\r\n * Return array with relation members. Members are not loaded and \r\n * size of the array can be greater than actual number of members. \r\n * @return array of object with relation members used in implementation of Link class\r\n */\r\n public Object[] toRawArray(); \r\n\r\n /**\r\n * Get all relation members as array.\r\n * The runtime type of the returned array is that of the specified array. \r\n * If the index fits in the specified array, it is returned therein. \r\n * Otherwise, a new array is allocated with the runtime type of the \r\n * specified array and the size of this index.<p>\r\n *\r\n * If this index fits in the specified array with room to spare\r\n * (i.e., the array has more elements than this index), the element\r\n * in the array immediately following the end of the index is set to\r\n * <tt>null</tt>. This is useful in determining the length of this\r\n * index <i>only</i> if the caller knows that this index does\r\n * not contain any <tt>null</tt> elements.)<p>\r\n * @return array of object with relation members\r\n */\r\n public <T> T[] toArray(T[] arr);\r\n\r\n /**\r\n * Checks if relation contains specified object instance\r\n * @param obj specified object\r\n * @return <code>true</code> if object is present in the collection, <code>false</code> otherwise\r\n */\r\n public boolean containsObject(T obj);\r\n\r\n /**\r\n * Check if i-th element of Link is the same as specified obj\r\n * @param i element index\r\n * @param obj object to compare with\r\n * @return <code>true</code> if i-th element of Link reference the same object as \"obj\"\r\n */\r\n public boolean containsElement(int i, T obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation. \r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int indexOfObject(Object obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation\r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int lastIndexOfObject(Object obj);\r\n\r\n /**\r\n * Remove all members from the relation\r\n */\r\n public void clear();\r\n\r\n /**\r\n * Get iterator through link members\r\n * This iterator supports remove() method.\r\n * @return iterator through linked objects\r\n */\r\n public Iterator<T> iterator();\r\n\r\n /**\r\n * Replace all direct references to linked objects with stubs. \r\n * This method is needed tyo avoid memory exhaustion in case when \r\n * there is a large numebr of objectys in databasse, mutually\r\n * refefencing each other (each object can directly or indirectly \r\n * be accessed from other objects).\r\n */\r\n public void unpin();\r\n \r\n /**\r\n * Replace references to elements with direct references.\r\n * It will impove spped of manipulations with links, but it can cause\r\n * recursive loading in memory large number of objects and as a result - memory\r\n * overflow, because garbage collector will not be able to collect them\r\n */\r\n public void pin(); \r\n}", "public interface TElement extends HasID, THasPropertyChange, PropertyChangeListener, Serializable {\n\n /**\n * Used if a requested attribute is not a member of the TElement derived\n * Class.\n */\n public final Object NOT_DEFINED = \"ATT_NOT_DEFINED\";\n\n /**\n * return the attribute value or teal.sim.TElement.NOT_DEFINED\n **/\n public Object getProperty(String attName);\n\n /**\n * set the attribute value return value is success\n **/\n public boolean setProperty(String attName, Object value);\n\n public void addRoute(Route r);\n \n /** \n * Establish a route from this object's source attribute and the targeted \n * attribute of another TElement. \n **/\n public void addRoute(String attribute, TElement listener, String targetName);\n \n \n /** \n * Remove a route from this object's source attribute and the target's output attribute. \n **/\n public void removeRoute(String attribute, TElement listener, String targetName);\n}", "public Link linkTo() {\n Label text = Label.of(name);\n URIObject target = FSURICodec.encode(this);\n return Link.textTarget(text, target);\n }", "public org.omg.uml.foundation.core.Attribute getAttribute();", "@Override\r\n\tpublic LinkMan getModel() {\n\t\treturn linkman;\r\n\t}", "public void _linkClient(ModelElement client1);", "@DOMSupport(DomLevel.ONE)\r\n @Property String getAlinkColor();", "public Link add(Link link);", "public T caseLink(Link object) {\r\n\t\treturn null;\r\n\t}", "public String getLink() {\n\t\t\treturn link;\n\t\t}", "public OSLink( rcNode creator, HashMap hAttrs) {\n rcSource = creator;\n szSourcePort = (OSPort)hAttrs.get( \"SourcePort\");\n szDestPort = (String)hAttrs.get( \"DestinationPort\");\n szDestName =(String) hAttrs.get( \"DestinationName\");\n }", "public StudentSubjectLink() {\n this(DSL.name(\"student_subject_link\"), null);\n }", "CharNode getLink();", "public IHyperLink attachLink()\n throws OculusException;", "public void setLink(Link link) {\n \t\t_link = link;\n \t}", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "public Link(String header, String contextPath, String objectClassName, String query) {\n\t\tthis.setValue(header + contextPath + \"/\" + objectClassName + \"/\" + query);\n\t\tthis.setRel(\"self\");\n\t\tthis.setHref(header + contextPath + \"/\" + objectClassName + \"/\" + query);\n\t\tthis.setType(\"application/rdap+json\");\n\t}", "public interface ILinkFactory extends Serializable{\n public ILink<ISlotableItem> getLink(ISlotableItem source, ISlotableItem target);\n public ILink<Pair<ISlotableItem,Object>> getLink(ISlotableItem source, Object srcInterface, ISlotableItem target, Object trgInterface);\n}", "public String getHref() {\n return href;\n }", "@ApiModelProperty(value = \"Unique reference of the entity\")\n\n\n public String getHref() {\n return href;\n }", "Attribute getTarget();", "@DOMSupport(DomLevel.ONE)\r\n @Property String getLinkColor();", "Attr getURIAsAttr();" ]
[ "0.63794756", "0.6323768", "0.6278755", "0.6211381", "0.6209474", "0.6205244", "0.6189329", "0.6176874", "0.6173082", "0.61660576", "0.6136347", "0.6132759", "0.6132759", "0.6056325", "0.60535246", "0.6045833", "0.60116917", "0.5929849", "0.58970505", "0.58322704", "0.5809607", "0.5736", "0.571617", "0.57076937", "0.56939334", "0.5690424", "0.5666103", "0.5610604", "0.5605119", "0.5605119", "0.56023836", "0.5599626", "0.5597987", "0.55951124", "0.5582064", "0.5580633", "0.5574521", "0.55704594", "0.5568947", "0.5568745", "0.55648494", "0.5549624", "0.55472153", "0.55451006", "0.55435514", "0.5541967", "0.5521272", "0.5516928", "0.5516928", "0.5516928", "0.5516928", "0.55099916", "0.5505657", "0.55024755", "0.5496791", "0.5487905", "0.5478458", "0.5472185", "0.54698646", "0.54651576", "0.5461647", "0.5448887", "0.5444381", "0.5436451", "0.5435621", "0.5431133", "0.5420512", "0.5418495", "0.5414057", "0.54085374", "0.54046065", "0.54046065", "0.5404387", "0.539625", "0.5391052", "0.5382621", "0.53816617", "0.5367488", "0.53615534", "0.5360368", "0.53501", "0.5318671", "0.53104496", "0.5304604", "0.5294485", "0.52911025", "0.52650595", "0.52579314", "0.5254217", "0.52217454", "0.5221107", "0.52205247", "0.52173907", "0.5215028", "0.52120537", "0.521152", "0.52095133", "0.5208647", "0.520558", "0.5203075" ]
0.74259305
0
Returns the value of reference attribute.
public org.omg.uml.foundation.core.Attribute getAttribute();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "public abstract Value getReferenceValue();", "public String getRef() {\n return ref;\n }", "public java.lang.String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public final String getReference() {\n return reference;\n }", "public final String attributeNameRef ()\r\n {\r\n return _value.xmlTreePath().attribute();\r\n }", "java.lang.String getRef();", "@Override\r\n\tpublic Ref getRef() {\n\t\treturn ref;\r\n\t}", "@UML(identifier=\"valueReference\", obligation=MANDATORY, specification=ISO_19143)\n ValueReference<? super R, ?> getValueReference();", "String getReference();", "String getReference();", "public String getReference();", "public String getReference();", "@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }", "public String getREFERENCE() {\r\n return REFERENCE;\r\n }", "public abstract double getReference();", "public abstract double getReference();", "@Nullable\n String getRef();", "public Node getReference() {\n return this.reference;\n }", "public StrColumn getReference() {\n return delegate.getColumn(\"reference\", DelegatingStrColumn::new);\n }", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "public String getReferenceId() {\n return refid;\n }", "public Float getBonusReference() {\n return bonusReference;\n }", "public String getReferenceAccession() {\n return referenceProteinAccession;\n }", "public SoftReference getReference ()\r\n {\r\n return _reference;\r\n }", "@XmlElement\n public String getRefId() {\n return refId;\n }", "public java.lang.String getReferenceNumber() {\r\n return referenceNumber;\r\n }", "public java.lang.String getRefnum() {\n return refnum;\n }", "public java.lang.String getRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROADWAYREF$16);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public E getReferenceId() {\n return referenceId;\n }", "public long getRefId() {\n return refId;\n }", "public BigDecimal getREF_NO() {\r\n return REF_NO;\r\n }", "public ValueOrRef readRef(Element element) {\n String ref = element.getTextContent();\n ValueOrRef defaultValueOrRef = DefaultValueOrRef.ref(null, ref, true);\n return defaultValueOrRef;\n }", "public Integer getRefId() {\n return refId;\n }", "public java.lang.String getReference1() {\n return reference1;\n }", "public Object get() {\n synchronized (lock) {\n if (!set) { throw new IllegalStateException(\"Reference has not been set\"); }\n\n return ref;\n }\n }", "@JsonIgnore\r\n public String getReferenceId() {\r\n return OptionalNullable.getFrom(referenceId);\r\n }", "public java.lang.String getRefId() {\n return refId;\n }", "Symbol getRef();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "public String getRefType() {\n return refType;\n }", "public ReferenceFactElements getReferenceFactAccess() {\n\t\treturn pReferenceFact;\n\t}", "public Vec4 getReferencePoint()\n {\n return this.currentData.getReferencePoint();\n }", "public java.lang.String getReference2() {\n return reference2;\n }", "public java.lang.String getReference_Doc() {\r\n return reference_Doc;\r\n }", "public String getValue_click_Fuel_Rewards_Link(){\r\n\t\treturn click_Fuel_Rewards_Link.getAttribute(\"value\");\r\n\t}", "public String getReferenceUrl() {\n\t\tif ((this.getMdht().getText() != null)\n\t\t\t\t&& (this.getMdht().getText().getReference() != null)) {\n\t\t\treturn this.getMdht().getText().getReference().getValue();\n\t\t}\n\t\treturn null;\n\t}", "FunctionArgument getRef();", "public java.lang.String getReferenceFileIPR()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCEFILEIPR$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n public String getTag() {\n return this.reference;\n }", "public ReferenceDataAssetElement getReferenceDataAsset()\n {\n return referenceDataAsset;\n }", "public java.lang.String getRefID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFID$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "long getValueReference(int entryIndex) {\n return getEntryFieldLong(entryIndex, OFFSET.VALUE_REFERENCE);\n }", "public String getReferenceId();", "public String getADDITIONAL_REFERENCE() {\r\n return ADDITIONAL_REFERENCE;\r\n }", "MolecularSequenceReferenceSeq getReferenceSeq();", "@Override\r\n\tpublic String getValue() {\r\n\t\t//\r\n\t\treturn this.elementWrapper.getAttribute(this.attribute);\r\n\t}", "public Reference getReference() throws NamingException\n {\n return ref;\n }", "final Reference<ComputedImage> reference() {\n return reference;\n }", "public java.lang.String getRefalnum() {\n return refalnum;\n }", "ReferenceProperty createReferenceProperty();", "public String getValue() {\n return super.getAttributeValue();\n }", "public String getValue_click_My_Rewards_Link(){\r\n\t\treturn click_My_Rewards_Link.getAttribute(\"value\");\r\n\t}", "public ValueFunction reference() throws DynamicParamException {\n return new PlainValueFunction(getNumberOfActions(), (DirectFunctionEstimator)functionEstimator.reference(), getParams());\n }", "public String getAttribute_value() {\n return attribute_value;\n }", "Object getRefid();", "public java.lang.String getReference02() {\n return reference02;\n }", "public String getRef(){\n return this.filenameWithoutExtension + \".\" + this.index;\n }", "public java.lang.String getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VALUE$12);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n public ReferenceValue getReferenceValue(Parameter param) {\n\n double minReference = externalModule.getMinReferenceValue(param.getCode(), API_KEY);\n double maxReference = externalModule.getMaxReferenceValue(param.getCode(), API_KEY);\n String usedMetric = externalModule.usedMetric(param.getCode(), API_KEY);\n return new ReferenceValue(usedMetric, maxReference, minReference);\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get());\n }", "public Reference getHref() {\n return this.href;\n }", "@Schema(example = \"inv_1815_ref_1\", description = \"ID for the reference of the API consumer.\")\n public String getReferenceId() {\n return referenceId;\n }", "public URI getReferenceUri() {\n return m_referenceUri;\n }", "public T getRefer() {\n return refer;\n }", "public javax.xml.namespace.QName getReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getQNameValue();\n }\n }", "public ByteArrayAttribute getValue() {\n return value;\n }", "public int getUniqueReference ()\n\t{\n\t\treturn uniqueReference;\n\t}", "public String getAttrVal() {\n return attrVal;\n }", "public ReferenceHelper getReferenceHelper();", "public static Currency getReferenceCurrency() {\n return REFERENCE.get();\n }", "String getReferenceType();", "final public Vector2 getRef2DAttr() {\r\n\t\t\tif(mName.length() == 0)\r\n\t\t\t\treturn null;\r\n\t\t\tif(mSaveAttr == null)\r\n\t\t\t\treturn getAttr(mName).Vector;\r\n\t\t\treturn mSaveAttr.Vector;\r\n\t\t}", "public String crossReference() {\n return crossReference;\n }", "static public XmlAttributeInfo refXmlAttributeInfo (String name, String ref)\r\n {\r\n return new XmlAttributeInfo(name,ref,_ISATTRIBUTE);\r\n }", "public double getReading() {\n return this.getDataRef().get();\n }", "public String getObrefno() {\n return (String)getAttributeInternal(OBREFNO);\n }", "public java.lang.String getAttributeValue() {\r\n return localAttributeValue;\r\n }", "public String getOriginalReference() {\n return originalReference;\n }", "public org.apache.xmlbeans.XmlString xgetReferenceFileIPR()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFERENCEFILEIPR$0, 0);\n return target;\n }\n }", "private boolean isReference()\n {\n return countAttributes(REFERENCE_ATTRS) > 0;\n }", "public String getNameReference() { \n\t\treturn getNameReferenceElement().getValue();\n\t}", "public Optional<String> getRefAllele() {\n return this.placement.getAlleles().stream()\n .map(p -> p.getAllele().getSpdi().getDeletedSequence())\n .findFirst();\n }", "@JsonSetter(\"reference\")\r\n public void setReference (String value) { \r\n this.reference = value;\r\n }" ]
[ "0.8314955", "0.7831536", "0.75395876", "0.73166305", "0.7228326", "0.7220157", "0.7217746", "0.7217746", "0.7217746", "0.71541345", "0.7124284", "0.7120732", "0.70590955", "0.69801074", "0.69044787", "0.69044787", "0.68957716", "0.68957716", "0.6881465", "0.6868056", "0.67420113", "0.67420113", "0.6704542", "0.66859245", "0.665922", "0.6608741", "0.65789104", "0.6501797", "0.6468607", "0.6448111", "0.6443898", "0.63871497", "0.63594806", "0.63432276", "0.63395035", "0.6314058", "0.6311369", "0.630583", "0.62993807", "0.6297365", "0.6296904", "0.62939036", "0.6275097", "0.6260397", "0.6254406", "0.62414205", "0.62220514", "0.6218669", "0.6178728", "0.6164817", "0.61550564", "0.6135665", "0.61214346", "0.6101945", "0.60959387", "0.60644007", "0.605616", "0.6047419", "0.60413283", "0.603969", "0.60202265", "0.60185605", "0.60074455", "0.59957826", "0.59836566", "0.5959133", "0.59552586", "0.5946661", "0.5940753", "0.59258896", "0.59124714", "0.591013", "0.5904662", "0.59014016", "0.5893443", "0.5890315", "0.5875237", "0.5874467", "0.5857748", "0.58355886", "0.58291966", "0.5811407", "0.5807786", "0.580458", "0.5791232", "0.57819104", "0.57813495", "0.5772958", "0.5767919", "0.57412577", "0.5735698", "0.5730184", "0.57213384", "0.5714625", "0.5709382", "0.5704112", "0.5700502", "0.569995", "0.5699482", "0.5685585", "0.5658125" ]
0.0
-1
Returns the value of reference value.
public org.omg.uml.behavioralelements.commonbehavior.Instance getValue();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getReferenceValue();", "@UML(identifier=\"valueReference\", obligation=MANDATORY, specification=ISO_19143)\n ValueReference<? super R, ?> getValueReference();", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "java.lang.String getRef();", "public Object get() {\n synchronized (lock) {\n if (!set) { throw new IllegalStateException(\"Reference has not been set\"); }\n\n return ref;\n }\n }", "@Override\r\n\tpublic Ref getRef() {\n\t\treturn ref;\r\n\t}", "public String getRef() {\n return ref;\n }", "public java.lang.String getReference() {\n return reference;\n }", "public abstract double getReference();", "public abstract double getReference();", "public final String getReference() {\n return reference;\n }", "long getValueReference(int entryIndex) {\n return getEntryFieldLong(entryIndex, OFFSET.VALUE_REFERENCE);\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "String getReference();", "String getReference();", "public ValueFunction reference() throws DynamicParamException {\n return new PlainValueFunction(getNumberOfActions(), (DirectFunctionEstimator)functionEstimator.reference(), getParams());\n }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public Object getValue() { return this.value; }", "public ValueOrRef readRef(Element element) {\n String ref = element.getTextContent();\n ValueOrRef defaultValueOrRef = DefaultValueOrRef.ref(null, ref, true);\n return defaultValueOrRef;\n }", "public Object getValue() { return _value; }", "public Object getValue(){\n \treturn this.value;\n }", "public Node getReference() {\n return this.reference;\n }", "public Object getValue()\n {\n\treturn value;\n }", "public String getReference();", "public String getReference();", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue()\n {\n return value;\n }", "public V getValue() {\r\n\t\treturn value;\r\n\t}", "private static Object referenceValue(IDatatype type, Object value) {\n if (Reference.TYPE.isAssignableFrom(type)) {\n DisplayNameProvider nameProvider = DisplayNameProvider.getInstance();\n List<AbstractVariable> possibleDecls = ReferenceValuesFinder.findPossibleValues(\n de.uni_hildesheim.sse.qmApp.model.VariabilityModel.Configuration.INFRASTRUCTURE.getConfiguration()\n .getProject(), (Reference) type);\n for (int i = 0; i < possibleDecls.size(); i++) {\n AbstractVariable declaration = possibleDecls.get(i);\n String name = nameProvider.getDisplayName(declaration);\n if (name.equals(value)) {\n value = declaration;\n break;\n }\n }\n } \n return value;\n }", "public V getValue() {\n\t\treturn value;\n\t}", "public V getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\r\n return value;\r\n }", "public final Object getValue()\n {\n return m_Value;\n }", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "Symbol getRef();", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "@Override\n\t\tpublic V getValue() {\n\t\t\treturn v;\n\t\t}", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public Object getValue() {\n\t\t\treturn value;\n\t\t}", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public V value()\n\t\t{\n\t\t\treturn _value;\n\t\t}", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "@Override\n public ReferenceValue getReferenceValue(Parameter param) {\n\n double minReference = externalModule.getMinReferenceValue(param.getCode(), API_KEY);\n double maxReference = externalModule.getMaxReferenceValue(param.getCode(), API_KEY);\n String usedMetric = externalModule.usedMetric(param.getCode(), API_KEY);\n return new ReferenceValue(usedMetric, maxReference, minReference);\n }", "public Object getValue() {\r\n return oValue;\r\n }", "public String getREFERENCE() {\r\n return REFERENCE;\r\n }", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public Object getValue() {\n if (_valueIndex <= 0)\n return null;\n return ((ConstantEntry) getPool().getEntry(_valueIndex)).getConstant();\n }", "public Value getValue(){\n return this.value;\n }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "protected V getValue() {\n return this.value;\n }", "public S getValue() { return value; }", "V getValue() {\n return value;\n }", "public T getValue() \n\t{\n\t\treturn value;\n\t}", "@Nullable\n String getRef();", "public Object getValue() {\n\t\treturn object;\n\t}", "public T getValue() {\n return this.value;\n }", "public V getValue()\r\n\t\t{\r\n\t\t\treturn val;\r\n\t\t}", "@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }", "public T getValue() {\n return casValue.getValue();\n }", "public T getValue() {\r\n return value;\r\n }", "public T getValue() {\n\t\treturn value;\n\t}", "public T getValue() {\n\t\treturn value;\n\t}", "public T getValue() {\n\t\treturn value;\n\t}", "public Vec4 getReferencePoint()\n {\n return this.currentData.getReferencePoint();\n }", "public int getValue() throws Exception {\n\t\treturn RemoteServer.instance().executeAndGetId(\"getvalue\", getRefId());\n\t}", "@Override\n public V getValue() {\n return m_value;\n }", "public final Object get() {\n return getValue();\n }", "public T value() {\n\t\treturn value;\n\t}", "public T getValue()\n {\n return value;\n }", "FunctionArgument getRef();", "public T getValue() {\n return value;\n }", "public org.apache.xmlbeans.XmlObject getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(VALUE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public V getValue();", "@Override\r\n public Object getValue() {\r\n return value;\r\n }" ]
[ "0.858046", "0.76425534", "0.749418", "0.72193915", "0.7132659", "0.7099893", "0.70829695", "0.70061284", "0.6994416", "0.69855076", "0.69855076", "0.69003886", "0.68752944", "0.6847194", "0.6845784", "0.6845784", "0.6845784", "0.67913824", "0.67913824", "0.6775848", "0.67426836", "0.6735694", "0.67138374", "0.6695038", "0.66742533", "0.6662625", "0.6625041", "0.66221935", "0.66221935", "0.658067", "0.658067", "0.65672755", "0.65648395", "0.65620816", "0.65482765", "0.65482765", "0.65479124", "0.6530065", "0.65295285", "0.65295285", "0.65295285", "0.65295285", "0.65295285", "0.6528897", "0.65261745", "0.65229774", "0.6515947", "0.65142703", "0.6511686", "0.6511686", "0.6511686", "0.6511686", "0.6511686", "0.6511686", "0.6511686", "0.6505215", "0.6494171", "0.6494171", "0.6492917", "0.6492917", "0.6492917", "0.6492917", "0.6492917", "0.6475953", "0.6475677", "0.6470323", "0.64692014", "0.64692014", "0.64692014", "0.64692014", "0.64685386", "0.64685386", "0.6462951", "0.64592403", "0.64533865", "0.64353985", "0.64231896", "0.64209753", "0.64108944", "0.6408542", "0.6405177", "0.64034736", "0.6401646", "0.6399539", "0.6396422", "0.63906914", "0.6378133", "0.6377618", "0.6377618", "0.6377618", "0.6374028", "0.63738734", "0.63688946", "0.6359549", "0.6355205", "0.63433397", "0.6331386", "0.63303304", "0.6326537", "0.6320223", "0.6318832" ]
0.0
-1
Returns the value of reference instance.
public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getReferenceValue();", "public Object get() {\n synchronized (lock) {\n if (!set) { throw new IllegalStateException(\"Reference has not been set\"); }\n\n return ref;\n }\n }", "@Override\r\n\tpublic Ref getRef() {\n\t\treturn ref;\r\n\t}", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "public String getRef() {\n return ref;\n }", "public java.lang.String getReference() {\n return reference;\n }", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "public final String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public Object getValue() {\n\t\treturn object;\n\t}", "public final Object get() {\n return getValue();\n }", "public Object getValue() { return this.value; }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public Object getValue() { return _value; }", "@UML(identifier=\"valueReference\", obligation=MANDATORY, specification=ISO_19143)\n ValueReference<? super R, ?> getValueReference();", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "java.lang.String getRef();", "public Object getValue()\n {\n return value;\n }", "public Object getValue(){\n \treturn this.value;\n }", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "public Object getValue() {\r\n return value;\r\n }", "public org.omg.uml.behavioralelements.commonbehavior.Instance getValue();", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\n\t\t\treturn value;\n\t\t}", "public Object getValue()\n {\n\treturn value;\n }", "public final Object getValue()\n {\n return m_Value;\n }", "public abstract double getReference();", "public abstract double getReference();", "public Node getReference() {\n return this.reference;\n }", "public T getValue() {\n return this.value;\n }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "public Object getValue() {\r\n return oValue;\r\n }", "public T getValue() {\r\n return value;\r\n }", "String getReference();", "String getReference();", "public T getValue() {\n return value;\n }", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public org.apache.xmlbeans.XmlObject getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(VALUE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getReference();", "public String getReference();", "public S getValue() { return value; }", "public T value() {\n\t\treturn value;\n\t}", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Value getValue(){\n return this.value;\n }", "V getValue() {\n return value;\n }", "public Object get()\n {\n return m_internalValue;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n\t\treturn value;\n\t}", "public T getValue() {\n\t\treturn value;\n\t}", "public T getValue() {\n\t\treturn value;\n\t}", "public V value()\n\t\t{\n\t\t\treturn _value;\n\t\t}", "public T getValue() {\n return casValue.getValue();\n }", "protected V getValue() {\n return this.value;\n }", "public T getValue() \n\t{\n\t\treturn value;\n\t}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "@Override\n\t\tpublic V getValue() {\n\t\t\treturn v;\n\t\t}", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public T getValue()\n {\n return value;\n }", "public V getValue() {\r\n\t\treturn value;\r\n\t}", "public V getValue() {\n\t\treturn value;\n\t}", "public V getValue() {\n\t\treturn value;\n\t}", "final Reference<ComputedImage> reference() {\n return reference;\n }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "@Override\n public Object getValue()\n {\n return value;\n }", "public String getREFERENCE() {\r\n return REFERENCE;\r\n }", "public GHFrom getRef() {\n return ref;\n }", "public Object getValue() {\n if (_valueIndex <= 0)\n return null;\n return ((ConstantEntry) getPool().getEntry(_valueIndex)).getConstant();\n }", "public ObjectReference getObject();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "@Override\n public V getValue() {\n return m_value;\n }", "@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }", "public T getValue() {\n\t\t\treturn this.entry.value;\n\t\t}", "public Entity getValue() {\r\n\t\t\treturn value;\r\n\t\t}" ]
[ "0.83592117", "0.76117164", "0.74053717", "0.7208859", "0.7115318", "0.71123296", "0.7103123", "0.7080962", "0.70519084", "0.7046346", "0.7046346", "0.7046346", "0.7040946", "0.703893", "0.702046", "0.7018925", "0.69880795", "0.6987004", "0.69587886", "0.69587886", "0.69262", "0.6891492", "0.68865675", "0.6876881", "0.6873262", "0.68588704", "0.68509805", "0.68509805", "0.68509805", "0.68509805", "0.68509805", "0.68332934", "0.68332934", "0.6821199", "0.6804665", "0.68002397", "0.67893237", "0.67893237", "0.67798144", "0.6779011", "0.677339", "0.6763519", "0.6755714", "0.6753868", "0.6753868", "0.6748805", "0.67388916", "0.6734522", "0.67240536", "0.67240536", "0.6711609", "0.6709306", "0.67034173", "0.67034173", "0.67034173", "0.67034173", "0.67034173", "0.66982555", "0.6689711", "0.6689425", "0.66880953", "0.66880953", "0.66880953", "0.66880953", "0.6683744", "0.6683744", "0.6683744", "0.6682516", "0.66793084", "0.666027", "0.66491437", "0.6648242", "0.6646276", "0.6646276", "0.6646276", "0.6646276", "0.66400635", "0.6639849", "0.6639849", "0.6636093", "0.6633697", "0.6620229", "0.6620229", "0.66172844", "0.66055393", "0.6584173", "0.65751255", "0.6557706", "0.65513676", "0.65325296", "0.6520348", "0.6520348", "0.6520348", "0.6520348", "0.6520348", "0.6520348", "0.6520348", "0.6517162", "0.65146327", "0.6484756", "0.6464888" ]
0.0
-1
Returns the value of reference linkEnd.
public org.omg.uml.behavioralelements.commonbehavior.LinkEnd getLinkEnd();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getEnd() {\n\t\t\t\t\n\t\t\t\t\tString vS = \"NONE\";\n\t\t\t\t\tSystem.out.println(vS + \" l \" + length);\n\t\t\t\t\tif (length != 0) vS = tail.getPrev().getValue();\n\t\t\t\t\tSystem.out.println(vS + \" l2 \" + length);\n\t\t\t\treturn vS;\n\t\t\t\t}", "public String getEnd() {\n return end;\n }", "public String getEnd(){\n\t\treturn end;\n\t}", "public int getEnd() {\n return this.end;\n }", "org.hl7.fhir.Integer getEnd();", "public double getEnd() {\n return end;\n }", "public int getEnd() {\r\n return end;\r\n }", "public int getEnd() {\r\n\t\treturn end;\r\n\t}", "public int getEnd() {\n return end;\n }", "public Block getEnd () {\n\t\treturn end;\n\t}", "public int getEnd() {\n\t\treturn end;\n\t}", "public int getEnd()\n {\n return end;\n }", "public Address getEndAddress() {\n\t\treturn baseAddress.getNewAddress(baseAddress.getOffset() + maxOffset);\n\t}", "public Point end() {\r\n return this.end;\r\n }", "public int getEndNum() {\r\n return this.endNum;\r\n }", "public String getEndStr() {\r\n return endStr;\r\n }", "public String getEndNode()\r\n\t{\r\n\t\treturn endNode;\r\n\t}", "public String getEndLine() {\r\n return this.endLine;\r\n }", "@objid (\"a401b5aa-a324-4104-b9f3-8aa6e8adc133\")\n CommunicationNode getEnd();", "byte[] getLinkEnds();", "public Date get_end() {\n\t\treturn this.end;\n\t}", "public int getEndLIne() {\r\n return this.endLine;\r\n }", "Node getEndNode() {\n return end;\n }", "@Nullable\n public DpProp getEnd() {\n if (mImpl.hasEnd()) {\n return DpProp.fromProto(mImpl.getEnd());\n } else {\n return null;\n }\n }", "public WorldCoordinate getEnd() {\r\n\t\treturn this.end;\r\n\t}", "public long getVisit_end() {\n return visit_end;\n }", "String getEnd();", "public int getEndNode(){\n\t\treturn endNode;\n\t}", "public boolean getEnd()\n\t{\n\t\treturn getBooleanIOValue(\"End\", true);\n\t}", "public long getTimeEnd()\n {\n return this.timeEnd;\n }", "public double getEndLon() {\n\t\treturn endLon;\n\t}", "public String getEndAt() {\n return endAt;\n }", "public Label getEndLabel() {\n\treturn endLabel;\n }", "public Coordinate getEnd( )\n\t{\n\t\treturn endLocation;\n\t}", "@Pure\n public int getEndLine() {\n return this.endLine;\n }", "public int getEnd() {\n if (Span_Type.featOkTst && ((Span_Type)jcasType).casFeat_End == null)\n jcasType.jcas.throwFeatMissing(\"End\", \"Span\");\n return jcasType.ll_cas.ll_getIntValue(addr, ((Span_Type)jcasType).casFeatCode_End);}", "public double getEnd();", "public long getExpectedEnd() {\n return this.expectedEnd;\n }", "public Element getEndExpression() {\n\t\treturn endExpression;\n\t}", "public String getEndMarker() {\n return endMarker;\n }", "BlockChainLink getLastLink();", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}", "public int getOutLinkBoundary() {\n return 0;\n }", "public int getEndLineNumber() {\n return this.endLine;\n }", "public Position getEndPosition() {\n return endPosition;\n }", "public Integer getEndMark() {\n return endMark;\n }", "public int getEndLine() {\r\n \r\n return endLine;\r\n }", "public boolean getEnd() {\n return end_;\n }", "public boolean getEnd() {\n return end_;\n }", "public Chamber getEnd() {\n return end;\n }", "public boolean getEnd(){\n\t\treturn this.isEnd;\n\t}", "public synchronized boolean getEnd(){\n\treturn end;\n }", "public String getNextLink() {\n return this.nextLink;\n }", "public int getEndIdx() {\n return this.endIdx;\n }", "public OffsetDateTime usageEnd() {\n return this.usageEnd;\n }", "public Point getEndPosition()\r\n\t{\r\n\t\treturn endPosition;\r\n\t}", "public Vertex getEnd()\n\t{\n\t\treturn end.copy();\n\t}", "public long getComplementary_end() {\n return complementary_end;\n }", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "public int getEndIndex() {\n return this.endIndex;\n }", "public long getAsLong() {\n\t\treturn end - start;\n\t}", "public int getEnd() {\n switch(getType()) {\n case Insertion:\n case SNP:\n case InterDup:\n case TandemDup:\n case TransDup:\n return pos;\n default:\n return pos + maxLen() - 1;\n }\n }", "String getEndAddress();", "public GeoPoint getEnd(){\n return end;\n }", "public Vector2 getEndLoc( ) { return endLoc; }", "public int getEndLineNumber() {\n return endLineNumber_;\n }", "public java.lang.String getTime_end() {\r\n return time_end;\r\n }", "public long getEnd_time() {\n return end_time;\n }", "public int getEndLineNumber() {\n return endLineNumber_;\n }", "public int getEnd() {\r\n\t\treturn this.offset + this.numResults;\r\n\t}", "int getEnd();", "public int getEndPage() {\n return endPage;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public Integer getLimitEnd() {\r\n return limitEnd;\r\n }", "public int getEndPosition() {\n return endPosition_;\n }", "public int getEndPosition() {\n return endPosition_;\n }", "public int end() { return _end; }", "public int end() {\n return end;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "@objid (\"e10bb26d-c5e7-4f7e-b4cb-8c5551328d52\")\n LinkEnd getOpposite();", "public java.lang.String getEndDay() {\r\n return localEndDay;\r\n }", "public int getRangeEnd() {\n return currentViewableRange.getTo();\n }", "public int getEndy(){\n\t\treturn endy;\n\t}", "public final Long getClientEnd() {\n return clientEnd;\n }", "public String getEndPoint()\n\t{\n\t\tString getEnd;\n\t\tgetEnd = (this.endPoint.xPosition + \",\" + this.endPoint.yPosition);\n\t\treturn getEnd;\n\t}", "public Date getDtEnd() {\r\n return dtEnd;\r\n }", "public Location getEndLocation() {\n return gameLocations.get(GameLocation.END);\n }", "public int getEndRange() {\r\n\t\treturn lookupValue(Params.END_RANGE);\r\n\t}", "public String getEndDate() {\n\t\treturn endDate.getText();\n\t}", "Instant getEnd();", "public long getEndTime() {\n if (endTime < 0) {\n try {\n String datestr = PropertyArray.get(props, END);\n\n if (datestr == null) {\n // this may be more expensive because it can cause a\n // reload from disk\n try {\n datestr = getProperty(END);\n } catch (Fault f) {\n }\n }\n\n if (datestr != null) {\n Date date = parseDate(datestr);\n endTime = date.getTime();\n } else {\n // info not available\n }\n } catch (ParseException e) {\n }\n }\n\n return endTime;\n }", "public int getEndHeight() {\r\n return endHeight;\r\n }", "public LocalTime getEnd() {\n\treturn end;\n }", "@Override\n public int getEnd() {\n return feature.getEnd();\n }", "public int getEndIndex() {\r\n\t\treturn endIndex;\r\n\t}", "public String eventEndString() {\n return DateUtils.formatExtDate(this.endDate);\n }", "public int sourceEnd()\n\t{\n\t\treturn sourceEnd;\n\t}", "public String nextLink() {\n return this.nextLink;\n }", "public String nextLink() {\n return this.nextLink;\n }", "public String nextLink() {\n return this.nextLink;\n }" ]
[ "0.70338", "0.6951705", "0.6891986", "0.6782813", "0.6737073", "0.67338634", "0.67276603", "0.6713146", "0.671023", "0.67080504", "0.6702723", "0.66608167", "0.66534656", "0.66336316", "0.66201097", "0.6601685", "0.6579061", "0.6525156", "0.65220857", "0.6515792", "0.65139526", "0.6493298", "0.64764506", "0.6468525", "0.6452315", "0.64237684", "0.6414678", "0.64083856", "0.64036083", "0.6380837", "0.6379128", "0.6353524", "0.634139", "0.63252175", "0.6315771", "0.63103753", "0.6308435", "0.62728316", "0.6252014", "0.6248001", "0.6240836", "0.6204588", "0.62037736", "0.6192816", "0.6187997", "0.6151575", "0.6121286", "0.61205864", "0.61192816", "0.6113448", "0.61097383", "0.6104095", "0.60925734", "0.6089914", "0.608849", "0.6079308", "0.60698205", "0.60570216", "0.604984", "0.6037264", "0.60288465", "0.602624", "0.60214376", "0.60139966", "0.6006355", "0.60048777", "0.5989594", "0.59880906", "0.5985371", "0.5976326", "0.59659576", "0.5965775", "0.5957752", "0.59517545", "0.59512776", "0.59442806", "0.59313095", "0.5927703", "0.5921705", "0.5911695", "0.590815", "0.5903366", "0.58800083", "0.5873116", "0.5871272", "0.58704907", "0.5857864", "0.58566034", "0.5856299", "0.5854568", "0.58535767", "0.58484405", "0.58356684", "0.5833426", "0.58312905", "0.58308524", "0.5825173", "0.58207613", "0.58207613", "0.58207613" ]
0.8196467
0
Push element x onto stack.
public void push(int x) { if (!reverseQueue.isEmpty()) { normalQueue.offer(reverseQueue.poll()); } normalQueue.offer(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(int x) {\n stack.add(x);\n }", "public void push(int x) {\r\n inStack.push(x);\r\n }", "public void push(int x) {\n this.stack1.add(x);\n }", "public void push(int x) {\n pushStack.add(x);\n }", "public void push(int x) {\n\t\tstack.push(x);\n\t}", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void push(int x) {\n this.inputStack.push(x);\n }", "public void push(int x) {\n storeStack.push(x);\n }", "public void push(int x) {\n this.stack1.push(x);\n }", "public void push(int x) {\n inSt.push(x);\n\n }", "public void push(int x) {\n if (isIn) {\n stackIn.push(x);\n } else {\n while (!stackOut.empty()) {\n stackIn.push(stackOut.pop());\n }\n stackIn.push(x);\n isIn = true;\n }\n\n }", "public void push(int x) {\n rearStack.push(x);\n }", "public void push(int x) {\n /**\n * 将otherStack中所有元素还原到stack中后在栈顶加入新元素\n */\n while (!otherStack.isEmpty()) {\n stack.push(otherStack.pop());\n }\n stack.push(x);\n }", "public void push(int x) {\n Stack<Integer> tmp = new Stack<>();\n while(!s.isEmpty()) {\n tmp.push(s.pop());\n }\n tmp.push(x);\n while(!tmp.isEmpty()) {\n s.push(tmp.pop());\n }\n }", "public void push(int x) {\r\n Stack<Integer> newStack = new Stack<>();\r\n newStack.push(x);\r\n\r\n Stack<Integer> tmp = new Stack<>();\r\n while (!this.stack.isEmpty()) {\r\n tmp.push(this.stack.pop());\r\n }\r\n\r\n while (!tmp.isEmpty()) {\r\n newStack.push(tmp.pop());\r\n }\r\n\r\n\r\n this.stack = newStack;\r\n }", "public void push(int x) {\n push.push(x);\n }", "public void push(int x) {\n load();\n stack.push(x);\n unload();\n }", "public void push(int x) {\n if (mStack1.isEmpty()) {\n mFirst = x;\n }\n mStack1.push(x);\n }", "public void push(int x) {\n\t if(first == null){\n\t first = x;\n\t }\n\t s.push(x);\n\t}", "public void push(int x) {\n stk1.push(x);\n }", "public void push(int x) {\n temp.push(x);\n }", "public void push(int x) {\n stack1.push(x);\n }", "public void push(int x) {\n \tstack.push(x);\n \t// if stack is empty or the element is less than current minimal,\n \t// push it to minStack\n \tif (minStack.isEmpty()) {\n \t\tminStack.push(x);\n \t} else {\n\t \tint min = minStack.peek();\n\t \tif (x <= min) minStack.push(x);\n \t}\n }", "public void push(int x) {\n\t\tinput.push(x);\n\t}", "public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }", "public void push(int x) {\n\t\tlist.add(x);\n\t}", "void push(int x) {\n\t\tif (stack.size() == 0) {\n\t\t\tstack.push(x);\n\t\t\tminEle = x;\n\t\t} else if (x >= minEle) {\n\t\t\tstack.push(x);\n\t\t} else if (x < minEle) {\n\t\t\t// Push something smaller than original value\n\t\t\t// At any time when we pop , we will see if the value\n\t\t\t// of the peek is less then min or not\n\t\t\tstack.push(2 * x - minEle);\n\t\t\tminEle = x;\n\t\t}\n\t}", "public void push(int x) {\n data.add(x);\n }", "public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }", "public void push(int x) {\n // 将 popStack 中数据导入 pushStack\n while (!popStack.isEmpty()) {\n pushStack.push(popStack.pop());\n }\n // 压入 x\n pushStack.push(x);\n // 将数据导回 popStack\n while (!pushStack.isEmpty()) {\n popStack.push(pushStack.pop());\n }\n\n }", "public void push(int x) {\n \tlist.add(x);\n }", "public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }", "public void push(double x) \n {\n if (top == s.length) \n {\n \tthrow new IllegalArgumentException(\"full stack!\");\n }\n \n \n else\n {\n s[++top] = x;\n \n } \n }", "public void push(int x) {\n s1.push(x);\n temp = (Stack<Integer>) s1.clone();\n s2.clear();\n while (!temp.isEmpty()) {\n s2.push(temp.pop());\n }\n }", "public void push(int x) {\n stack1.push(x);\n if (stack2.isEmpty() || x <= stack2.peek()) {\n stack2.push(x);\n }\n }", "public void push(int x) {\n\t\tint max = maxStack.isEmpty() ? x : maxStack.peek();\n\t\tmaxStack.push(max > x ? max : x);\n\t\tstack.push(x);\n\t}", "public void push(T x) {\n\t\tl.push(x);\n\t}", "public void push(int x) {\n q.add(x);\n for (int i = 0; i < q.size() - 1; ++i) {\n q.add(q.poll());\n }\n }", "public void push(int x) {\n\t\tNode t = new Node();\n\t\tt.data = x;\n\t\tt.next = top;\n\t\ttop = t;\n\t}", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n left.push(x);\n }", "public void push(int x) {\n Node node = new Node(x);\n top.next = node;\n node.pre = top;\n top = node;\n size++;\n }", "public void push(int x) {\n if(afterRotate){\n rotate();\n afterRotate = false;\n }\n stack.push(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.add(x);\n for (int i = 0; i < queue.size()-1; i++) {\n queue.add(queue.poll());\n }\n }", "public void push(int x) {\n queue.push(x);\n }", "public void push(int x) {\n if(x <= min){\n stack.push(min);\n min=x;\n }\n stack.push(x);\n }", "public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }", "public void push(int x) { //全部放到第一个\n temp1.push(x);\n }", "public void push(E x) {\n\t\t\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void push(int x) {\n q1.add(x);\n int n = q1.size();\n for (int i = 1; i < n; i++) {\n q1.add(q1.poll());\n }\n }", "public void push(int x) {\n Queue<Integer> tmp = new LinkedList<>();\n while (!queue.isEmpty()) {\n tmp.add(queue.remove());\n }\n queue.add(x);\n \n while (!tmp.isEmpty()) {\n queue.add(tmp.remove());\n }\n }", "public void push(int x) {\n one.add(x);\n for(int i=0;i<one.size()-1;i++)\n {\n one.add(one.poll());\n }\n \n }", "public void push(int x) {\n\t int size=q.size();\n\t q.offer(x);\n\t for(int i=0;i<size;i++){\n\t q.offer(q.poll());\n\t }\n\t \n\t }", "public void push(int x) {\n int n = queue.size();\n queue.offer(x);\n for (int i = 0; i < n; i++) {\n queue.offer(queue.poll());\n }\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}", "void push(Integer x) {\n\n\t\tif (isEmpty()) {\n\t\t\ttop = new Node(x);\n\t\t\tmid = top;\n\t\t\ttotalNodes++;\n\t\t} else {\n\t\t\tNode n = new Node(x);\n\t\t\tn.next = top;\n\t\t\ttop.prev = n;\n\t\t\ttop = n;\n\t\t\ttotalNodes++;\n\t\t\tif (totalNodes % 2 != 0) {\n\t\t\t\tmid = mid.prev;\n\t\t\t}\n\t\t}\n\t}", "public void push(int x) {\n if (head == null) {\n head = new Node1(x, x);\n } else {\n head = new Node1(x, Math.min(x, head.min), head);\n }\n }", "public void push(int x) {\n q.offer(x);\n }", "@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}", "public void push(int x) {\n // 第一步先 push\n queue.offer(x);\n // 第二步把前面的变量重新倒腾一遍\n // 这一部分代码很关键,在树的层序遍历中也用到了\n int size = queue.size() - 1;\n for (int i = 0; i < size; i++) {\n queue.offer(queue.poll());\n }\n }", "void push(Integer x) {\n if (s.isEmpty()) {\n minEle = x;\n s.push(x);\n System.out.println(\"Number Inserted: \" + x);\n return;\n }\n // if new number is less than original minEle\n if (x < minEle) {\n s.push(2 * x - minEle);\n minEle = x;\n } else {\n s.push(x);\n }\n System.out.println(\"Number Inserted: \" + x);\n }", "public void push(int x) {\n queue.offer(x);\n }", "public void push(int element) {\n stack1.push(element);\n }", "public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }", "public void push(int x) {\r\n this.queueMain.offer(x);\r\n }", "public void push(int x) {\n // for pop(), so prepare\n // 要想 pop 省事 push到 queue tail 的 x 要 想办法放到队列第一位\n // how 只要不空 移到另外一个 放好 x 再移回来\n while (!One.isEmpty()) {\n Two.add(One.poll());\n }\n One.add(x);\n while (!Two.isEmpty()) {\n One.add(Two.poll());\n }\n }", "public void push(T x);", "public void push(int x) {\n p.next=new ListNode(x);\n p = p.next;\n }", "@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}", "public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "public void push(int x) {\n\n if (list.isEmpty()) {\n head = x;\n }\n\n list2.add(x);\n while (!(list.isEmpty())) {\n list2.add(list.poll());\n }\n\n while (!(list2.isEmpty())) {\n list.add(list2.poll());\n }\n\n\n }", "public void push(int x) {\n while (!forReverse.isEmpty()) {\n queue.add(forReverse.poll());\n }\n queue.add(x);\n }", "void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}", "private static void sortedInsert(Stack<Integer> stack, int x) {\n if (stack.isEmpty() || stack.peek() < x) {\n stack.push(x);\n return;\n }\n int temp = stack.pop();\n sortedInsert(stack, x);\n stack.push(temp);\n }", "void push(int stackNum, int value) throws Exception{\n\t//check if we have space\n\tif(stackPointer[stackNum] + 1 >= stackSize){ //last element\n\t\tthrows new Exception(\"Out of space.\");\n\t}\n\n\t//increment stack pointer and then update top value\n\tstackPointer[stackNum]++; \n\tbuffer[absTopOfStack(stackNum)] = value;\n}", "public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }", "public void push(T x)\n\t{\n\t\t// If the head is null, set the head equal\n\t\t// to the new node.\n\t\tif(head == null)\n\t\t\thead = new Node<T>(x);\n\t\telse\n\t\t{\n\t\t\t// Loop through the list and add the new node\n\t\t\t// on to the back of the list.\n\t\t\tNode<T> curr = head;\n\t\t\twhile(curr.getNext() != null)\n\t\t\t\tcurr = curr.getNext();\n\n\t\t\tNode<T> last = new Node<T>(x);\n\t\t\tcurr.setNext(last);\n\t\t}\t\n\t}", "public void push(int x) {\n if(!queueA.isEmpty()){\n queueA.add(x);\n }else if(!queueB.isEmpty()){\n queueB.add(x);\n }else{\n queueA.add(x);\n }\n }", "public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }", "public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n }\n else {\n q2.add(x);\n while(q1.size() > 0) {\n q2.add(q1.poll());\n }\n }\n }", "void push(int x);", "void push(T x);", "public void push(int x) {\n q1.push(x);\n if (q2.size() > 0){\n q2.remove();\n }\n }", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n } else {\n q2.add(x);\n while(q1.size() > 0){\n q2.add(q1.poll());\n }\n }\n }", "public void push (E item){\n this.stack.add(item);\n }", "public void push(T value) {\n \tstack.add(value);\n }" ]
[ "0.86726034", "0.85932225", "0.85570914", "0.8550038", "0.852482", "0.8498592", "0.8488227", "0.8461912", "0.8458076", "0.8428038", "0.8376653", "0.8370226", "0.8368897", "0.8343204", "0.83385926", "0.8335069", "0.8333074", "0.83219844", "0.83110696", "0.8299808", "0.82648236", "0.8260843", "0.8227758", "0.81988394", "0.819731", "0.81950635", "0.8136101", "0.813282", "0.81123054", "0.81123054", "0.81123054", "0.8089274", "0.8086407", "0.8082756", "0.8075835", "0.8058963", "0.8050122", "0.80101556", "0.79978484", "0.79816735", "0.7965629", "0.7918633", "0.78817797", "0.7859532", "0.7854534", "0.7853485", "0.78523874", "0.78523874", "0.78476787", "0.7841256", "0.78404015", "0.7834868", "0.7825307", "0.780459", "0.7791437", "0.77746886", "0.771773", "0.7690058", "0.765422", "0.765174", "0.7648162", "0.7646733", "0.76382875", "0.7637257", "0.7633213", "0.7633213", "0.7625352", "0.7617576", "0.7603999", "0.75609857", "0.75587195", "0.75492984", "0.75358003", "0.75231606", "0.74670357", "0.7450564", "0.7396862", "0.73832387", "0.73720616", "0.7360162", "0.73447925", "0.7335559", "0.7328421", "0.7286221", "0.7262818", "0.72311556", "0.72194356", "0.72047585", "0.71959877", "0.7185571", "0.717108", "0.7165948", "0.7088451", "0.7078484", "0.7070283", "0.70639855", "0.70509607", "0.704537", "0.70401484", "0.70389265" ]
0.74457633
76
Removes the element on top of the stack.
public void pop() { move(); reverseQueue.poll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}", "public void pop() {\n // if the element happen to be minimal, pop it from minStack\n if (stack.peek().equals(minStack.peek())){\n \tminStack.pop();\n }\n stack.pop();\n\n }", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't pop from stack\");\n return;\n }\n // if stack is not empty\n this.arr[this.topOfStack]=Integer.MIN_VALUE;\n this.topOfStack--;\n }", "@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}", "public void pop()\n {\n this.top = this.top.getNext();\n }", "public void pop();", "private void pop() {\r\n pop( false );\r\n }", "public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }", "public void pop(){\n \n if(top==null) System.out.println(\"stack is empty\");\n else top=top.next;\n \t\n }", "@Override\n\tpublic T pop() {\n\t\tif(isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is Empty\");\n\t\treturn null;}\n\t\ttop--;\t\t\t\t\t\t//top-- now before since we need index top-1\n\t\tT result = stack[top];\n\t\tstack[top] = null;\n\t\treturn result;\n\t\t\t\n\t}", "void pop() {\n // -\n top = top.getNextNode();\n }", "public void pop() {\n\t\tif(stackTmp.isEmpty()){\n\t\t\twhile(!stack.isEmpty()){\n\t\t\t\tint tmp = stack.peek();\n\t\t\t\tstackTmp.push(tmp);\n\t\t\t\tstack.pop();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tstackTmp.pop();\n\t\t}\n\t}", "public void pop() {\n if(!empty()){\n \tstack.pop();\n }\n }", "public void erase()\n {\n this.top = null;\n }", "public void deleteStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // if stack is present\n topOfStack=-1;\n arr=null;\n System.out.println(\"Stack deleted successfully\");\n }", "public void pop() throws StackUnderflowException;", "public T pop() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//remove top element from stack\n\t\t//and \"clear to let GC do its work\"\n\t\treturn elements.remove(elements.size() - 1);\n\t}", "@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }", "public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }", "public E pop(){\n return this.stack.remove(stack.size()-1);\n }", "public Object pop()\r\n {\n assert !this.isEmpty();\r\n\t\t\r\n Node oldTop = this.top;\r\n this.top = oldTop.getNext();\r\n oldTop.setNext(null); // enable garbage collection\r\n return oldTop.getItem();\r\n }", "public Object pop();", "Object pop();", "public T pop() {\n T top = peek();\n stack[topIndex] = null;\n topIndex--;\n return top;\n }", "public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }", "public TYPE pop();", "public void pop()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n stack.remove(top - 1);\n top--;\n }\n }", "public AnyType pop() throws StackException;", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "public void popScope() {\n this.stack.removeFirst();\n }", "private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }", "@Override\n\tpublic E pop() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\tE element = arr[top];\n\t\tarr[top--] = null;\n\t\treturn element;\n\t}", "public void pop() {\n\t\tif (top == -1) {\n\t\t\tSystem.out.println(\"Stack is empty\");\n\t\t} else {\n\t\t\tSystem.out.println(stacks[top] + \" is popped\");\n\t\t\ttop--;\n\t\t}\n\t\tsize--;\n\t}", "public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public void pop() {\n while(!stack.isEmpty()) container.push(stack.pop());\n container.pop();\n while(!container.isEmpty()) stack.push(container.pop());\n }", "public void pop() {\n if(stack.pop() == min)\n min=stack.pop();\n }", "E pop() throws EmptyStackException;", "@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }", "public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}", "public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}", "public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}", "void removeTop()\n {\n \tif(first!=null)\t\t\t\n \t{\n \t\tfirst=first.next;\n \t\tif(first!=null)\n \t\t\tfirst.prev=null;\n \t}\n }", "public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }", "private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}", "public void popAll()\r\n {\n this.top = null;\r\n }", "public E pop()\n {\n E topVal = stack.removeFirst();\n return topVal;\n }", "public void pop() {\r\n \t Queue<Integer> temp=new LinkedList<Integer>();\r\n \t int counter=0;\r\n \t while(!stack.isEmpty()){\r\n \t temp.add((Integer) stack.poll());\r\n \t counter++;\r\n \t \r\n \t }\r\n \t while(counter>1)\r\n \t {\r\n \t \r\n \t stack.add(temp.poll());\r\n \t counter--;\r\n \t }\r\n }", "public Object pop() {\n return stack.pop();\n }", "public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}", "public void pop() {\n myCStack.delete();\n }", "public T pop() {\r\n\t\tT ele = top.ele;\r\n\t\ttop = top.next;\r\n\t\tsize--;\r\n\t\t\r\n\t\treturn ele;\r\n\t}", "public Object pop()\n\t{\n\t\tif (size == 0)\n\t\t\tthrow new EmptyStackException();\n\t\t\n\t\tObject result = elements[--size];\n\t\telements[size] = null;\n\t\treturn result;\n\t}", "public void remove() {\n btRemove().push();\n }", "public void remove() {\n btRemove().push();\n }", "public Object pop() {\n if (top != null) {\n Object item = top.getOperand();\n\n top = top.next;\n return item;\n }\n\n System.out.println(\"Stack is empty\");\n return null;\n\n }", "void pop() {\n if (s.isEmpty()) {\n System.out.println(\"Stack is empty\");\n return;\n }\n System.out.print(\"Top Most Element Removed: \");\n Integer t = s.pop();\n // minEle must be updated as the curr minEle is being Removed\n if (t < minEle) {\n System.out.println(minEle);\n minEle = 2 * minEle - t;\n } else {\n System.out.println(t);\n }\n }", "public void pop() {\n s.pop();\n }", "@Override\r\n\tpublic T pop() throws StackUnderflowException {\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\tstack.remove(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "public void pop() {\n if (top==-1) {\n System.out.println(\"Stack is empty\");\n return;\n\n\n } else {\n System.out.println(\"item popde is:-\"+ stack[top]);\n top--;\n }\n }", "T pop();", "T pop();", "T pop();", "public Item pop(Item item){\n\nif(isEmpty()) throw new NoSuchElementException(\"Stack undervflow\"); \n Item item =top.item;\n top = top.next;\n N--;\n return item;\n}", "@Override\r\n\tpublic E pop() {\n\t\treturn null;\r\n\t}", "private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}", "public E removeFirst() {\n return pop();\n }", "public int pop(){\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n int tmp=myarray[top];\n top--;\n return tmp;\n \n \n }", "public E popTop() {\n // FILL IN\n }", "public T pop(){ \r\n \t--this.size;\r\n \treturn stack1.pop();\r\n }", "int pop()\n\t{\n // Your code here\n if(top == -1){\n return -1;\n }\n int x = arr[top];\n top--;\n return x;\n\t}", "@Override\n\tpublic E pop() {\n\t\treturn null;\n\t}", "@Override\n\tpublic E pop() {\n\t\tif(size == 0) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\tsize--;\n\t\treturn list.remove(0);\n\t}", "public T pop() throws EmptyStackException\r\n {\r\n if (isEmpty())\r\n throw new EmptyStackException();\r\n\r\n top--;\r\n T result = stack[top];\r\n stack[top] = null; \r\n\r\n return result;\r\n }", "@Override\n\tpublic int pop() {\n\t\treturn 0;\n\t}", "public int pop() {\r\n LinkedList<Integer> queue = new LinkedList<>();\r\n int value = stack.poll();\r\n while(!stack.isEmpty()){\r\n queue.offer(value);\r\n value = stack.poll();\r\n }\r\n stack = queue;\r\n return value;\r\n }", "public void popFrame(){\n runStack.popFrame();\n }", "Object pop(){\r\n\t\tlastStack = getLastStack();\r\n\t\tif(lastStack!=null){\r\n\t\t\tint num = lastStack.pop();\r\n\t\t\treturn num;\r\n\t\t} else {stacks.remove(stacks.size()-1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void pop() throws StackUnderflowException {\r\n if(!isEmpty()) items.remove(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n }", "public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}", "public String pop() {\n String removed = NOTHING;\n // Is there anything in the stack to remove?\n if (usage > 0) {\n // Obtain the topmost value from the stack\n removed = this.foundation[this.foundation.length - this.usage];\n // Clean up the array location\n this.foundation[this.foundation.length - this.usage] = null;\n // Decrease usage counter\n usage--;\n }\n return removed;\n }", "public T pop() throws EmptyStackException {\n if (top == null) {\n throw new EmptyStackException();\n }\n\n StackNode<T> removed = top;\n top = top.getNext();\n return removed.getData();\n }", "public void pop() {\n queue.remove();\n }", "public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public E pop();" ]
[ "0.7765505", "0.7564374", "0.7486899", "0.7481785", "0.7467112", "0.74231863", "0.7370439", "0.7337617", "0.73331475", "0.72395754", "0.722032", "0.719834", "0.7194046", "0.7146135", "0.7144848", "0.71363336", "0.7118481", "0.7098051", "0.70946324", "0.70856357", "0.7077734", "0.70595384", "0.70538616", "0.705136", "0.70481616", "0.70274603", "0.7022035", "0.7012989", "0.70102984", "0.7000014", "0.69827825", "0.6979043", "0.69737095", "0.69703215", "0.69668716", "0.6961279", "0.6958989", "0.69461054", "0.6930665", "0.6922027", "0.69203806", "0.6918391", "0.69132763", "0.6910527", "0.690354", "0.6890615", "0.6889921", "0.6888861", "0.68879205", "0.6886092", "0.68844146", "0.6871072", "0.6861695", "0.6861695", "0.6861695", "0.6861695", "0.6861695", "0.6861695", "0.6861695", "0.6861695", "0.68461597", "0.6843742", "0.6842583", "0.6841069", "0.68377566", "0.68377566", "0.6837649", "0.68360656", "0.68281174", "0.68240374", "0.68138665", "0.6812996", "0.6812996", "0.6812996", "0.68034184", "0.6800385", "0.67982686", "0.6796154", "0.67930984", "0.67923415", "0.6789804", "0.6783448", "0.6776963", "0.67747253", "0.67717236", "0.6764724", "0.6759804", "0.67558885", "0.67556566", "0.6741606", "0.6715632", "0.6715123", "0.6710357", "0.6709043", "0.67018443", "0.6684197", "0.668239", "0.668239", "0.668239", "0.668239", "0.668239" ]
0.0
-1
Get the top element.
public int top() { move(); return reverseQueue.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int top() {\n return topElem;\n }", "public E top() {\n return !isEmpty() ? head.item : null;\n }", "public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}", "public T getTop( );", "E top();", "public int top() { return 0; }", "public int top() {\r\n return top;\r\n }", "public int top() {\r\n return top;\r\n }", "public int getTop() {\n\t\treturn this.top;\n\t}", "public int getTop() {\n\treturn top;\n }", "public Integer getTop() {\n return top;\n }", "public int top() {\n return top;\n }", "public int getTop() {\n return top;\n }", "public T top();", "public int top() {\n return One.peek();\n }", "public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}", "Location getTop() {\n // -\n if(!isEmpty())\n return top.getLocation();\n return null;\n }", "public float getTop() {\n return internalGroup.getTop();\n }", "public abstract Object top();", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "public int top() {\n return (int) one.peek();\n \n }", "public int top() {\n return list.peek();\n }", "public E top() {\n return head.prev.data;\n }", "public int top() {\n return top.value;\n }", "public int top();", "public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }", "public MeasurementCSSImpl getTop()\n\t{\n\t\treturn top;\n\t}", "public E peek(){\n\t\treturn top.element;\n\t}", "public int top() {\n\t return q.peek();\n\t }", "public Node top() {\r\n\t\treturn start;\r\n\t}", "public int top() {\n return q.peek();\n }", "public int top() {\n \treturn list.get(list.size()-1);\n }", "public int getTop() {\n return position[0] - (size - 1) / 2;\n }", "public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}", "public int top() {\n return objects.peek();\n }", "public int top() {\n return q1.getFirst();\n }", "public E top()\n\tthrows EmptyStackException;", "public E top() {\n\t\tif (this.top == null) {\n\t\t\tthrow new EmptyStackException( );\n\t\t}\n\t\treturn this.top.data;\n\t\t\t\n\t}", "@Override\n\tpublic E top() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\treturn arr[top];\n\t}", "public Node<T> getTopNode() {\n\t\treturn topNode;\n\t}", "public int top() {\n return queue.element();\n }", "public int top() {\n\t\treturn stack.peek();\n \n }", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "public int top() {\n return q1.peek();\n }", "public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}", "public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }", "public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public int top() {\n return p.val;\n }", "public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }", "public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }", "public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }", "@Nullable\n public DpProp getTop() {\n if (mImpl.hasTop()) {\n return DpProp.fromProto(mImpl.getTop());\n } else {\n return null;\n }\n }", "public String top(){\n if(!(pilha.size() == 0)){\n return pilha.get(pilha.size()-1);\n }else{\n return null;\n }\n }", "public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }", "public E popTop() {\n // FILL IN\n }", "public int top() {\n return stack1.peek();\n }", "public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}", "public View getTopView() {\n\t\tint topViewIndex = getChildCount() - 1;\n\t\treturn getChildAt(topViewIndex);\n\t}", "public Card top() {\n\t\treturn firstCard;\n\t}", "public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int getElementAtTopOfStack() {\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n return myarray[top];\n \n }", "int top();", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public E top() throws StackUnderflowException {\r\n E item = null;\r\n if(!isEmpty()) item = items.get(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n \r\n return item;\r\n }", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }", "@VisibleForTesting\n public TaskStack getTopStack() {\n if (DisplayContent.this.mTaskStackContainers.getChildCount() > 0) {\n return (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(DisplayContent.this.mTaskStackContainers.getChildCount() - 1);\n }\n return null;\n }", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}", "public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }", "public T peek() {\n return top.getData();\n }", "public int top() {\n return queue.peekLast();\n }", "public int top() {\n return queue.getLast();\n }", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "@Override\n\tpublic T top()\n\t{\n if(list.size()==0)\n {\n throw new IllegalStateException(\"Stack is empty\");\n }\n return list.get(getSize()-1);\n\t}", "public Integer peek() {\n if (hasTop)\n return top;\n top = it.next();\n hasTop = true;\n return top;\n }", "public T top() throws StackUnderflowException;", "@DISPID(-2147417103)\n @PropGet\n int offsetTop();", "public static Interval topInterval(){\n\t\treturn top;\n\t}", "public double getTop() {\n return this.yT;\n }", "public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}", "public T peek() {\n\t\treturn top.value;\n\t}", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "public Card getTopCard() {\n\t\treturn topCard;\n\t}", "public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public Card topCard() {\n return this.deck.peek();\n }", "public Card showTop() {\n\t\treturn hand.get(0);\n\t}", "public int top() {\n return queue1.peek();\n }", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "@Override\n public E top()throws EmptyStackException{\n E c = null;\n if(!isEmpty()){\n c = stackArray[count-1];\n return c;\n }\n \n else \n throw new EmptyStackException();\n }", "public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}", "public int top() {\n if (data.size() != 0) {\n return data.get(data.size() - 1);\n }\n throw new RuntimeException(\"top: 栈为空,非法操作\");\n }", "@Override\n\tpublic final int getBodyOffsetTop() {\n\t\treturn DOMImpl.impl.getBodyOffsetTop(documentFor());\n\t}", "public int stackTop() {\r\n\t return array[top];\r\n\t }", "@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "protected abstract String getTopElementDesc();" ]
[ "0.8335419", "0.79350287", "0.77536744", "0.7748599", "0.76948357", "0.76440716", "0.76287603", "0.76287603", "0.76210487", "0.761078", "0.75897783", "0.757352", "0.75697553", "0.75569373", "0.75336695", "0.74941546", "0.7478168", "0.7464024", "0.7455516", "0.744731", "0.7420307", "0.74064183", "0.7404334", "0.7353008", "0.73424685", "0.7341916", "0.7309753", "0.73067194", "0.73048276", "0.72713166", "0.7264665", "0.72567767", "0.7251667", "0.72243714", "0.72178376", "0.7213566", "0.71938527", "0.71595603", "0.71482515", "0.71470845", "0.71425194", "0.71301484", "0.70901084", "0.7072783", "0.70704937", "0.7051931", "0.70452917", "0.7038905", "0.70281166", "0.7018083", "0.7016962", "0.70164806", "0.70121604", "0.69869167", "0.69616324", "0.6950085", "0.6943346", "0.6937197", "0.69266814", "0.6905805", "0.69020635", "0.69020635", "0.6881843", "0.6880443", "0.68785655", "0.68785655", "0.6876129", "0.6875657", "0.6870001", "0.6850275", "0.6835022", "0.6834514", "0.68320215", "0.67999524", "0.6795726", "0.6791124", "0.67760855", "0.6769921", "0.6759245", "0.6757686", "0.67564976", "0.6752771", "0.6745556", "0.67297226", "0.67111665", "0.66882724", "0.6669713", "0.66412", "0.6635151", "0.662763", "0.66263247", "0.65971553", "0.6585567", "0.65791434", "0.6574525", "0.6572038", "0.65619075", "0.6542071", "0.6534093", "0.64797187" ]
0.6870703
68
Return whether the stack is empty.
public boolean empty() { return normalQueue.isEmpty() && reverseQueue.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean emptyStack() {\n return (expStack.size() == 0);\n }", "public boolean isEmpty()\n {\n return stack.size() == 0;\n }", "public boolean isEmpty() {\n \treturn stack.size() == 0;\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public boolean isEmpty() {\n return stackImpl.isEmpty();\n }", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public boolean empty() {\n System.out.println(stack.isEmpty());\n return stack.isEmpty();\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn (stackSize == 0 ? true : false);\n\t}", "public boolean empty() {\n return stack.empty();\n }", "public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }", "public boolean isEmpty(){\r\n\t\treturn stackData.isEmpty();\r\n\t}", "public final boolean isEmpty() {\n\t\treturn !(opstack.size() > 0);\n\t}", "public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean empty() {\n return popStack.isEmpty();\n }", "public boolean isEmpty() {return stackList.isEmpty();}", "public boolean empty() {\n return this.stack1.empty() && this.stack2.empty();\n }", "public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean isEmpty() {\n if (opStack.size() == 0) {\n return true;\n }\n return false;\n }", "public boolean empty() {\r\n return inStack.empty() && outStack.empty();\r\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "public boolean empty() {\n if (stackIn.empty() && stackOut.empty()) {\n return true;\n }\n return false;\n }", "public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }", "public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }", "public boolean isEmpty() {\n return downStack.isEmpty();\n }", "public boolean empty() {\n return stack1.empty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "public boolean empty() {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean isEmpty() \n {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean empty() {\n return mStack1.isEmpty() && mStack2.isEmpty();\n }", "public boolean isEmpty() {\n\n return (top == null);\n }", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "public boolean isFull() {\n return (this.top == this.stack.length);\n }", "public boolean isEmpty() {\r\n return (top == null);\r\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean isEmpty() {\n return (this.top == 0);\n }", "public boolean isEmpty() {\n\t\treturn (top == null) ? true : false;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn top == null;\n\t}", "public boolean isEmpty() {\n\t\t\n\t\treturn top == null;\n\t}", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean isEmpty()\r\n\t{\r\n\t\treturn top<=0;\r\n\t}", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty(){\n return (top == 0);\n }", "public boolean isEmpty()\r\n {\n return this.top == null;\r\n }", "public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean empty() {\n return push.isEmpty();\n }", "public boolean isEmpty() {\n return this.top == null;\n }", "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n if(this.top== -1) {\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\n\t\treturn front == null;\n\t}", "public boolean isFull(){\n return (top == employeeStack.length);\n }", "public boolean empty() { \n if (top == -1) {\n return true;\n }\n else {\n return false;\n }\n }", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}", "public boolean isEmpty() {\n return top==-1;\n }", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "public boolean isEmpty() {\n return topIndex < 0;\n }", "public static boolean isEmpty()\n { return currentSize==0; }", "public boolean isEmpty(){\n if(top == null)return true;\n return false;\n }", "public boolean isEmpty()\n {\n return heapSize == 0;\n }", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean isSet() {\n return !this.stack.isEmpty();\n }", "public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }", "public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn (head == null);\n\t}", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "boolean isFull(Stack stack){\n\t\tif(stack.getStackSize() >= 100) return true;\r\n\t\telse return false;\t\r\n\t}", "boolean isEmpty() {\n // -\n if(top == null)\n return true;\n return false;\n }", "public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}", "public boolean isEmpty() {\r\n\t\t\r\n\t\treturn topNode == null; // Checks if topNode is null;\r\n\t\t\r\n\t}", "public boolean isEmpty() {\n\t\treturn mSentinel == mRoot;// if the root is equal to the sentinel(empty\n\t\t\t\t\t\t\t\t\t// node) then the tree is empty otherwise it\n\t\t\t\t\t\t\t\t\t// is not\n\t}", "public boolean empty(){\n return this.top == -1;\n }", "public boolean isEmpty()\n\t{\n\t\treturn (head == null && tail == null);\n\t}", "boolean isEmpty() {\r\n\t\treturn top==0;\r\n\t}", "public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}", "public boolean isEmpty() {\n return doIsEmpty();\n }", "public boolean isEmpty() {\n return (head == tail) && (queue[head] == null);\n }", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public boolean empty() {\n return size <= 0;\n }" ]
[ "0.9066117", "0.90027034", "0.89577776", "0.89295036", "0.88910544", "0.88681304", "0.8840347", "0.88153386", "0.88096553", "0.88096553", "0.8760622", "0.8759322", "0.87508786", "0.87422633", "0.8738757", "0.8725327", "0.87200683", "0.8688953", "0.8647964", "0.86373746", "0.862185", "0.86108166", "0.8564758", "0.8534701", "0.8519928", "0.85026044", "0.8418757", "0.84062016", "0.8395389", "0.8385204", "0.8361282", "0.8334858", "0.8323372", "0.83114046", "0.8294634", "0.8279165", "0.82771087", "0.82547426", "0.8229214", "0.80268264", "0.80079293", "0.7986585", "0.7961362", "0.79540354", "0.79540354", "0.79540354", "0.7948324", "0.7914045", "0.78918713", "0.787265", "0.7841426", "0.7827109", "0.78242767", "0.78242767", "0.77449864", "0.7734441", "0.7724506", "0.77218294", "0.77218294", "0.7721632", "0.7710768", "0.76884645", "0.76664543", "0.76257354", "0.7618273", "0.7589583", "0.75880367", "0.7559805", "0.7545465", "0.7510894", "0.7508121", "0.75044817", "0.7495576", "0.7488195", "0.74825394", "0.74825394", "0.7472377", "0.7471812", "0.74717456", "0.74674255", "0.7446725", "0.7445359", "0.7442827", "0.7435932", "0.7429141", "0.74284697", "0.7418748", "0.74032605", "0.74022156", "0.74003243", "0.7395266", "0.73895067", "0.73833", "0.73826355", "0.73816353", "0.73700494", "0.73700494", "0.73700494", "0.73684126", "0.7366575", "0.7366209" ]
0.0
-1
Initialize your data structure here.
public MyStack() { One = new LinkedList<>(); Two = new LinkedList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initData() {\n }", "private void initData() {\n\t}", "private void initData() {\n\n }", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "private void InitData() {\n\t}", "@Override\r\n\tpublic void initData() {\n\t}", "private void initData(){\n\n }", "public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "public InitialData(){}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "protected @Override\r\n abstract void initData();", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }", "public void initData() {\n\t\tnotes = new ArrayList<>();\n\t\t//place to read notes e.g from file\n\t}", "public void initialize() {\n // empty for now\n }", "void initData(){\n }", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void initData(){\r\n \r\n }", "public void initialize()\n {\n }", "private void initData() {\n\t\tpages = new ArrayList<WallpaperPage>();\n\n\t}", "public void init() {\n \n }", "private void initializeData() {\n posts = new ArrayList<>();\n posts.add(new Posts(\"Emma Wilson\", \"23 years old\", R.drawable.logo));\n posts.add(new Posts(\"Lavery Maiss\", \"25 years old\", R.drawable.star));\n posts.add(new Posts(\"Lillie Watts\", \"35 years old\", R.drawable.profile));\n }", "public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }", "public void init() {\n\t\t}", "public void InitData() {\n }", "abstract void initializeNeededData();", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "private RandomData() {\n initFields();\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private TigerData() {\n initFields();\n }", "public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }", "private void initData() {\n requestServerToGetInformation();\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "private void initValues() {\n \n }", "private void init() {\n }", "public void initialize() {\n grow(0);\n }", "public void init() {\r\n\r\n\t}", "private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "protected void initialize() {\n \t\n }", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "@Override public void init()\n\t\t{\n\t\t}", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }", "private void initialize() {\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "private void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void initialize() {\n // TODO\n }", "public void initialize() {\r\n }", "@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "public void init() {\n\t\t\n\t}", "public void init() {\n\t\n\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "private void initialize() {\n\t\t\n\t}", "private void initialize() {\n this.pm10Sensors = new ArrayList<>();\n this.tempSensors = new ArrayList<>();\n this.humidSensors = new ArrayList<>();\n }", "@Override\r\n\tpublic void init() {}", "public void init() {\n\t\t// Read the data text file and load up the local database\n\t\tinitData();\n\n\t\t// Create the labels and the textbox\n\t\taddNameLabel();\n\t\taddNameBox();\n\t\taddGraphButton();\n\t\taddClearButton();\n\n\t\t// Set up the graph object\n\t\tgraph = new NameSurferGraph();\n\t\tadd(graph);\n\n\t}", "private void initialData() {\n\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public mainData() {\n }", "private void initStructures() throws RIFCSException {\n initTexts();\n initDates();\n }", "public void init() {\n initComponents();\n initData();\n }", "public void init() {\n\t}" ]
[ "0.79946685", "0.7973242", "0.7808862", "0.77763873", "0.77763873", "0.7643394", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.75553316", "0.7543321", "0.7543321", "0.75426376", "0.75426376", "0.75426376", "0.7532583", "0.75228804", "0.75228804", "0.7515626", "0.7494068", "0.7454065", "0.7388256", "0.7380365", "0.7328254", "0.7311082", "0.7256176", "0.7242837", "0.7242837", "0.720293", "0.7202036", "0.7164401", "0.7144378", "0.71355236", "0.7132754", "0.7131076", "0.7101955", "0.7098935", "0.70951265", "0.70578545", "0.7055706", "0.70423454", "0.7021184", "0.70061564", "0.6987191", "0.6979681", "0.6960125", "0.6946316", "0.69393814", "0.6938019", "0.6937645", "0.6935085", "0.6933533", "0.692056", "0.69171643", "0.6911375", "0.6903781", "0.68829435", "0.6881986", "0.6879309", "0.68750894", "0.6868541", "0.6867774", "0.6852462", "0.6851922", "0.68477225", "0.68477225", "0.68477225", "0.68477225", "0.6846597", "0.6818907", "0.6808544", "0.6805373", "0.6791477", "0.6787723", "0.6781544", "0.6781544", "0.6781544", "0.67674476", "0.676184", "0.67618203", "0.67537767", "0.67537767", "0.67537767", "0.6750694", "0.67330045", "0.67218685", "0.6721014", "0.67197996", "0.67170006", "0.67124057", "0.6708111", "0.66997004", "0.66991216", "0.6692312", "0.6687212", "0.66789055", "0.6668848", "0.66666573" ]
0.0
-1
Push element x onto stack.
public void push(int x) { // for pop(), so prepare // 要想 pop 省事 push到 queue tail 的 x 要 想办法放到队列第一位 // how 只要不空 移到另外一个 放好 x 再移回来 while (!One.isEmpty()) { Two.add(One.poll()); } One.add(x); while (!Two.isEmpty()) { One.add(Two.poll()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(int x) {\n stack.add(x);\n }", "public void push(int x) {\r\n inStack.push(x);\r\n }", "public void push(int x) {\n this.stack1.add(x);\n }", "public void push(int x) {\n pushStack.add(x);\n }", "public void push(int x) {\n\t\tstack.push(x);\n\t}", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void push(int x) {\n this.inputStack.push(x);\n }", "public void push(int x) {\n storeStack.push(x);\n }", "public void push(int x) {\n this.stack1.push(x);\n }", "public void push(int x) {\n inSt.push(x);\n\n }", "public void push(int x) {\n if (isIn) {\n stackIn.push(x);\n } else {\n while (!stackOut.empty()) {\n stackIn.push(stackOut.pop());\n }\n stackIn.push(x);\n isIn = true;\n }\n\n }", "public void push(int x) {\n rearStack.push(x);\n }", "public void push(int x) {\n /**\n * 将otherStack中所有元素还原到stack中后在栈顶加入新元素\n */\n while (!otherStack.isEmpty()) {\n stack.push(otherStack.pop());\n }\n stack.push(x);\n }", "public void push(int x) {\n Stack<Integer> tmp = new Stack<>();\n while(!s.isEmpty()) {\n tmp.push(s.pop());\n }\n tmp.push(x);\n while(!tmp.isEmpty()) {\n s.push(tmp.pop());\n }\n }", "public void push(int x) {\r\n Stack<Integer> newStack = new Stack<>();\r\n newStack.push(x);\r\n\r\n Stack<Integer> tmp = new Stack<>();\r\n while (!this.stack.isEmpty()) {\r\n tmp.push(this.stack.pop());\r\n }\r\n\r\n while (!tmp.isEmpty()) {\r\n newStack.push(tmp.pop());\r\n }\r\n\r\n\r\n this.stack = newStack;\r\n }", "public void push(int x) {\n push.push(x);\n }", "public void push(int x) {\n load();\n stack.push(x);\n unload();\n }", "public void push(int x) {\n if (mStack1.isEmpty()) {\n mFirst = x;\n }\n mStack1.push(x);\n }", "public void push(int x) {\n\t if(first == null){\n\t first = x;\n\t }\n\t s.push(x);\n\t}", "public void push(int x) {\n stk1.push(x);\n }", "public void push(int x) {\n temp.push(x);\n }", "public void push(int x) {\n stack1.push(x);\n }", "public void push(int x) {\n \tstack.push(x);\n \t// if stack is empty or the element is less than current minimal,\n \t// push it to minStack\n \tif (minStack.isEmpty()) {\n \t\tminStack.push(x);\n \t} else {\n\t \tint min = minStack.peek();\n\t \tif (x <= min) minStack.push(x);\n \t}\n }", "public void push(int x) {\n\t\tinput.push(x);\n\t}", "public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }", "public void push(int x) {\n\t\tlist.add(x);\n\t}", "void push(int x) {\n\t\tif (stack.size() == 0) {\n\t\t\tstack.push(x);\n\t\t\tminEle = x;\n\t\t} else if (x >= minEle) {\n\t\t\tstack.push(x);\n\t\t} else if (x < minEle) {\n\t\t\t// Push something smaller than original value\n\t\t\t// At any time when we pop , we will see if the value\n\t\t\t// of the peek is less then min or not\n\t\t\tstack.push(2 * x - minEle);\n\t\t\tminEle = x;\n\t\t}\n\t}", "public void push(int x) {\n data.add(x);\n }", "public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }", "public void push(int x) {\n // 将 popStack 中数据导入 pushStack\n while (!popStack.isEmpty()) {\n pushStack.push(popStack.pop());\n }\n // 压入 x\n pushStack.push(x);\n // 将数据导回 popStack\n while (!pushStack.isEmpty()) {\n popStack.push(pushStack.pop());\n }\n\n }", "public void push(int x) {\n \tlist.add(x);\n }", "public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }", "public void push(double x) \n {\n if (top == s.length) \n {\n \tthrow new IllegalArgumentException(\"full stack!\");\n }\n \n \n else\n {\n s[++top] = x;\n \n } \n }", "public void push(int x) {\n s1.push(x);\n temp = (Stack<Integer>) s1.clone();\n s2.clear();\n while (!temp.isEmpty()) {\n s2.push(temp.pop());\n }\n }", "public void push(int x) {\n stack1.push(x);\n if (stack2.isEmpty() || x <= stack2.peek()) {\n stack2.push(x);\n }\n }", "public void push(int x) {\n\t\tint max = maxStack.isEmpty() ? x : maxStack.peek();\n\t\tmaxStack.push(max > x ? max : x);\n\t\tstack.push(x);\n\t}", "public void push(T x) {\n\t\tl.push(x);\n\t}", "public void push(int x) {\n q.add(x);\n for (int i = 0; i < q.size() - 1; ++i) {\n q.add(q.poll());\n }\n }", "public void push(int x) {\n\t\tNode t = new Node();\n\t\tt.data = x;\n\t\tt.next = top;\n\t\ttop = t;\n\t}", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n left.push(x);\n }", "public void push(int x) {\n Node node = new Node(x);\n top.next = node;\n node.pre = top;\n top = node;\n size++;\n }", "public void push(int x) {\n if(afterRotate){\n rotate();\n afterRotate = false;\n }\n stack.push(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.add(x);\n for (int i = 0; i < queue.size()-1; i++) {\n queue.add(queue.poll());\n }\n }", "public void push(int x) {\n queue.push(x);\n }", "public void push(int x) {\n if(x <= min){\n stack.push(min);\n min=x;\n }\n stack.push(x);\n }", "public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }", "public void push(int x) { //全部放到第一个\n temp1.push(x);\n }", "public void push(E x) {\n\t\t\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void push(int x) {\n q1.add(x);\n int n = q1.size();\n for (int i = 1; i < n; i++) {\n q1.add(q1.poll());\n }\n }", "public void push(int x) {\n Queue<Integer> tmp = new LinkedList<>();\n while (!queue.isEmpty()) {\n tmp.add(queue.remove());\n }\n queue.add(x);\n \n while (!tmp.isEmpty()) {\n queue.add(tmp.remove());\n }\n }", "public void push(int x) {\n one.add(x);\n for(int i=0;i<one.size()-1;i++)\n {\n one.add(one.poll());\n }\n \n }", "public void push(int x) {\n\t int size=q.size();\n\t q.offer(x);\n\t for(int i=0;i<size;i++){\n\t q.offer(q.poll());\n\t }\n\t \n\t }", "public void push(int x) {\n int n = queue.size();\n queue.offer(x);\n for (int i = 0; i < n; i++) {\n queue.offer(queue.poll());\n }\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}", "void push(Integer x) {\n\n\t\tif (isEmpty()) {\n\t\t\ttop = new Node(x);\n\t\t\tmid = top;\n\t\t\ttotalNodes++;\n\t\t} else {\n\t\t\tNode n = new Node(x);\n\t\t\tn.next = top;\n\t\t\ttop.prev = n;\n\t\t\ttop = n;\n\t\t\ttotalNodes++;\n\t\t\tif (totalNodes % 2 != 0) {\n\t\t\t\tmid = mid.prev;\n\t\t\t}\n\t\t}\n\t}", "public void push(int x) {\n if (head == null) {\n head = new Node1(x, x);\n } else {\n head = new Node1(x, Math.min(x, head.min), head);\n }\n }", "public void push(int x) {\n q.offer(x);\n }", "@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}", "public void push(int x) {\n // 第一步先 push\n queue.offer(x);\n // 第二步把前面的变量重新倒腾一遍\n // 这一部分代码很关键,在树的层序遍历中也用到了\n int size = queue.size() - 1;\n for (int i = 0; i < size; i++) {\n queue.offer(queue.poll());\n }\n }", "void push(Integer x) {\n if (s.isEmpty()) {\n minEle = x;\n s.push(x);\n System.out.println(\"Number Inserted: \" + x);\n return;\n }\n // if new number is less than original minEle\n if (x < minEle) {\n s.push(2 * x - minEle);\n minEle = x;\n } else {\n s.push(x);\n }\n System.out.println(\"Number Inserted: \" + x);\n }", "public void push(int x) {\n queue.offer(x);\n }", "public void push(int element) {\n stack1.push(element);\n }", "public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }", "public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }", "public void push(int x) {\r\n this.queueMain.offer(x);\r\n }", "public void push(T x);", "public void push(int x) {\n p.next=new ListNode(x);\n p = p.next;\n }", "@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}", "public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "public void push(int x) {\n\n if (list.isEmpty()) {\n head = x;\n }\n\n list2.add(x);\n while (!(list.isEmpty())) {\n list2.add(list.poll());\n }\n\n while (!(list2.isEmpty())) {\n list.add(list2.poll());\n }\n\n\n }", "public void push(int x) {\n while (!forReverse.isEmpty()) {\n queue.add(forReverse.poll());\n }\n queue.add(x);\n }", "void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}", "private static void sortedInsert(Stack<Integer> stack, int x) {\n if (stack.isEmpty() || stack.peek() < x) {\n stack.push(x);\n return;\n }\n int temp = stack.pop();\n sortedInsert(stack, x);\n stack.push(temp);\n }", "void push(int stackNum, int value) throws Exception{\n\t//check if we have space\n\tif(stackPointer[stackNum] + 1 >= stackSize){ //last element\n\t\tthrows new Exception(\"Out of space.\");\n\t}\n\n\t//increment stack pointer and then update top value\n\tstackPointer[stackNum]++; \n\tbuffer[absTopOfStack(stackNum)] = value;\n}", "public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }", "public void push(T x)\n\t{\n\t\t// If the head is null, set the head equal\n\t\t// to the new node.\n\t\tif(head == null)\n\t\t\thead = new Node<T>(x);\n\t\telse\n\t\t{\n\t\t\t// Loop through the list and add the new node\n\t\t\t// on to the back of the list.\n\t\t\tNode<T> curr = head;\n\t\t\twhile(curr.getNext() != null)\n\t\t\t\tcurr = curr.getNext();\n\n\t\t\tNode<T> last = new Node<T>(x);\n\t\t\tcurr.setNext(last);\n\t\t}\t\n\t}", "public void push(int x) {\n if(!queueA.isEmpty()){\n queueA.add(x);\n }else if(!queueB.isEmpty()){\n queueB.add(x);\n }else{\n queueA.add(x);\n }\n }", "public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }", "public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n }\n else {\n q2.add(x);\n while(q1.size() > 0) {\n q2.add(q1.poll());\n }\n }\n }", "void push(int x);", "void push(T x);", "public void push(int x) {\n q1.push(x);\n if (q2.size() > 0){\n q2.remove();\n }\n }", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n } else {\n q2.add(x);\n while(q1.size() > 0){\n q2.add(q1.poll());\n }\n }\n }", "public void push (E item){\n this.stack.add(item);\n }", "public void push(T value) {\n \tstack.add(value);\n }" ]
[ "0.86726034", "0.85932225", "0.85570914", "0.8550038", "0.852482", "0.8498592", "0.8488227", "0.8461912", "0.8458076", "0.8428038", "0.8376653", "0.8370226", "0.8368897", "0.8343204", "0.83385926", "0.8335069", "0.8333074", "0.83219844", "0.83110696", "0.8299808", "0.82648236", "0.8260843", "0.8227758", "0.81988394", "0.819731", "0.81950635", "0.8136101", "0.813282", "0.81123054", "0.81123054", "0.81123054", "0.8089274", "0.8086407", "0.8082756", "0.8075835", "0.8058963", "0.8050122", "0.80101556", "0.79978484", "0.79816735", "0.7965629", "0.7918633", "0.78817797", "0.7859532", "0.7854534", "0.7853485", "0.78523874", "0.78523874", "0.78476787", "0.7841256", "0.78404015", "0.7834868", "0.7825307", "0.780459", "0.7791437", "0.77746886", "0.771773", "0.7690058", "0.765422", "0.765174", "0.7648162", "0.7646733", "0.76382875", "0.7637257", "0.7633213", "0.7633213", "0.7625352", "0.7617576", "0.7603999", "0.75609857", "0.75587195", "0.75492984", "0.75358003", "0.75231606", "0.74670357", "0.7450564", "0.74457633", "0.7396862", "0.73720616", "0.7360162", "0.73447925", "0.7335559", "0.7328421", "0.7286221", "0.7262818", "0.72311556", "0.72194356", "0.72047585", "0.71959877", "0.7185571", "0.717108", "0.7165948", "0.7088451", "0.7078484", "0.7070283", "0.70639855", "0.70509607", "0.704537", "0.70401484", "0.70389265" ]
0.73832387
78
Removes the element on top of the stack and returns that element.
public int pop() { return One.poll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T pop() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//remove top element from stack\n\t\t//and \"clear to let GC do its work\"\n\t\treturn elements.remove(elements.size() - 1);\n\t}", "@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}", "public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }", "public T pop() {\n T top = peek();\n stack[topIndex] = null;\n topIndex--;\n return top;\n }", "public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }", "public E pop()\n {\n E topVal = stack.removeFirst();\n return topVal;\n }", "public E pop(){\n return this.stack.remove(stack.size()-1);\n }", "public Object pop()\r\n {\n assert !this.isEmpty();\r\n\t\t\r\n Node oldTop = this.top;\r\n this.top = oldTop.getNext();\r\n oldTop.setNext(null); // enable garbage collection\r\n return oldTop.getItem();\r\n }", "public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}", "private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }", "public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}", "public T pop() {\r\n\t\tT ele = top.ele;\r\n\t\ttop = top.next;\r\n\t\tsize--;\r\n\t\t\r\n\t\treturn ele;\r\n\t}", "public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "public T pop() {\n if(isEmpty()) {\n throw new NoSuchElementException(\"Stack is empty\");\n }\n return this.stackArray[top--];\n }", "@Override\n\tpublic T pop() {\n\t\tif(isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is Empty\");\n\t\treturn null;}\n\t\ttop--;\t\t\t\t\t\t//top-- now before since we need index top-1\n\t\tT result = stack[top];\n\t\tstack[top] = null;\n\t\treturn result;\n\t\t\t\n\t}", "public E removeFirst() {\n return pop();\n }", "public Object pop() {\n return stack.pop();\n }", "public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }", "public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }", "public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }", "Object pop();", "public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}", "public E pop() {\n if(isEmpty()) throw new EmptyStackException();\n\n E itemPopped = this.stack[top-1];\n this.stack[top-1] = null;\n top--;\n return itemPopped;\n\n }", "public Object pop();", "public T pop() {\n\t\tT value = null;\n\t\tif (!isEmpty()) {\n\t\t\ttop = top.next;\n\t\t\tvalue = top.value;\n\t\t}\n\t\treturn value; // returning popped value\n\t}", "public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public Item pop() {\n if(isEmpty()) return null;\n Item item = top.data;\n top = top.next;\n size--;\n return item;\n\n }", "public T pop() throws EmptyStackException\r\n {\r\n if (isEmpty())\r\n throw new EmptyStackException();\r\n\r\n top--;\r\n T result = stack[top];\r\n stack[top] = null; \r\n\r\n return result;\r\n }", "public TYPE pop();", "public Object pop()\n\t{\n\t\tif (size == 0)\n\t\t\tthrow new EmptyStackException();\n\t\t\n\t\tObject result = elements[--size];\n\t\telements[size] = null;\n\t\treturn result;\n\t}", "public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }", "@Override\n\tpublic E pop() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\tE element = arr[top];\n\t\tarr[top--] = null;\n\t\treturn element;\n\t}", "private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}", "T pop();", "T pop();", "T pop();", "public Object pop() {\n if (isEmpty())\n throw new EmptyStackException();\n\n Object value = peek();\n collection.remove(collection.size() - 1);\n return value;\n }", "public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}", "public T pop() throws EmptyStackException {\n if (top == null) {\n throw new EmptyStackException();\n }\n\n StackNode<T> removed = top;\n top = top.getNext();\n return removed.getData();\n }", "public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}", "@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }", "public Object pop() {\n if (top != null) {\n Object item = top.getOperand();\n\n top = top.next;\n return item;\n }\n\n System.out.println(\"Stack is empty\");\n return null;\n\n }", "public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}", "public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }", "@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }", "T pop() {\n if (stackSize == 0) {\n throw new EmptyStackException();\n }\n return stackArray[--stackSize];\n }", "@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}", "public String pop() {\n String removed = NOTHING;\n // Is there anything in the stack to remove?\n if (usage > 0) {\n // Obtain the topmost value from the stack\n removed = this.foundation[this.foundation.length - this.usage];\n // Clean up the array location\n this.foundation[this.foundation.length - this.usage] = null;\n // Decrease usage counter\n usage--;\n }\n return removed;\n }", "public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}", "public T pop() {\r\n\r\n\t\tT top = peek(); // Throws exception if stack is empty.\r\n\t\t\r\n\t\t// Sets top of stack to next link. \r\n\t\ttopNode = topNode.getNext();\r\n\t\t\r\n\t\treturn top;\r\n\t\t\r\n\t}", "public T pop() {\n if (this.top == null) {\n throw new EmptyStackException();\n }\n T data = this.top.data;\n this.top = this.top.below;\n return data;\n }", "private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}", "public T pop() {\n\t\tif (isEmpty())\n\t\t\tthrow new EmptyStackException();\n\t\telse\n\t\t\treturn vector.remove(vector.size() - 1);\t\t\n\t}", "public Session pop() {\r\n\t\tint oldIndex = index;\r\n\t\tif (index >= 0) {\r\n\t\t\tindex--;\r\n\t\t\treturn stack[oldIndex];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "@Override\r\n\tpublic E pop() {\n\t\treturn null;\r\n\t}", "public void pop();", "public final Object pop()\n {\n synchronized (this.stack)\n {\n return this.stack[--this.pointer];\n }\n }", "@Override\n\tpublic E pop() {\n\t\treturn null;\n\t}", "Object pop(){\r\n\t\tlastStack = getLastStack();\r\n\t\tif(lastStack!=null){\r\n\t\t\tint num = lastStack.pop();\r\n\t\t\treturn num;\r\n\t\t} else {stacks.remove(stacks.size()-1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic T pop() throws StackUnderflowException {\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\tstack.remove(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "public T pop() {\n if (head == null) {\n return null;\n } else {\n Node<T> returnedNode = head;\n head = head.getNext();\n return returnedNode.getItem();\n }\n }", "@Override\n\tpublic Object pop() {\n\t\tif (elementCount == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\telementCount--;\n\t\treturn elementData[elementCount];\n\t}", "public T pop()\n {\n return pop(first);\n }", "public O popBack()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = last;\r\n last = last.getPrevious();\r\n\r\n count--;\r\n if (isEmpty()) first = null;\r\n else last.setNext(null);\r\n return l.getObject();\r\n } else\r\n return null;\r\n \r\n }", "E pop() throws EmptyStackException;", "public Object pop() {\n return fStack.pop();\n }", "@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public E pop() {\n return stackImpl.pop();\n }", "public E pop() \r\n {\r\n E o = list.get(getSize() - 1);\r\n list.remove(getSize() - 1);\r\n return o;\r\n }", "public AnyType pop() throws StackException;", "public K pop() {\n\t\tK data = null;\r\n\t\tif(top!=null){\r\n\t\t\tdata = top.data;\r\n\t\t\ttop = top.next;\r\n\t\t\tsize--;\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "public Item pop()\n {\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n Item item = top.item;\n top = top.next;\n N--;\n return item;\n }", "public T pop() {\n StackNode tempNode = peekNode();\n\n if(length > 1) {\n lastNode = peekNode().getParent();\n tempNode.setParent(null);\n length--;\n return (T) tempNode.getTData();\n }\n else if(length == 1) {\n lastNode = new StackNode();\n length--;\n return (T) tempNode.getTData();\n }\n else {\n throw new IndexOutOfBoundsException(\"Your stack is empty!\");\n }\n }", "public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}", "public Node<T> pop() {\n\n\t\tNode<T> popNode = new Node<T>();\n\t\tpopNode = getTopNode();\n\n\t\t/*\n\t\t * Three special cases for a pop() are a empty stack, only one node at\n\t\t * the top and a stack with multiple elements.\n\t\t */\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is EMPTY!!\");\n\t\t\treturn (null);\n\t\t} else if (stackSize == 1) {\n\t\t\ttopNode = null;\n\t\t} else {\n\t\t\ttopNode = topNode.getNextNode();\n\t\t}\n\n\t\tSystem.out.println(\"## POP \\\"\" + popNode.data + \"\\\" FROM STACK ##\");\n\n\t\t// Decrease Stack Size\n\t\tsetStackSize(getStackSize() - 1);\n\t\treturn (popNode);\n\t}", "public T pop() throws StackUnderflowException{\r\n\t\t\t\t\r\n\t\t// check if the stack is empty before popping up.\r\n\t\tif(stackData.isEmpty())\r\n\t\t\tthrow new StackUnderflowException();\r\n\r\n\t\treturn stackData.remove(stackData.size()-1); //popping;\r\n\t}", "public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public E pop(){\r\n Node<E> curr = top;\r\n top = top.getNext();\r\n size--;\r\n return (E)curr.getData();\r\n \r\n }", "@Override\n\tpublic E pop() {\n\t\tif(size == 0) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\tsize--;\n\t\treturn list.remove(0);\n\t}", "public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }", "E pop();", "E pop();", "E pop();", "@Override\n public T pop() {\n if (!isEmpty()) {\n T data = backing[size - 1];\n backing[size - 1] = null;\n size--;\n return data;\n } else {\n throw new NoSuchElementException(\"The stack is empty\");\n }\n }" ]
[ "0.7831054", "0.78167725", "0.7808246", "0.7797564", "0.7689596", "0.7677747", "0.7633739", "0.76071864", "0.7598945", "0.7597015", "0.7577195", "0.75743157", "0.75456405", "0.75169796", "0.750027", "0.74873495", "0.74667877", "0.7460093", "0.74569875", "0.7456191", "0.744837", "0.74207103", "0.7406906", "0.74033815", "0.7401186", "0.7379766", "0.7370952", "0.73472834", "0.734713", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7324371", "0.7313926", "0.7311951", "0.73110545", "0.7310549", "0.7304512", "0.7297009", "0.7293909", "0.7293909", "0.7293909", "0.7284467", "0.72834486", "0.72771436", "0.7270916", "0.7266674", "0.72660893", "0.72511417", "0.7238035", "0.72323054", "0.72286993", "0.72209424", "0.72192407", "0.7210599", "0.72091603", "0.7199765", "0.7196248", "0.7195882", "0.7189582", "0.71828914", "0.71817344", "0.7177487", "0.71751624", "0.71638006", "0.7152466", "0.7151245", "0.7142062", "0.71410716", "0.71334636", "0.7117701", "0.71173024", "0.71133095", "0.71099454", "0.71064913", "0.71064913", "0.71064913", "0.71064913", "0.71064913", "0.7102089", "0.71010643", "0.70969707", "0.7088635", "0.7065762", "0.7061361", "0.70485055", "0.7044555", "0.7040969", "0.70397604", "0.7035089", "0.7034882", "0.7031653", "0.70310974", "0.70310974", "0.70310974", "0.70287824" ]
0.0
-1
Get the top element.
public int top() { return One.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int top() {\n return topElem;\n }", "public E top() {\n return !isEmpty() ? head.item : null;\n }", "public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}", "public T getTop( );", "E top();", "public int top() { return 0; }", "public int top() {\r\n return top;\r\n }", "public int top() {\r\n return top;\r\n }", "public int getTop() {\n\t\treturn this.top;\n\t}", "public int getTop() {\n\treturn top;\n }", "public Integer getTop() {\n return top;\n }", "public int top() {\n return top;\n }", "public int getTop() {\n return top;\n }", "public T top();", "public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}", "Location getTop() {\n // -\n if(!isEmpty())\n return top.getLocation();\n return null;\n }", "public float getTop() {\n return internalGroup.getTop();\n }", "public abstract Object top();", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "public int top() {\n return (int) one.peek();\n \n }", "public int top() {\n return list.peek();\n }", "public E top() {\n return head.prev.data;\n }", "public int top() {\n return top.value;\n }", "public int top();", "public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }", "public MeasurementCSSImpl getTop()\n\t{\n\t\treturn top;\n\t}", "public E peek(){\n\t\treturn top.element;\n\t}", "public int top() {\n\t return q.peek();\n\t }", "public Node top() {\r\n\t\treturn start;\r\n\t}", "public int top() {\n return q.peek();\n }", "public int top() {\n \treturn list.get(list.size()-1);\n }", "public int getTop() {\n return position[0] - (size - 1) / 2;\n }", "public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}", "public int top() {\n return objects.peek();\n }", "public int top() {\n return q1.getFirst();\n }", "public E top()\n\tthrows EmptyStackException;", "public E top() {\n\t\tif (this.top == null) {\n\t\t\tthrow new EmptyStackException( );\n\t\t}\n\t\treturn this.top.data;\n\t\t\t\n\t}", "@Override\n\tpublic E top() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\treturn arr[top];\n\t}", "public Node<T> getTopNode() {\n\t\treturn topNode;\n\t}", "public int top() {\n return queue.element();\n }", "public int top() {\n\t\treturn stack.peek();\n \n }", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "public int top() {\n return q1.peek();\n }", "public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}", "public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }", "public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public int top() {\n return p.val;\n }", "public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }", "public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }", "public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }", "@Nullable\n public DpProp getTop() {\n if (mImpl.hasTop()) {\n return DpProp.fromProto(mImpl.getTop());\n } else {\n return null;\n }\n }", "public String top(){\n if(!(pilha.size() == 0)){\n return pilha.get(pilha.size()-1);\n }else{\n return null;\n }\n }", "public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }", "public E popTop() {\n // FILL IN\n }", "public int top() {\n return stack1.peek();\n }", "public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}", "public View getTopView() {\n\t\tint topViewIndex = getChildCount() - 1;\n\t\treturn getChildAt(topViewIndex);\n\t}", "public Card top() {\n\t\treturn firstCard;\n\t}", "public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int getElementAtTopOfStack() {\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n return myarray[top];\n \n }", "int top();", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public E top() throws StackUnderflowException {\r\n E item = null;\r\n if(!isEmpty()) item = items.get(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n \r\n return item;\r\n }", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public int top() {\n move();\n return reverseQueue.peek();\n }", "public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }", "@VisibleForTesting\n public TaskStack getTopStack() {\n if (DisplayContent.this.mTaskStackContainers.getChildCount() > 0) {\n return (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(DisplayContent.this.mTaskStackContainers.getChildCount() - 1);\n }\n return null;\n }", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}", "public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }", "public T peek() {\n return top.getData();\n }", "public int top() {\n return queue.peekLast();\n }", "public int top() {\n return queue.getLast();\n }", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "@Override\n\tpublic T top()\n\t{\n if(list.size()==0)\n {\n throw new IllegalStateException(\"Stack is empty\");\n }\n return list.get(getSize()-1);\n\t}", "public Integer peek() {\n if (hasTop)\n return top;\n top = it.next();\n hasTop = true;\n return top;\n }", "public T top() throws StackUnderflowException;", "@DISPID(-2147417103)\n @PropGet\n int offsetTop();", "public static Interval topInterval(){\n\t\treturn top;\n\t}", "public double getTop() {\n return this.yT;\n }", "public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}", "public T peek() {\n\t\treturn top.value;\n\t}", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "public Card getTopCard() {\n\t\treturn topCard;\n\t}", "public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public Card topCard() {\n return this.deck.peek();\n }", "public Card showTop() {\n\t\treturn hand.get(0);\n\t}", "public int top() {\n return queue1.peek();\n }", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "@Override\n public E top()throws EmptyStackException{\n E c = null;\n if(!isEmpty()){\n c = stackArray[count-1];\n return c;\n }\n \n else \n throw new EmptyStackException();\n }", "public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}", "public int top() {\n if (data.size() != 0) {\n return data.get(data.size() - 1);\n }\n throw new RuntimeException(\"top: 栈为空,非法操作\");\n }", "@Override\n\tpublic final int getBodyOffsetTop() {\n\t\treturn DOMImpl.impl.getBodyOffsetTop(documentFor());\n\t}", "public int stackTop() {\r\n\t return array[top];\r\n\t }", "@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "protected abstract String getTopElementDesc();" ]
[ "0.8335419", "0.79350287", "0.77536744", "0.7748599", "0.76948357", "0.76440716", "0.76287603", "0.76287603", "0.76210487", "0.761078", "0.75897783", "0.757352", "0.75697553", "0.75569373", "0.74941546", "0.7478168", "0.7464024", "0.7455516", "0.744731", "0.7420307", "0.74064183", "0.7404334", "0.7353008", "0.73424685", "0.7341916", "0.7309753", "0.73067194", "0.73048276", "0.72713166", "0.7264665", "0.72567767", "0.7251667", "0.72243714", "0.72178376", "0.7213566", "0.71938527", "0.71595603", "0.71482515", "0.71470845", "0.71425194", "0.71301484", "0.70901084", "0.7072783", "0.70704937", "0.7051931", "0.70452917", "0.7038905", "0.70281166", "0.7018083", "0.7016962", "0.70164806", "0.70121604", "0.69869167", "0.69616324", "0.6950085", "0.6943346", "0.6937197", "0.69266814", "0.6905805", "0.69020635", "0.69020635", "0.6881843", "0.6880443", "0.68785655", "0.68785655", "0.6876129", "0.6875657", "0.6870703", "0.6870001", "0.6850275", "0.6835022", "0.6834514", "0.68320215", "0.67999524", "0.6795726", "0.6791124", "0.67760855", "0.6769921", "0.6759245", "0.6757686", "0.67564976", "0.6752771", "0.6745556", "0.67297226", "0.67111665", "0.66882724", "0.6669713", "0.66412", "0.6635151", "0.662763", "0.66263247", "0.65971553", "0.6585567", "0.65791434", "0.6574525", "0.6572038", "0.65619075", "0.6542071", "0.6534093", "0.64797187" ]
0.75336695
14
Returns whether the stack is empty.
public boolean empty() { return One.isEmpty() && Two.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean emptyStack() {\n return (expStack.size() == 0);\n }", "public boolean isEmpty()\n {\n return stack.size() == 0;\n }", "public boolean isEmpty() {\n \treturn stack.size() == 0;\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public boolean isEmpty() {\n return stackImpl.isEmpty();\n }", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n System.out.println(stack.isEmpty());\n return stack.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn (stackSize == 0 ? true : false);\n\t}", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.empty();\n }", "public boolean isEmpty(){\r\n\t\treturn stackData.isEmpty();\r\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }", "public final boolean isEmpty() {\n\t\treturn !(opstack.size() > 0);\n\t}", "public boolean empty() {\n return popStack.isEmpty();\n }", "public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {return stackList.isEmpty();}", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public boolean empty() {\n return this.stack1.empty() && this.stack2.empty();\n }", "public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }", "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "public boolean isEmpty() {\n if (opStack.size() == 0) {\n return true;\n }\n return false;\n }", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "public boolean empty() {\r\n return inStack.empty() && outStack.empty();\r\n }", "public boolean empty() {\n if (stackIn.empty() && stackOut.empty()) {\n return true;\n }\n return false;\n }", "public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }", "public boolean isEmpty() {\n return downStack.isEmpty();\n }", "public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }", "public boolean empty() {\n return stack1.empty();\n }", "public boolean empty() {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean empty() {\n return mStack1.isEmpty() && mStack2.isEmpty();\n }", "public boolean isEmpty() \n {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "public boolean isEmpty() {\n\n return (top == null);\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean isEmpty() {\r\n return (top == null);\r\n }", "public boolean isEmpty() {\n return (this.top == 0);\n }", "public boolean isEmpty() {\n\t\treturn (top == null) ? true : false;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn top == null;\n\t}", "public boolean isEmpty() {\n\t\t\n\t\treturn top == null;\n\t}", "public boolean isFull() {\n return (this.top == this.stack.length);\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn top<=0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}", "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean empty() {\n return push.isEmpty();\n }", "public boolean isEmpty(){\n return (top == 0);\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean isEmpty()\r\n {\n return this.top == null;\r\n }", "public boolean isEmpty() {\n return this.top == null;\n }", "public boolean isEmpty() {\n if(this.top== -1) {\n return true;\n }\n return false;\n }", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "public boolean isEmpty() {\n\t\treturn front == null;\n\t}", "public boolean empty() { \n if (top == -1) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "public boolean isEmpty() {\n return top==-1;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}", "public boolean isEmpty()\n {\n return heapSize == 0;\n }", "public boolean isFull(){\n return (top == employeeStack.length);\n }", "public static boolean isEmpty()\n { return currentSize==0; }", "public boolean isEmpty() {\n return topIndex < 0;\n }", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}", "public boolean isEmpty(){\n if(top == null)return true;\n return false;\n }", "public boolean isEmpty() {\n\t\treturn mSentinel == mRoot;// if the root is equal to the sentinel(empty\n\t\t\t\t\t\t\t\t\t// node) then the tree is empty otherwise it\n\t\t\t\t\t\t\t\t\t// is not\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn (head == null);\n\t}", "public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}", "public boolean isSet() {\n return !this.stack.isEmpty();\n }", "public boolean isEmpty() {\r\n\t\t\r\n\t\treturn topNode == null; // Checks if topNode is null;\r\n\t\t\r\n\t}", "public final boolean isEmpty() {\n return mSize == 0;\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean empty() {\n return size <= 0;\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\n return doIsEmpty();\n }", "public boolean empty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public boolean isEmpty() {\r\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}" ]
[ "0.9056883", "0.89877164", "0.8927279", "0.8913691", "0.88952327", "0.8861644", "0.8812663", "0.8803307", "0.8803307", "0.88012934", "0.8762096", "0.87552625", "0.8734233", "0.8733799", "0.8713177", "0.87054056", "0.869478", "0.8679571", "0.866394", "0.86360806", "0.8620381", "0.8588986", "0.8536643", "0.8519639", "0.84929776", "0.84534115", "0.84058106", "0.83876854", "0.83645254", "0.83537555", "0.83166593", "0.83037966", "0.828262", "0.82777196", "0.82748145", "0.8235703", "0.82064724", "0.8194284", "0.81544614", "0.8025837", "0.8013609", "0.79574287", "0.79574287", "0.79574287", "0.7939453", "0.7928077", "0.7913513", "0.7880019", "0.78706414", "0.7865312", "0.7810955", "0.7810955", "0.77883196", "0.77276206", "0.77276206", "0.7723528", "0.7723445", "0.77220076", "0.7701561", "0.76997113", "0.76993895", "0.7675793", "0.76150143", "0.7590963", "0.75841945", "0.7563374", "0.754169", "0.7534229", "0.7515534", "0.7509447", "0.7505655", "0.7505497", "0.7497732", "0.74970293", "0.74944997", "0.7487798", "0.7487798", "0.7473871", "0.74631596", "0.74569964", "0.744851", "0.7444053", "0.742821", "0.7427812", "0.74265707", "0.74222845", "0.7415967", "0.74026", "0.7399876", "0.7399876", "0.7399876", "0.7395811", "0.7395516", "0.7395358", "0.7395175", "0.7390058", "0.738929", "0.7388407", "0.73881257", "0.7385511", "0.7385511" ]
0.0
-1
Initialize your data structure here.
public MyStack() { queue = new LinkedList<>(); forReverse = new LinkedList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initData() {\n }", "private void initData() {\n\t}", "private void initData() {\n\n }", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "private void InitData() {\n\t}", "@Override\r\n\tpublic void initData() {\n\t}", "private void initData(){\n\n }", "public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "public InitialData(){}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "protected @Override\r\n abstract void initData();", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }", "public void initData() {\n\t\tnotes = new ArrayList<>();\n\t\t//place to read notes e.g from file\n\t}", "public void initialize() {\n // empty for now\n }", "void initData(){\n }", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void initData(){\r\n \r\n }", "public void initialize()\n {\n }", "private void initData() {\n\t\tpages = new ArrayList<WallpaperPage>();\n\n\t}", "public void init() {\n \n }", "private void initializeData() {\n posts = new ArrayList<>();\n posts.add(new Posts(\"Emma Wilson\", \"23 years old\", R.drawable.logo));\n posts.add(new Posts(\"Lavery Maiss\", \"25 years old\", R.drawable.star));\n posts.add(new Posts(\"Lillie Watts\", \"35 years old\", R.drawable.profile));\n }", "public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }", "public void init() {\n\t\t}", "public void InitData() {\n }", "abstract void initializeNeededData();", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "private RandomData() {\n initFields();\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private TigerData() {\n initFields();\n }", "public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }", "private void initData() {\n requestServerToGetInformation();\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "private void initValues() {\n \n }", "private void init() {\n }", "public void initialize() {\n grow(0);\n }", "public void init() {\r\n\r\n\t}", "private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "protected void initialize() {\n \t\n }", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "@Override public void init()\n\t\t{\n\t\t}", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }", "private void initialize() {\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "private void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void initialize() {\n // TODO\n }", "public void initialize() {\r\n }", "@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "public void init() {\n\t\t\n\t}", "public void init() {\n\t\n\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "private void initialize() {\n\t\t\n\t}", "private void initialize() {\n this.pm10Sensors = new ArrayList<>();\n this.tempSensors = new ArrayList<>();\n this.humidSensors = new ArrayList<>();\n }", "@Override\r\n\tpublic void init() {}", "public void init() {\n\t\t// Read the data text file and load up the local database\n\t\tinitData();\n\n\t\t// Create the labels and the textbox\n\t\taddNameLabel();\n\t\taddNameBox();\n\t\taddGraphButton();\n\t\taddClearButton();\n\n\t\t// Set up the graph object\n\t\tgraph = new NameSurferGraph();\n\t\tadd(graph);\n\n\t}", "private void initialData() {\n\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public mainData() {\n }", "private void initStructures() throws RIFCSException {\n initTexts();\n initDates();\n }", "public void init() {\n initComponents();\n initData();\n }", "public void init() {\n\t}" ]
[ "0.79946685", "0.7973242", "0.7808862", "0.77763873", "0.77763873", "0.7643394", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.75553316", "0.7543321", "0.7543321", "0.75426376", "0.75426376", "0.75426376", "0.7532583", "0.75228804", "0.75228804", "0.7515626", "0.7494068", "0.7454065", "0.7388256", "0.7380365", "0.7328254", "0.7311082", "0.7256176", "0.7242837", "0.7242837", "0.720293", "0.7202036", "0.7164401", "0.7144378", "0.71355236", "0.7132754", "0.7131076", "0.7101955", "0.7098935", "0.70951265", "0.70578545", "0.7055706", "0.70423454", "0.7021184", "0.70061564", "0.6987191", "0.6979681", "0.6960125", "0.6946316", "0.69393814", "0.6938019", "0.6937645", "0.6935085", "0.6933533", "0.692056", "0.69171643", "0.6911375", "0.6903781", "0.68829435", "0.6881986", "0.6879309", "0.68750894", "0.6868541", "0.6867774", "0.6852462", "0.6851922", "0.68477225", "0.68477225", "0.68477225", "0.68477225", "0.6846597", "0.6818907", "0.6808544", "0.6805373", "0.6791477", "0.6787723", "0.6781544", "0.6781544", "0.6781544", "0.67674476", "0.676184", "0.67618203", "0.67537767", "0.67537767", "0.67537767", "0.6750694", "0.67330045", "0.67218685", "0.6721014", "0.67197996", "0.67170006", "0.67124057", "0.6708111", "0.66997004", "0.66991216", "0.6692312", "0.6687212", "0.66789055", "0.6668848", "0.66666573" ]
0.0
-1
Push element x onto stack.
public void push(int x) { while (!forReverse.isEmpty()) { queue.add(forReverse.poll()); } queue.add(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(int x) {\n stack.add(x);\n }", "public void push(int x) {\r\n inStack.push(x);\r\n }", "public void push(int x) {\n this.stack1.add(x);\n }", "public void push(int x) {\n pushStack.add(x);\n }", "public void push(int x) {\n\t\tstack.push(x);\n\t}", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void push(int x) {\n this.inputStack.push(x);\n }", "public void push(int x) {\n storeStack.push(x);\n }", "public void push(int x) {\n this.stack1.push(x);\n }", "public void push(int x) {\n inSt.push(x);\n\n }", "public void push(int x) {\n if (isIn) {\n stackIn.push(x);\n } else {\n while (!stackOut.empty()) {\n stackIn.push(stackOut.pop());\n }\n stackIn.push(x);\n isIn = true;\n }\n\n }", "public void push(int x) {\n rearStack.push(x);\n }", "public void push(int x) {\n /**\n * 将otherStack中所有元素还原到stack中后在栈顶加入新元素\n */\n while (!otherStack.isEmpty()) {\n stack.push(otherStack.pop());\n }\n stack.push(x);\n }", "public void push(int x) {\n Stack<Integer> tmp = new Stack<>();\n while(!s.isEmpty()) {\n tmp.push(s.pop());\n }\n tmp.push(x);\n while(!tmp.isEmpty()) {\n s.push(tmp.pop());\n }\n }", "public void push(int x) {\r\n Stack<Integer> newStack = new Stack<>();\r\n newStack.push(x);\r\n\r\n Stack<Integer> tmp = new Stack<>();\r\n while (!this.stack.isEmpty()) {\r\n tmp.push(this.stack.pop());\r\n }\r\n\r\n while (!tmp.isEmpty()) {\r\n newStack.push(tmp.pop());\r\n }\r\n\r\n\r\n this.stack = newStack;\r\n }", "public void push(int x) {\n push.push(x);\n }", "public void push(int x) {\n load();\n stack.push(x);\n unload();\n }", "public void push(int x) {\n if (mStack1.isEmpty()) {\n mFirst = x;\n }\n mStack1.push(x);\n }", "public void push(int x) {\n\t if(first == null){\n\t first = x;\n\t }\n\t s.push(x);\n\t}", "public void push(int x) {\n stk1.push(x);\n }", "public void push(int x) {\n temp.push(x);\n }", "public void push(int x) {\n stack1.push(x);\n }", "public void push(int x) {\n \tstack.push(x);\n \t// if stack is empty or the element is less than current minimal,\n \t// push it to minStack\n \tif (minStack.isEmpty()) {\n \t\tminStack.push(x);\n \t} else {\n\t \tint min = minStack.peek();\n\t \tif (x <= min) minStack.push(x);\n \t}\n }", "public void push(int x) {\n\t\tinput.push(x);\n\t}", "public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }", "public void push(int x) {\n\t\tlist.add(x);\n\t}", "void push(int x) {\n\t\tif (stack.size() == 0) {\n\t\t\tstack.push(x);\n\t\t\tminEle = x;\n\t\t} else if (x >= minEle) {\n\t\t\tstack.push(x);\n\t\t} else if (x < minEle) {\n\t\t\t// Push something smaller than original value\n\t\t\t// At any time when we pop , we will see if the value\n\t\t\t// of the peek is less then min or not\n\t\t\tstack.push(2 * x - minEle);\n\t\t\tminEle = x;\n\t\t}\n\t}", "public void push(int x) {\n data.add(x);\n }", "public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }", "public void push(int x) {\n // 将 popStack 中数据导入 pushStack\n while (!popStack.isEmpty()) {\n pushStack.push(popStack.pop());\n }\n // 压入 x\n pushStack.push(x);\n // 将数据导回 popStack\n while (!pushStack.isEmpty()) {\n popStack.push(pushStack.pop());\n }\n\n }", "public void push(int x) {\n \tlist.add(x);\n }", "public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }", "public void push(double x) \n {\n if (top == s.length) \n {\n \tthrow new IllegalArgumentException(\"full stack!\");\n }\n \n \n else\n {\n s[++top] = x;\n \n } \n }", "public void push(int x) {\n s1.push(x);\n temp = (Stack<Integer>) s1.clone();\n s2.clear();\n while (!temp.isEmpty()) {\n s2.push(temp.pop());\n }\n }", "public void push(int x) {\n stack1.push(x);\n if (stack2.isEmpty() || x <= stack2.peek()) {\n stack2.push(x);\n }\n }", "public void push(int x) {\n\t\tint max = maxStack.isEmpty() ? x : maxStack.peek();\n\t\tmaxStack.push(max > x ? max : x);\n\t\tstack.push(x);\n\t}", "public void push(T x) {\n\t\tl.push(x);\n\t}", "public void push(int x) {\n q.add(x);\n for (int i = 0; i < q.size() - 1; ++i) {\n q.add(q.poll());\n }\n }", "public void push(int x) {\n\t\tNode t = new Node();\n\t\tt.data = x;\n\t\tt.next = top;\n\t\ttop = t;\n\t}", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n left.push(x);\n }", "public void push(int x) {\n Node node = new Node(x);\n top.next = node;\n node.pre = top;\n top = node;\n size++;\n }", "public void push(int x) {\n if(afterRotate){\n rotate();\n afterRotate = false;\n }\n stack.push(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.add(x);\n for (int i = 0; i < queue.size()-1; i++) {\n queue.add(queue.poll());\n }\n }", "public void push(int x) {\n queue.push(x);\n }", "public void push(int x) {\n if(x <= min){\n stack.push(min);\n min=x;\n }\n stack.push(x);\n }", "public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }", "public void push(int x) { //全部放到第一个\n temp1.push(x);\n }", "public void push(E x) {\n\t\t\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void push(int x) {\n q1.add(x);\n int n = q1.size();\n for (int i = 1; i < n; i++) {\n q1.add(q1.poll());\n }\n }", "public void push(int x) {\n Queue<Integer> tmp = new LinkedList<>();\n while (!queue.isEmpty()) {\n tmp.add(queue.remove());\n }\n queue.add(x);\n \n while (!tmp.isEmpty()) {\n queue.add(tmp.remove());\n }\n }", "public void push(int x) {\n one.add(x);\n for(int i=0;i<one.size()-1;i++)\n {\n one.add(one.poll());\n }\n \n }", "public void push(int x) {\n\t int size=q.size();\n\t q.offer(x);\n\t for(int i=0;i<size;i++){\n\t q.offer(q.poll());\n\t }\n\t \n\t }", "public void push(int x) {\n int n = queue.size();\n queue.offer(x);\n for (int i = 0; i < n; i++) {\n queue.offer(queue.poll());\n }\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}", "void push(Integer x) {\n\n\t\tif (isEmpty()) {\n\t\t\ttop = new Node(x);\n\t\t\tmid = top;\n\t\t\ttotalNodes++;\n\t\t} else {\n\t\t\tNode n = new Node(x);\n\t\t\tn.next = top;\n\t\t\ttop.prev = n;\n\t\t\ttop = n;\n\t\t\ttotalNodes++;\n\t\t\tif (totalNodes % 2 != 0) {\n\t\t\t\tmid = mid.prev;\n\t\t\t}\n\t\t}\n\t}", "public void push(int x) {\n if (head == null) {\n head = new Node1(x, x);\n } else {\n head = new Node1(x, Math.min(x, head.min), head);\n }\n }", "public void push(int x) {\n q.offer(x);\n }", "@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}", "public void push(int x) {\n // 第一步先 push\n queue.offer(x);\n // 第二步把前面的变量重新倒腾一遍\n // 这一部分代码很关键,在树的层序遍历中也用到了\n int size = queue.size() - 1;\n for (int i = 0; i < size; i++) {\n queue.offer(queue.poll());\n }\n }", "void push(Integer x) {\n if (s.isEmpty()) {\n minEle = x;\n s.push(x);\n System.out.println(\"Number Inserted: \" + x);\n return;\n }\n // if new number is less than original minEle\n if (x < minEle) {\n s.push(2 * x - minEle);\n minEle = x;\n } else {\n s.push(x);\n }\n System.out.println(\"Number Inserted: \" + x);\n }", "public void push(int x) {\n queue.offer(x);\n }", "public void push(int element) {\n stack1.push(element);\n }", "public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }", "public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }", "public void push(int x) {\r\n this.queueMain.offer(x);\r\n }", "public void push(int x) {\n // for pop(), so prepare\n // 要想 pop 省事 push到 queue tail 的 x 要 想办法放到队列第一位\n // how 只要不空 移到另外一个 放好 x 再移回来\n while (!One.isEmpty()) {\n Two.add(One.poll());\n }\n One.add(x);\n while (!Two.isEmpty()) {\n One.add(Two.poll());\n }\n }", "public void push(T x);", "public void push(int x) {\n p.next=new ListNode(x);\n p = p.next;\n }", "@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}", "public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "public void push(int x) {\n\n if (list.isEmpty()) {\n head = x;\n }\n\n list2.add(x);\n while (!(list.isEmpty())) {\n list2.add(list.poll());\n }\n\n while (!(list2.isEmpty())) {\n list.add(list2.poll());\n }\n\n\n }", "void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}", "private static void sortedInsert(Stack<Integer> stack, int x) {\n if (stack.isEmpty() || stack.peek() < x) {\n stack.push(x);\n return;\n }\n int temp = stack.pop();\n sortedInsert(stack, x);\n stack.push(temp);\n }", "void push(int stackNum, int value) throws Exception{\n\t//check if we have space\n\tif(stackPointer[stackNum] + 1 >= stackSize){ //last element\n\t\tthrows new Exception(\"Out of space.\");\n\t}\n\n\t//increment stack pointer and then update top value\n\tstackPointer[stackNum]++; \n\tbuffer[absTopOfStack(stackNum)] = value;\n}", "public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }", "public void push(T x)\n\t{\n\t\t// If the head is null, set the head equal\n\t\t// to the new node.\n\t\tif(head == null)\n\t\t\thead = new Node<T>(x);\n\t\telse\n\t\t{\n\t\t\t// Loop through the list and add the new node\n\t\t\t// on to the back of the list.\n\t\t\tNode<T> curr = head;\n\t\t\twhile(curr.getNext() != null)\n\t\t\t\tcurr = curr.getNext();\n\n\t\t\tNode<T> last = new Node<T>(x);\n\t\t\tcurr.setNext(last);\n\t\t}\t\n\t}", "public void push(int x) {\n if(!queueA.isEmpty()){\n queueA.add(x);\n }else if(!queueB.isEmpty()){\n queueB.add(x);\n }else{\n queueA.add(x);\n }\n }", "public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }", "public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n }\n else {\n q2.add(x);\n while(q1.size() > 0) {\n q2.add(q1.poll());\n }\n }\n }", "void push(int x);", "void push(T x);", "public void push(int x) {\n q1.push(x);\n if (q2.size() > 0){\n q2.remove();\n }\n }", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n } else {\n q2.add(x);\n while(q1.size() > 0){\n q2.add(q1.poll());\n }\n }\n }", "public void push (E item){\n this.stack.add(item);\n }", "public void push(T value) {\n \tstack.add(value);\n }" ]
[ "0.86726034", "0.85932225", "0.85570914", "0.8550038", "0.852482", "0.8498592", "0.8488227", "0.8461912", "0.8458076", "0.8428038", "0.8376653", "0.8370226", "0.8368897", "0.8343204", "0.83385926", "0.8335069", "0.8333074", "0.83219844", "0.83110696", "0.8299808", "0.82648236", "0.8260843", "0.8227758", "0.81988394", "0.819731", "0.81950635", "0.8136101", "0.813282", "0.81123054", "0.81123054", "0.81123054", "0.8089274", "0.8086407", "0.8082756", "0.8075835", "0.8058963", "0.8050122", "0.80101556", "0.79978484", "0.79816735", "0.7965629", "0.7918633", "0.78817797", "0.7859532", "0.7854534", "0.7853485", "0.78523874", "0.78523874", "0.78476787", "0.7841256", "0.78404015", "0.7834868", "0.7825307", "0.780459", "0.7791437", "0.77746886", "0.771773", "0.7690058", "0.765422", "0.765174", "0.7648162", "0.7646733", "0.76382875", "0.7637257", "0.7633213", "0.7633213", "0.7625352", "0.7617576", "0.7603999", "0.75609857", "0.75587195", "0.75492984", "0.75358003", "0.75231606", "0.74670357", "0.7450564", "0.74457633", "0.7396862", "0.73832387", "0.73720616", "0.7360162", "0.73447925", "0.7335559", "0.7328421", "0.7286221", "0.72311556", "0.72194356", "0.72047585", "0.71959877", "0.7185571", "0.717108", "0.7165948", "0.7088451", "0.7078484", "0.7070283", "0.70639855", "0.70509607", "0.704537", "0.70401484", "0.70389265" ]
0.7262818
85
Removes the element on top of the stack and returns that element.
public int pop() { if (!forReverse.isEmpty()) { return forReverse.poll(); } while (queue.size() > 1) { forReverse.add(queue.poll()); } int val = queue.poll(); Queue<Integer> temp = queue; queue = forReverse; forReverse = temp; return val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T pop() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//remove top element from stack\n\t\t//and \"clear to let GC do its work\"\n\t\treturn elements.remove(elements.size() - 1);\n\t}", "@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}", "public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }", "public T pop() {\n T top = peek();\n stack[topIndex] = null;\n topIndex--;\n return top;\n }", "public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }", "public E pop()\n {\n E topVal = stack.removeFirst();\n return topVal;\n }", "public E pop(){\n return this.stack.remove(stack.size()-1);\n }", "public Object pop()\r\n {\n assert !this.isEmpty();\r\n\t\t\r\n Node oldTop = this.top;\r\n this.top = oldTop.getNext();\r\n oldTop.setNext(null); // enable garbage collection\r\n return oldTop.getItem();\r\n }", "public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}", "private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }", "public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}", "public T pop() {\r\n\t\tT ele = top.ele;\r\n\t\ttop = top.next;\r\n\t\tsize--;\r\n\t\t\r\n\t\treturn ele;\r\n\t}", "public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "public T pop() {\n if(isEmpty()) {\n throw new NoSuchElementException(\"Stack is empty\");\n }\n return this.stackArray[top--];\n }", "@Override\n\tpublic T pop() {\n\t\tif(isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is Empty\");\n\t\treturn null;}\n\t\ttop--;\t\t\t\t\t\t//top-- now before since we need index top-1\n\t\tT result = stack[top];\n\t\tstack[top] = null;\n\t\treturn result;\n\t\t\t\n\t}", "public E removeFirst() {\n return pop();\n }", "public Object pop() {\n return stack.pop();\n }", "public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }", "public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }", "public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }", "Object pop();", "public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}", "public E pop() {\n if(isEmpty()) throw new EmptyStackException();\n\n E itemPopped = this.stack[top-1];\n this.stack[top-1] = null;\n top--;\n return itemPopped;\n\n }", "public Object pop();", "public T pop() {\n\t\tT value = null;\n\t\tif (!isEmpty()) {\n\t\t\ttop = top.next;\n\t\t\tvalue = top.value;\n\t\t}\n\t\treturn value; // returning popped value\n\t}", "public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public Item pop() {\n if(isEmpty()) return null;\n Item item = top.data;\n top = top.next;\n size--;\n return item;\n\n }", "public T pop() throws EmptyStackException\r\n {\r\n if (isEmpty())\r\n throw new EmptyStackException();\r\n\r\n top--;\r\n T result = stack[top];\r\n stack[top] = null; \r\n\r\n return result;\r\n }", "public TYPE pop();", "public Object pop()\n\t{\n\t\tif (size == 0)\n\t\t\tthrow new EmptyStackException();\n\t\t\n\t\tObject result = elements[--size];\n\t\telements[size] = null;\n\t\treturn result;\n\t}", "public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }", "@Override\n\tpublic E pop() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\tE element = arr[top];\n\t\tarr[top--] = null;\n\t\treturn element;\n\t}", "private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}", "T pop();", "T pop();", "T pop();", "public Object pop() {\n if (isEmpty())\n throw new EmptyStackException();\n\n Object value = peek();\n collection.remove(collection.size() - 1);\n return value;\n }", "public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}", "public T pop() throws EmptyStackException {\n if (top == null) {\n throw new EmptyStackException();\n }\n\n StackNode<T> removed = top;\n top = top.getNext();\n return removed.getData();\n }", "public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}", "@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }", "public Object pop() {\n if (top != null) {\n Object item = top.getOperand();\n\n top = top.next;\n return item;\n }\n\n System.out.println(\"Stack is empty\");\n return null;\n\n }", "public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}", "public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }", "@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }", "T pop() {\n if (stackSize == 0) {\n throw new EmptyStackException();\n }\n return stackArray[--stackSize];\n }", "@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}", "public String pop() {\n String removed = NOTHING;\n // Is there anything in the stack to remove?\n if (usage > 0) {\n // Obtain the topmost value from the stack\n removed = this.foundation[this.foundation.length - this.usage];\n // Clean up the array location\n this.foundation[this.foundation.length - this.usage] = null;\n // Decrease usage counter\n usage--;\n }\n return removed;\n }", "public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}", "public T pop() {\r\n\r\n\t\tT top = peek(); // Throws exception if stack is empty.\r\n\t\t\r\n\t\t// Sets top of stack to next link. \r\n\t\ttopNode = topNode.getNext();\r\n\t\t\r\n\t\treturn top;\r\n\t\t\r\n\t}", "public T pop() {\n if (this.top == null) {\n throw new EmptyStackException();\n }\n T data = this.top.data;\n this.top = this.top.below;\n return data;\n }", "private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}", "public T pop() {\n\t\tif (isEmpty())\n\t\t\tthrow new EmptyStackException();\n\t\telse\n\t\t\treturn vector.remove(vector.size() - 1);\t\t\n\t}", "public Session pop() {\r\n\t\tint oldIndex = index;\r\n\t\tif (index >= 0) {\r\n\t\t\tindex--;\r\n\t\t\treturn stack[oldIndex];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "@Override\r\n\tpublic E pop() {\n\t\treturn null;\r\n\t}", "public void pop();", "public final Object pop()\n {\n synchronized (this.stack)\n {\n return this.stack[--this.pointer];\n }\n }", "@Override\n\tpublic E pop() {\n\t\treturn null;\n\t}", "Object pop(){\r\n\t\tlastStack = getLastStack();\r\n\t\tif(lastStack!=null){\r\n\t\t\tint num = lastStack.pop();\r\n\t\t\treturn num;\r\n\t\t} else {stacks.remove(stacks.size()-1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic T pop() throws StackUnderflowException {\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\tstack.remove(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "public T pop() {\n if (head == null) {\n return null;\n } else {\n Node<T> returnedNode = head;\n head = head.getNext();\n return returnedNode.getItem();\n }\n }", "@Override\n\tpublic Object pop() {\n\t\tif (elementCount == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\telementCount--;\n\t\treturn elementData[elementCount];\n\t}", "public T pop()\n {\n return pop(first);\n }", "public O popBack()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = last;\r\n last = last.getPrevious();\r\n\r\n count--;\r\n if (isEmpty()) first = null;\r\n else last.setNext(null);\r\n return l.getObject();\r\n } else\r\n return null;\r\n \r\n }", "E pop() throws EmptyStackException;", "public Object pop() {\n return fStack.pop();\n }", "@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public E pop() {\n return stackImpl.pop();\n }", "public E pop() \r\n {\r\n E o = list.get(getSize() - 1);\r\n list.remove(getSize() - 1);\r\n return o;\r\n }", "public AnyType pop() throws StackException;", "public K pop() {\n\t\tK data = null;\r\n\t\tif(top!=null){\r\n\t\t\tdata = top.data;\r\n\t\t\ttop = top.next;\r\n\t\t\tsize--;\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "public Item pop()\n {\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n Item item = top.item;\n top = top.next;\n N--;\n return item;\n }", "public T pop() {\n StackNode tempNode = peekNode();\n\n if(length > 1) {\n lastNode = peekNode().getParent();\n tempNode.setParent(null);\n length--;\n return (T) tempNode.getTData();\n }\n else if(length == 1) {\n lastNode = new StackNode();\n length--;\n return (T) tempNode.getTData();\n }\n else {\n throw new IndexOutOfBoundsException(\"Your stack is empty!\");\n }\n }", "public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}", "public Node<T> pop() {\n\n\t\tNode<T> popNode = new Node<T>();\n\t\tpopNode = getTopNode();\n\n\t\t/*\n\t\t * Three special cases for a pop() are a empty stack, only one node at\n\t\t * the top and a stack with multiple elements.\n\t\t */\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is EMPTY!!\");\n\t\t\treturn (null);\n\t\t} else if (stackSize == 1) {\n\t\t\ttopNode = null;\n\t\t} else {\n\t\t\ttopNode = topNode.getNextNode();\n\t\t}\n\n\t\tSystem.out.println(\"## POP \\\"\" + popNode.data + \"\\\" FROM STACK ##\");\n\n\t\t// Decrease Stack Size\n\t\tsetStackSize(getStackSize() - 1);\n\t\treturn (popNode);\n\t}", "public T pop() throws StackUnderflowException{\r\n\t\t\t\t\r\n\t\t// check if the stack is empty before popping up.\r\n\t\tif(stackData.isEmpty())\r\n\t\t\tthrow new StackUnderflowException();\r\n\r\n\t\treturn stackData.remove(stackData.size()-1); //popping;\r\n\t}", "public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public E pop(){\r\n Node<E> curr = top;\r\n top = top.getNext();\r\n size--;\r\n return (E)curr.getData();\r\n \r\n }", "@Override\n\tpublic E pop() {\n\t\tif(size == 0) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\tsize--;\n\t\treturn list.remove(0);\n\t}", "public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }", "E pop();", "E pop();", "E pop();", "@Override\n public T pop() {\n if (!isEmpty()) {\n T data = backing[size - 1];\n backing[size - 1] = null;\n size--;\n return data;\n } else {\n throw new NoSuchElementException(\"The stack is empty\");\n }\n }" ]
[ "0.7831054", "0.78167725", "0.7808246", "0.7797564", "0.7689596", "0.7677747", "0.7633739", "0.76071864", "0.7598945", "0.7597015", "0.7577195", "0.75743157", "0.75456405", "0.75169796", "0.750027", "0.74873495", "0.74667877", "0.7460093", "0.74569875", "0.7456191", "0.744837", "0.74207103", "0.7406906", "0.74033815", "0.7401186", "0.7379766", "0.7370952", "0.73472834", "0.734713", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7335123", "0.7324371", "0.7313926", "0.7311951", "0.73110545", "0.7310549", "0.7304512", "0.7297009", "0.7293909", "0.7293909", "0.7293909", "0.7284467", "0.72834486", "0.72771436", "0.7270916", "0.7266674", "0.72660893", "0.72511417", "0.7238035", "0.72323054", "0.72286993", "0.72209424", "0.72192407", "0.7210599", "0.72091603", "0.7199765", "0.7196248", "0.7195882", "0.7189582", "0.71828914", "0.71817344", "0.7177487", "0.71751624", "0.71638006", "0.7152466", "0.7151245", "0.7142062", "0.71410716", "0.71334636", "0.7117701", "0.71173024", "0.71133095", "0.71099454", "0.71064913", "0.71064913", "0.71064913", "0.71064913", "0.71064913", "0.7102089", "0.71010643", "0.70969707", "0.7088635", "0.7065762", "0.7061361", "0.70485055", "0.7044555", "0.7040969", "0.70397604", "0.7035089", "0.7034882", "0.7031653", "0.70310974", "0.70310974", "0.70310974", "0.70287824" ]
0.0
-1
Get the top element.
public int top() { if (!forReverse.isEmpty()) { return forReverse.peek(); } while (queue.size() > 1) { forReverse.add(queue.poll()); } int val = queue.peek(); Queue<Integer> temp = queue; queue = forReverse; forReverse = temp; return val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int top() {\n return topElem;\n }", "public E top() {\n return !isEmpty() ? head.item : null;\n }", "public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}", "public T getTop( );", "E top();", "public int top() { return 0; }", "public int top() {\r\n return top;\r\n }", "public int top() {\r\n return top;\r\n }", "public int getTop() {\n\t\treturn this.top;\n\t}", "public int getTop() {\n\treturn top;\n }", "public Integer getTop() {\n return top;\n }", "public int top() {\n return top;\n }", "public int getTop() {\n return top;\n }", "public T top();", "public int top() {\n return One.peek();\n }", "public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}", "Location getTop() {\n // -\n if(!isEmpty())\n return top.getLocation();\n return null;\n }", "public float getTop() {\n return internalGroup.getTop();\n }", "public abstract Object top();", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "public int top() {\n return (int) one.peek();\n \n }", "public int top() {\n return list.peek();\n }", "public E top() {\n return head.prev.data;\n }", "public int top() {\n return top.value;\n }", "public int top();", "public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }", "public MeasurementCSSImpl getTop()\n\t{\n\t\treturn top;\n\t}", "public E peek(){\n\t\treturn top.element;\n\t}", "public int top() {\n\t return q.peek();\n\t }", "public Node top() {\r\n\t\treturn start;\r\n\t}", "public int top() {\n return q.peek();\n }", "public int top() {\n \treturn list.get(list.size()-1);\n }", "public int getTop() {\n return position[0] - (size - 1) / 2;\n }", "public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}", "public int top() {\n return objects.peek();\n }", "public int top() {\n return q1.getFirst();\n }", "public E top()\n\tthrows EmptyStackException;", "public E top() {\n\t\tif (this.top == null) {\n\t\t\tthrow new EmptyStackException( );\n\t\t}\n\t\treturn this.top.data;\n\t\t\t\n\t}", "@Override\n\tpublic E top() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\treturn arr[top];\n\t}", "public Node<T> getTopNode() {\n\t\treturn topNode;\n\t}", "public int top() {\n return queue.element();\n }", "public int top() {\n\t\treturn stack.peek();\n \n }", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "public int top() {\n return q1.peek();\n }", "public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}", "public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }", "public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public int top() {\n return p.val;\n }", "public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }", "public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }", "public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }", "@Nullable\n public DpProp getTop() {\n if (mImpl.hasTop()) {\n return DpProp.fromProto(mImpl.getTop());\n } else {\n return null;\n }\n }", "public String top(){\n if(!(pilha.size() == 0)){\n return pilha.get(pilha.size()-1);\n }else{\n return null;\n }\n }", "public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }", "public E popTop() {\n // FILL IN\n }", "public int top() {\n return stack1.peek();\n }", "public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}", "public View getTopView() {\n\t\tint topViewIndex = getChildCount() - 1;\n\t\treturn getChildAt(topViewIndex);\n\t}", "public Card top() {\n\t\treturn firstCard;\n\t}", "public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int getElementAtTopOfStack() {\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n return myarray[top];\n \n }", "int top();", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public E top() throws StackUnderflowException {\r\n E item = null;\r\n if(!isEmpty()) item = items.get(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n \r\n return item;\r\n }", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public int top() {\n move();\n return reverseQueue.peek();\n }", "public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }", "@VisibleForTesting\n public TaskStack getTopStack() {\n if (DisplayContent.this.mTaskStackContainers.getChildCount() > 0) {\n return (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(DisplayContent.this.mTaskStackContainers.getChildCount() - 1);\n }\n return null;\n }", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}", "public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }", "public T peek() {\n return top.getData();\n }", "public int top() {\n return queue.peekLast();\n }", "public int top() {\n return queue.getLast();\n }", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "@Override\n\tpublic T top()\n\t{\n if(list.size()==0)\n {\n throw new IllegalStateException(\"Stack is empty\");\n }\n return list.get(getSize()-1);\n\t}", "public Integer peek() {\n if (hasTop)\n return top;\n top = it.next();\n hasTop = true;\n return top;\n }", "public T top() throws StackUnderflowException;", "@DISPID(-2147417103)\n @PropGet\n int offsetTop();", "public static Interval topInterval(){\n\t\treturn top;\n\t}", "public double getTop() {\n return this.yT;\n }", "public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}", "public T peek() {\n\t\treturn top.value;\n\t}", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "public Card getTopCard() {\n\t\treturn topCard;\n\t}", "public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public Card topCard() {\n return this.deck.peek();\n }", "public Card showTop() {\n\t\treturn hand.get(0);\n\t}", "public int top() {\n return queue1.peek();\n }", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "@Override\n public E top()throws EmptyStackException{\n E c = null;\n if(!isEmpty()){\n c = stackArray[count-1];\n return c;\n }\n \n else \n throw new EmptyStackException();\n }", "public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}", "public int top() {\n if (data.size() != 0) {\n return data.get(data.size() - 1);\n }\n throw new RuntimeException(\"top: 栈为空,非法操作\");\n }", "@Override\n\tpublic final int getBodyOffsetTop() {\n\t\treturn DOMImpl.impl.getBodyOffsetTop(documentFor());\n\t}", "public int stackTop() {\r\n\t return array[top];\r\n\t }", "@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}", "protected abstract String getTopElementDesc();" ]
[ "0.8335419", "0.79350287", "0.77536744", "0.7748599", "0.76948357", "0.76440716", "0.76287603", "0.76287603", "0.76210487", "0.761078", "0.75897783", "0.757352", "0.75697553", "0.75569373", "0.75336695", "0.74941546", "0.7478168", "0.7464024", "0.7455516", "0.744731", "0.7420307", "0.74064183", "0.7404334", "0.7353008", "0.73424685", "0.7341916", "0.7309753", "0.73067194", "0.73048276", "0.72713166", "0.7264665", "0.72567767", "0.7251667", "0.72243714", "0.72178376", "0.7213566", "0.71938527", "0.71595603", "0.71482515", "0.71470845", "0.71425194", "0.71301484", "0.70901084", "0.7072783", "0.70704937", "0.7051931", "0.70452917", "0.7038905", "0.70281166", "0.7018083", "0.7016962", "0.70164806", "0.70121604", "0.69869167", "0.69616324", "0.6950085", "0.6943346", "0.6937197", "0.69266814", "0.6905805", "0.69020635", "0.69020635", "0.6881843", "0.6880443", "0.68785655", "0.68785655", "0.6876129", "0.6875657", "0.6870703", "0.6870001", "0.6850275", "0.6835022", "0.6834514", "0.68320215", "0.67999524", "0.6795726", "0.6791124", "0.67760855", "0.6769921", "0.6759245", "0.6757686", "0.67564976", "0.6752771", "0.6745556", "0.67297226", "0.67111665", "0.66882724", "0.6669713", "0.66412", "0.6635151", "0.662763", "0.66263247", "0.65971553", "0.6585567", "0.65791434", "0.6574525", "0.6572038", "0.65619075", "0.6542071", "0.6534093", "0.64797187" ]
0.0
-1
Returns whether the stack is empty.
public boolean empty() { return queue.isEmpty() && forReverse.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean emptyStack() {\n return (expStack.size() == 0);\n }", "public boolean isEmpty()\n {\n return stack.size() == 0;\n }", "public boolean isEmpty() {\n \treturn stack.size() == 0;\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public boolean isEmpty() {\n return stackImpl.isEmpty();\n }", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n System.out.println(stack.isEmpty());\n return stack.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn (stackSize == 0 ? true : false);\n\t}", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.empty();\n }", "public boolean isEmpty(){\r\n\t\treturn stackData.isEmpty();\r\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }", "public final boolean isEmpty() {\n\t\treturn !(opstack.size() > 0);\n\t}", "public boolean empty() {\n return popStack.isEmpty();\n }", "public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {return stackList.isEmpty();}", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public boolean empty() {\n return this.stack1.empty() && this.stack2.empty();\n }", "public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }", "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "public boolean isEmpty() {\n if (opStack.size() == 0) {\n return true;\n }\n return false;\n }", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "public boolean empty() {\r\n return inStack.empty() && outStack.empty();\r\n }", "public boolean empty() {\n if (stackIn.empty() && stackOut.empty()) {\n return true;\n }\n return false;\n }", "public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }", "public boolean isEmpty() {\n return downStack.isEmpty();\n }", "public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }", "public boolean empty() {\n return stack1.empty();\n }", "public boolean empty() {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean empty() {\n return mStack1.isEmpty() && mStack2.isEmpty();\n }", "public boolean isEmpty() \n {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "public boolean isEmpty() {\n\n return (top == null);\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean isEmpty() {\r\n return (top == null);\r\n }", "public boolean isEmpty() {\n return (this.top == 0);\n }", "public boolean isEmpty() {\n\t\treturn (top == null) ? true : false;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn top == null;\n\t}", "public boolean isEmpty() {\n\t\t\n\t\treturn top == null;\n\t}", "public boolean isFull() {\n return (this.top == this.stack.length);\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn top<=0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}", "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean empty() {\n return push.isEmpty();\n }", "public boolean isEmpty(){\n return (top == 0);\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean isEmpty()\r\n {\n return this.top == null;\r\n }", "public boolean isEmpty() {\n return this.top == null;\n }", "public boolean isEmpty() {\n if(this.top== -1) {\n return true;\n }\n return false;\n }", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "public boolean isEmpty() {\n\t\treturn front == null;\n\t}", "public boolean empty() { \n if (top == -1) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "public boolean isEmpty() {\n return top==-1;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}", "public boolean isEmpty()\n {\n return heapSize == 0;\n }", "public boolean isFull(){\n return (top == employeeStack.length);\n }", "public static boolean isEmpty()\n { return currentSize==0; }", "public boolean isEmpty() {\n return topIndex < 0;\n }", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}", "public boolean isEmpty(){\n if(top == null)return true;\n return false;\n }", "public boolean isEmpty() {\n\t\treturn mSentinel == mRoot;// if the root is equal to the sentinel(empty\n\t\t\t\t\t\t\t\t\t// node) then the tree is empty otherwise it\n\t\t\t\t\t\t\t\t\t// is not\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn (head == null);\n\t}", "public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}", "public boolean isSet() {\n return !this.stack.isEmpty();\n }", "public boolean isEmpty() {\r\n\t\t\r\n\t\treturn topNode == null; // Checks if topNode is null;\r\n\t\t\r\n\t}", "public final boolean isEmpty() {\n return mSize == 0;\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean empty() {\n return size <= 0;\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\n return doIsEmpty();\n }", "public boolean empty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public boolean isEmpty() {\r\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}" ]
[ "0.9056883", "0.89877164", "0.8927279", "0.8913691", "0.88952327", "0.8861644", "0.8812663", "0.8803307", "0.8803307", "0.88012934", "0.8762096", "0.87552625", "0.8734233", "0.8733799", "0.8713177", "0.87054056", "0.869478", "0.8679571", "0.866394", "0.86360806", "0.8620381", "0.8588986", "0.8536643", "0.8519639", "0.84929776", "0.84534115", "0.84058106", "0.83876854", "0.83645254", "0.83537555", "0.83166593", "0.83037966", "0.828262", "0.82777196", "0.82748145", "0.8235703", "0.82064724", "0.8194284", "0.81544614", "0.8025837", "0.8013609", "0.79574287", "0.79574287", "0.79574287", "0.7939453", "0.7928077", "0.7913513", "0.7880019", "0.78706414", "0.7865312", "0.7810955", "0.7810955", "0.77883196", "0.77276206", "0.77276206", "0.7723528", "0.7723445", "0.77220076", "0.7701561", "0.76997113", "0.76993895", "0.7675793", "0.76150143", "0.7590963", "0.75841945", "0.7563374", "0.754169", "0.7534229", "0.7515534", "0.7509447", "0.7505655", "0.7505497", "0.7497732", "0.74970293", "0.74944997", "0.7487798", "0.7487798", "0.7473871", "0.74631596", "0.74569964", "0.744851", "0.7444053", "0.742821", "0.7427812", "0.74265707", "0.74222845", "0.7415967", "0.74026", "0.7399876", "0.7399876", "0.7399876", "0.7395811", "0.7395516", "0.7395358", "0.7395175", "0.7390058", "0.738929", "0.7388407", "0.73881257", "0.7385511", "0.7385511" ]
0.0
-1
Relationship just needs to be removed from the model. It is already removed from the DataMap.
void removeRelationship(DbRelationship rel) { objectList.remove(rel); fireTableDataChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void remove() {\n deleteFromModel();\n deleteEdgeEndpoints();\n\n setDeleted(true);\n if (!isCached()) {\n HBaseEdge cachedEdge = (HBaseEdge) graph.findEdge(id, false);\n if (cachedEdge != null) cachedEdge.setDeleted(true);\n }\n }", "void unsetFurtherRelations();", "public void delIncomingRelations();", "void removeRelation(IViewRelation relation);", "public void removeRelationship(String classNameFrom, String classNameTo)\n\t{\n\t\tstoreViewState();\n\t\tproject.removeRelationship(classNameFrom, classNameTo);\n\t\tcheckStatus();\n\t}", "public void delRelations();", "@Override\n public void removeFromDb() {\n }", "public void delete() {\n mapping.getFieldOrFieldExclude().remove(field);\n }", "void relRemoveProperty( long relId, int propertyKey );", "void graphRemoveProperty( int propertyKey );", "void removeConstraintRelation(IViewRelation relation);", "@Override\n\t\tpublic boolean hasRelationship() {\n\t\t\treturn false;\n\t\t}", "@Override\n public void remove() {\n }", "public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n removed = true;\n if (room == null)\n return;\n room.removeEntity(this);\n }", "public void remove() {\r\n super.remove();\r\n }", "@Override\n \tpublic void removeIsCitedBy(Reference reference) {\n \t\tList<Reference> isCitedBy = getIsCitedBy();\n \t\t// check for no existing relationship\n \t\tif (reference == null || !isCitedBy.contains(reference))\n \t\t\treturn;\n \t\t// remove both sides of relationship\n \t\treference.getCitationList().remove(this);\n \t\tisCitedBy.remove(reference);\n \n \t}", "@Override\n public void remove() {\n }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "public void unsetRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(ROADWAYREF$16);\r\n }\r\n }", "@Override\n public void deleteRelationshipBetweenPhysicalAndPhysical(PhysicalObject physicalObjectA,\n PhysicalObject physicalObjectB) {\n assert false : \"shouldn't call this method\";\n }", "public void delete()\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n if (annotation.getStatements().isEmpty()) {\n annotation.delete();\n } else {\n annotation.update();\n }\n value = null;\n }", "public void remove() {\n\n }", "public void manyToManyDeleteOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n \n // remove the relationship\n a1.getBs().remove(b1);\n b1.getAs().remove(a1);\n\n // remove the non-owning side\n em.remove(a1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should not have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() != 0);\n\n em.close();\n }", "ArrayMap<Integer,DefinedProperty> relDelete( long relId );", "@Override\n\tpublic void remove() { }", "public /*virtual*/ void RemoveFromDictionary() \r\n {\r\n if (_dictionary != null) \r\n {\r\n _dictionary.DeferredResourceReferences.Remove(this);\r\n _dictionary = null;\r\n } \r\n }", "@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}", "public void unlinkUD()\n {\n this.U.D = this.D;\n this.D.U = this.U;\n }", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "public void remove() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Override\n\tprotected void removeImpl(Connection conn, VtbObject domainObject)\n\t\t\tthrows SQLException, MappingException {\n\n\t}", "public void remove()\n {\n removed();\n node.shapeRemoved(shape);\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "@Override\n\tpublic boolean delete(Eleve o) {\n\t\tmap.remove(o.getId(), o);\n\t\treturn true;\n\t}", "@Override\n \tpublic void removeAuthor(Author author) {\n \t\tList<Author> authorList = getAuthorList();\n \t\t// check for existing relationship\n \t\tif (author == null || !authorList.contains(author))\n \t\t\treturn;\n \t\t// add both sides of relationship\n \t\tauthor.getAuthorReferences().remove(this);\n \t\tauthorList.remove(author);\n \t}", "@DeleteMapping\n void removeCoin() {\n coin = false;\n }", "void removeRelated(int i);", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void removeFromLocation() {\n if (getAssignedLocation() != location) {\n this.location.fireEmployee(this);\n this.location = null;\n //bidirectional relationship!\n }\n System.out.println(\"We are firing an employee! \" + getName());\n }", "public void remove() {\n super.remove();\n if (this.caughtEntity != null) {\n this.caughtEntity.noClip = false;\n }\n if (this.angler != null) {\n this.angler.fishingBobber = null;\n this.angler.noClip = false;\n }\n if(this.rod.getItem() == Items.ITEM_GRAB_HOOK){\n this.rod.getOrCreateTag().putBoolean(\"cast\", false);\n }\n }", "public void removeResourceCollection()\r\n {\r\n getSemanticObject().removeProperty(swb_resourceCollectionInv);\r\n }", "public void unsetIntersectingRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(INTERSECTINGROADWAYREF$20);\r\n }\r\n }", "public final void remove () {\r\n }", "public void unsetMedication()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(MEDICATION$10, 0);\n }\n }", "public void remove() {\r\n return;\r\n }", "public void doRemove() throws VisADException, RemoteException {\n rangeRings = null;\n super.doRemove();\n }", "public final void clean() {\n distributed_graph.unpersist(true);\n }", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "private void removeFromModel(DefaultMutableTreeNode node, DefaultTreeModel model) {\n \t\tmodel.removeNodeFromParent(node);\n \t\tnodeTable.remove(node.getUserObject()); \n \t}", "public void removed()\n {\n if (prev == null) {\n IBSPColChecker.setNodeForShape(shape, next);\n }\n else {\n prev.next = next;\n }\n\n if (next != null) {\n next.prev = prev;\n }\n }", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "public void removeMappingTable(MappingTable table) throws ModelException {\n if (table != null) {\n List tableList = getMappingTablesInternal();\n Iterator iterator = null;\n boolean found = false;\n\n try {\n fireVetoableChange(PROP_TABLES, null, null);\n found = tableList.remove(table);\n if (table.equals(primaryTable))\n primaryTable = null;\n firePropertyChange(PROP_TABLES, null, null);\n } catch (PropertyVetoException e) {\n throw new ModelVetoException(e);\n }\n\n // remove all references to this table\n if (tableList != null) {\n iterator = tableList.iterator();\n while (iterator.hasNext()) {\n MappingTable nextTable = (MappingTable) iterator.next();\n MappingReferenceKey[] refKeys = \n nextTable.getMappingReferenceKeys();\n int i, count = ((refKeys != null) ? refKeys.length : 0);\n\n for (i = 0; i < count; i++)\n nextTable.removeMappingReferenceKey(refKeys[i]);\n }\n }\n\n if (found)\t// remove any fields mapped to that table\n {\n ArrayList fieldsToRemove = new ArrayList();\n\n iterator = getMappingFieldsInternal().iterator();\n while (iterator.hasNext()) {\n MappingFieldImplDynamic mappingField = (MappingFieldImplDynamic) iterator.next();\n\n if (mappingField.isMappedToTable(table)) {\n fieldsToRemove.add(mappingField);\n }\n }\n\n iterator = fieldsToRemove.iterator();\n while (iterator.hasNext()) {\n MappingField mappingField = (MappingField) iterator.next();\n boolean versionField = mappingField.isVersion();\n\n removeMappingField(mappingField);\n\n // if it is a version field, add back an unmapped\n // field which retains the version flag setting\n if (versionField) {\n mappingField = createMappingField(\n mappingField.getName());\n mappingField.setVersion(true);\n }\n }\n } else {\n throw new ModelException(\n getMessageHelper().msg(\n \"mapping.element.element_not_removed\", table));\t// NOI18N\n }\n } else {\n throw new ModelException(\n getMessageHelper().msg(\"mapping.element.null_argument\"));\t\t\t\t// NOI18N\n }\n }", "public void removeMappingField(MappingField field) throws ModelException {\n try {\n fireVetoableChange(PROP_FIELDS, null, null);\n\n if (!getMappingFieldsInternal().remove(field)) {\n throw new ModelException(\n getMessageHelper().msg(\n \"mapping.element.element_not_removed\", field));\t// NOI18N\n }\n\n firePropertyChange(PROP_FIELDS, null, null);\n } catch (PropertyVetoException e) {\n throw new ModelVetoException(e);\n }\n }", "void clearAssociations();", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public boolean remove(Object o) {\n\t\treturn map.remove(o) == PRESENT;\n\t}", "@Override\n\t\tpublic Object removeProperty(String key) {\n\t\t\treturn null;\n\t\t}", "public void remove () {}", "void removeNode(Entity entity) {\n\t\tProcessing.nodeSet.remove(entity);\n\t\tProcessing.friendMap.remove(entity);\n\n\t\tSystem.out.println(\"the person was successfully removed from the network.\");\n\t}", "public void entityRemoved() {}", "public void removeRelation(Relation relation) {\n \tif (relation.getSection() == this)\n \t\trelations.remove(relation.getName());\n }", "public void unlinkLR()\n {\n this.L.R = this.R;\n this.R.L = this.L;\n }", "public void remove()\n {\n domain.removeParticipant(participant);\n }", "@Override\n\tpublic void onRelationshipChanged() {\n\t\tloadData();\n\t}", "public void remove() {\r\n //\r\n }", "public void removeResource(TIdentifiable resource) {\r\n\t int column = m_resources.getIndex(resource);\r\n\t if (column >= 0) {\r\n\t m_resources.removeID(resource);\r\n\t m_current_resources_count--;\r\n\t // shift the right columns left:\r\n\t for (int a=column; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) \r\n\t m_associations[a][b] = m_associations[a + 1][b];\r\n // clean up that last column:\t \r\n for (int b=0; b < m_current_users_count; b++)\r\n m_associations[m_current_resources_count][b] = null;\r\n\t }\t \r\n }", "@Override\n\tpublic void remove(Post entity) {\n\t\t\n\t}", "@Override\n public boolean isOrphanRemoval(ManagedType<?> ownerType, String elementCollectionPath, String attributeName) {\n return false;\n }", "@Override\n \t\t\t\tpublic void deleteGraph() throws TransformedGraphException {\n \n \t\t\t\t}", "public void resetRelatesToList(MappingType mapping) {\n\t\tmapping.getRelatesTo().clear();\n\t}", "public void onRelationshipChanged();", "public void remove()\n {\n ShapeParent parent = getShapeParent();\n \n if (parent != null)\n {\n parent.remove(this);\n }\n }", "@Transactional\n void remove(DataRistorante risto);", "public void removed() {\n }", "public void execute() {\n TerroristAgent agent = (TerroristAgent)((TNSRole)oldRole).getAgent();\n Hashtable relationshipTable = agent.getRelationshipTable();\n String relationshipName = null;\n Vector relationshipNames = ((TNSRole)oldRole).getRelationships();\n Iterator i = relationshipNames.iterator();\n while (i.hasNext()) {\n relationshipName = (String)i.next();\n Object temp = relationshipTable.get(relationshipName);\n if (temp instanceof Vector) {\n Vector removeRelationships = (Vector)temp;\n Vector copyOfRelationshipVector = new Vector();\n Iterator i2 = removeRelationships.iterator();\n while (i2.hasNext()) {\n Relationship r = (Relationship)i2.next();\n copyOfRelationshipVector.add(r);\n } // end while\n i2 = copyOfRelationshipVector.iterator();\n while (i2.hasNext()) {\n Relationship removeRelationship = (Relationship)i2.next();\n // System.out.println(\"Attempting to remove \" + agent.getEntityName() + \" from relationship \" + removeRelationship.toString());\n if (removeRelationship.getMembers().contains(agent)) {\n removeRelationship.removeAgent(agent);\n } else {\n // System.out.println(\"Not in this relationship.\");\n } // end if-else\n } // end while\n /* System.out.println(\"Remaining relationships\");\n i2 = removeRelationships.iterator();\n while (i2.hasNext()) {\n Relationship r = (Relationship)i2.next();\n System.out.println(r.toString());\n } // end while*/\n relationshipTable.remove(relationshipName);\n } // end if\n } // end while\n agent.removeRole(oldRole);\n Role addRole = createRole(newRole, agent);\n ((TerroristAgent)agent).addRole(addRole);\n }", "public void remove();", "public void remove();", "public void remove();" ]
[ "0.6928816", "0.67651296", "0.6565357", "0.65087366", "0.6480351", "0.6461992", "0.6441087", "0.64342344", "0.636863", "0.6227105", "0.6223172", "0.61837506", "0.6126234", "0.61185366", "0.60766166", "0.60766166", "0.60476565", "0.60476565", "0.60476565", "0.60476565", "0.60476565", "0.60476565", "0.60476565", "0.6030835", "0.6029933", "0.6026126", "0.5999328", "0.5987178", "0.598379", "0.598379", "0.5970417", "0.5963321", "0.5896034", "0.588483", "0.58741933", "0.5869874", "0.58393455", "0.58341265", "0.58156955", "0.5811042", "0.580881", "0.580881", "0.580881", "0.580881", "0.580881", "0.580881", "0.580881", "0.580881", "0.5795397", "0.57867914", "0.5786736", "0.57750833", "0.5772696", "0.57658315", "0.5759482", "0.57363456", "0.57354367", "0.57354367", "0.57354367", "0.5718325", "0.5702163", "0.56944245", "0.5677402", "0.5675858", "0.5675348", "0.56749165", "0.56676227", "0.5649332", "0.5647447", "0.56398183", "0.56344056", "0.5621366", "0.56180954", "0.5612585", "0.5609894", "0.56097233", "0.5607528", "0.56035477", "0.5594399", "0.5585772", "0.5582281", "0.55714494", "0.55576026", "0.55475324", "0.5546688", "0.5536313", "0.55240285", "0.55209816", "0.5520883", "0.55168784", "0.55136126", "0.55117893", "0.5510269", "0.55091363", "0.55027866", "0.5502694", "0.5494847", "0.549367", "0.549367", "0.549367" ]
0.7805209
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.frag__tanding, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
Created by xinyu on 11/4/2017.
public interface IToolReportService { List<ToolReport> retrieveToolReport(String filter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo4359a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void memoria() {\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo6081a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private void kk12() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "private void init() {\n\n\n\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "public void mo12628c() {\n }" ]
[ "0.6154221", "0.6029713", "0.59339786", "0.5922546", "0.5886986", "0.58521193", "0.58521193", "0.5840124", "0.57914275", "0.57347465", "0.57333267", "0.57301176", "0.57205236", "0.5715312", "0.5690754", "0.5674248", "0.5665002", "0.5655695", "0.56546706", "0.56489545", "0.5644516", "0.5644516", "0.5644516", "0.5644516", "0.5644516", "0.5644334", "0.5643547", "0.5643547", "0.56417346", "0.5630219", "0.5629962", "0.562976", "0.56171286", "0.5599759", "0.5598666", "0.5584777", "0.5584777", "0.5584777", "0.5584777", "0.5584777", "0.5584777", "0.5582518", "0.55771595", "0.55737865", "0.55737865", "0.5572692", "0.55617684", "0.55550194", "0.5532539", "0.5528829", "0.5521854", "0.5519175", "0.5519175", "0.5519175", "0.55142254", "0.55142254", "0.5514069", "0.5513234", "0.5505561", "0.55004525", "0.55004525", "0.55004525", "0.55001307", "0.54943836", "0.5491671", "0.5490625", "0.5489957", "0.5489957", "0.5489957", "0.547688", "0.5476672", "0.5471724", "0.5470375", "0.5468327", "0.5466412", "0.5463328", "0.5462768", "0.5457378", "0.5457378", "0.5457378", "0.5457378", "0.5457378", "0.5457378", "0.5457378", "0.5456571", "0.54536027", "0.5441308", "0.5440437", "0.5429375", "0.54245394", "0.54137844", "0.54067564", "0.5397926", "0.53854203", "0.5376978", "0.5376978", "0.53545517", "0.53435165", "0.5332639", "0.5332059", "0.5328811" ]
0.0
-1
Method that create and add an object to the database and return response with error message if something wrong. If everything ok response with success message
@RequestMapping(value = "/join", method = RequestMethod.POST) public String createUser(@RequestBody UserDto userDto, Model model) { if (userDto == null) { return "user1"; } User user = new User(); user.setEmail(userDto.getEmail()); user.setPass(userDto.getPass()); userService.createUser(user); model.addAttribute("email", user.getEmail()); model.addAttribute("pass", user.getPass()); return "one_product"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean create(ModelObject obj);", "@RequestMapping(method=RequestMethod.POST)\n\tpublic ResponseEntity<Void> insert(@Valid @RequestBody ClienteNewDTO objDTO){\n\t\t\n\t\tCliente obj = service.fromDTO(objDTO);\n\t\tobj = service.insert(obj);\n\t\t\n\t\t//abaixo uma boa pratica para retornar a url do novo objeto quandro cria-lo\n\t\tURI uri = ServletUriComponentsBuilder.fromCurrentRequest()\n\t\t\t\t\t.path(\"/{id}\").buildAndExpand(obj.getId()).toUri(); //o from currente request vai pegar a requisicao atual, e logo depois a gente add o /id\n\t\t\n\t\treturn ResponseEntity.created(uri).build();\n\t}", "@GET\n @Path(\"/add\")\n @Produces(\"application/json\")\n public Response add() {\n Session session = DBConnectionManager.getSession();\n session.beginTransaction();\n\n Client client = new Client();\n client.setFirstname(\"asdasdasdas d asd asd asd\");\n\n //Save the client in database\n session.save(client);\n\n //Commit the transaction\n session.getTransaction().commit();\n DBConnectionManager.closeConnection();\n\n return Response.ok(client, MediaType.APPLICATION_JSON).build();\n }", "int insert(ResourcePojo record);", "@RequestMapping(method = RequestMethod.POST)\r\n\t@ResponseBody\r\n\t@Transactional\r\n\tpublic Object create(@RequestBody Model model) {\r\n\t\ttry {\r\n\t\t\tgetService().create(model);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Create exception for \" + model, e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Secured({ })\n\t\t@RequestMapping(value = \"/contacts\", method = RequestMethod.POST, headers = \"Accept=application/json\")\n\tpublic Contact insert(@RequestBody Contact obj) {\n\t\tContact result = contactService.insert(obj);\n\n\t \n\t\t\n\t\treturn result;\n\t}", "@PostMapping(\"/J314Authorities\")\n\t@Timed\n\n\t@Transactional\n\t\n\tpublic ResultExt< J314AuthorityPoj> create(HttpServletRequest request,HttpServletResponse response, @Valid @RequestBody J314AuthorityPoj obj)\n\t{\n\t\t\n\t\tString params=UtilParams.paramsToString(\"J314AuthorityPoj\",obj);\n\n\t\tContexto ctx = Contexto.init();\n\t\tctx.put(Contexto.REQUEST,request);\n\t\tctx.put(Contexto.RESPONSE,response);\n\t\tctx.put(Contexto.CLAVE_SEGURIDAD,\"REST_ENTITY_J314AUTHORITY_CREATE\");\n\t\tctx.put(Contexto.URL_SOLICITADA,\"/J314Authorities\");\n\t\tResult< J314AuthorityPoj> res=new Result<>();\n\t\tif (log.isInfoEnabled()) log.info(\"Entrada en REST POST:create(\"+params+\")\"+params);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(!verificaPermisos(\"REST_ENTITY_J314AUTHORITY_CREATE\"))\n\t\t\t{\n\t\t\t\tres.addError(new ErrorSinPermiso(\"REST_ENTITY_J314AUTHORITY_CREATE\",\"/J314Authorities\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparams=UtilParams.paramsToString(\"J314AuthorityPoj\",obj);\n\t\t\t\tif (log.isInfoEnabled()) log.info(\"Verificado en REST POST:create(\"+params+\")\"+params);\n\n\t\t\t\tJ314Authority obj_ = J314AuthorityPoj.getModel(obj);\n\n\t\t\t\tResult< J314Authority > res_=service.insert(obj_);\n\t\t\t\tres.setInfoEWI(res_);\n\n\t\t\t\tres.setData(res_.getData()!=null?new J314AuthorityPoj(res_.getData()):null);\n\n\t\t\t}\n\t\t\taddTiempoSesion();\n\t\t}\tcatch(Exception e)\n\t\t{\n\t\t\tres.addError(new ErrorGeneral(e));\n\t\t\tif (log.isErrorEnabled()) log.error(\"Error en REST POST:create(\"+params+\"). Excepcion:\"+UtilException.printStackTrace(e));\n\t\t}\n\t\tif (log.isInfoEnabled()) log.info(\"Salida de REST POST:create(\"+params+\"). Resultado:\"+res.toString());\n\n\t\tif (!res.isOk())\n\t\t{\n\t\t\ttry {\t\n\t\t\t\tTransactionInterceptor.currentTransactionStatus().setRollbackOnly();\n\t\t\t}catch(Throwable t)\n\t\t\t{\n\t\t\t\tres.addError(new ErrorGeneral(t));\n\t\t\t\tif (log.isErrorEnabled()) log.error(\"Error en REST POST:create(\"+params+\"). Excepcion:\"+UtilException.printStackTrace(t));\n\t\t\t}\n\t\t}\n\n\t\tResultExt< J314AuthorityPoj > resFin=new ResultExt<>(res,ctx.getAs(\"ticketStr\"));\n\t\tContexto.close();\n\t\treturn resFin;\n\t}", "boolean create(User user) throws Exception;", "@Override\r\n\tpublic boolean create(Moteur obj, Connection conn) throws SQLException {\n\t\treturn false;\r\n\t}", "@RequestMapping(method=RequestMethod.POST)\n public ResponseEntity<Void> insert(@RequestBody TeamDTO objDto) {\n Team obj = this.teamService.fromDTO(objDto);\n this.teamService.insert(obj);\n URI uri = ServletUriComponentsBuilder.fromCurrentRequest()\n .path(\"/{id}\").buildAndExpand(obj.getId()).toUri();\n return ResponseEntity.created(uri).build();\n }", "boolean addObject(E object) throws DatabaseNotAccessibleException, DatabaseLogicException;", "@RequestMapping(method = RequestMethod.POST)\n\t\tpublic ResponseEntity<Void> inserir(@RequestBody Pedido obj) {\n\t\t\tobj = service.insere(obj);\n\t\t\tURI uri = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\").buildAndExpand(obj.getId()).toUri();\n\t\t\treturn ResponseEntity.created(uri).build();\n\t\t}", "@Test\n public void validAdd() throws Exception {\n Logger.getGlobal().info(\"Start validAdd test\");\n RestaurantVO restaurant = new RestaurantVO();\n restaurant.setId(\"999\");\n restaurant.setName(\"Test Restaurant\");\n\n ResponseEntity<Restaurant> restaurants = restaurantController.add(restaurant);\n Assert.assertEquals(HttpStatus.CREATED, restaurants.getStatusCode());\n Logger.getGlobal().info(\"End validAdd test\");\n }", "@POST\n @Path(\"/database/save\")\n public Response databaseSave(@Context HttpServletRequest request,@Context HttpServletResponse response,@Context ServletContext servletContext) throws JsonGenerationException, JsonMappingException, IOException{\n System.out.println(\"Saving database\");\n Database2 db=Json.newObjectMapper(true).readValue(IOUtils2.toStringAndClose(request.getInputStream()), new TypeReference<Database2>() {});\n \n //System.out.println(\"New DB = \"+Json.newObjectMapper(true).writeValueAsString(db));\n db.save();\n \n Database2.resetInstance();\n Database2.get(); // reload instance in memory\n \n System.out.println(\"New Database Saved\");\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }", "@RequestMapping(value = \"/oeuvres\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Oeuvre> createOeuvre(@Valid @RequestBody Oeuvre oeuvre) throws URISyntaxException {\n log.debug(\"REST request to save Oeuvre : {}\", oeuvre);\n if (oeuvre.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"oeuvre\", \"idexists\", \"A new oeuvre cannot already have an ID\")).body(null);\n }\n Oeuvre result = oeuvreRepository.save(oeuvre);\n return ResponseEntity.created(new URI(\"/api/oeuvres/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"oeuvre\", result.getId().toString()))\n .body(result);\n }", "@PostMapping(\"/add_employee\")\n public ResponseEntity<?> createEmployee(@Valid @RequestBody Employee employee){\n\n employeeService.add_employee(employee);\n\n return new ResponseEntity<>(\"Employee was added successfully!\", HttpStatus.OK);\n }", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}", "@PostMapping(value=\"/insert/hotel\", consumes=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseClient insertNewRoom(@RequestBody Hotel hotel){\r\n\t\thotelSer.save(hotel);\r\n\t\tResponseClient res = new ResponseClient();\r\n\t\tres.setResponse(\"successfull hotel_id: \");\r\n\t\treturn res;\r\n\t}", "public String insertInDatabase(UserModel userModel) {\n\n\t\tString response = checkUserDetail(userModel);\n\n\t\tSession session = HibernateUtil.getSession();\n\t\t\n\t\tif (response.equals(\"okkk\")) {\n\t\t\ttry {\n\t\t\t\tsession.beginTransaction();\n\t\t\t\tsession.save(userModel);\n\t\t\t\tsession.getTransaction().commit();\n\t\t\t\tsession.close();\n\t\t\t\tHibernateUtil.shutdown();\n\t\t\t\treturn \"Success\";\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tHibernateUtil.shutdown();\n\t\t\t\treturn \"Failure\";\n\t\t\t}\n\t\t} else {\n\t\t\tHibernateUtil.shutdown();\n\t\t\treturn response;\n\t\t}\n\t}", "int insert(Body record);", "@PostMapping(\"/tbl-phones\")\n @Timed\n public ResponseEntity<TblPhone> createTblPhone(@Valid @RequestBody TblPhone tblPhone) throws URISyntaxException {\n log.debug(\"REST request to save TblPhone : {}\", tblPhone);\n if (tblPhone.getId() != null) {\n throw new BadRequestAlertException(\"A new tblPhone cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n TblPhone result = tblPhoneRepository.save(tblPhone);\n return ResponseEntity.created(new URI(\"/api/tbl-phones/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@POST\n @Produces({ \"application/json\" })\n @CommitAfter\n public abstract Response addNew(Person person);", "int insert(ResultDto record);", "@PostMapping(\"/act-kodus\")\n @Timed\n public ResponseEntity<ActKodu> createActKodu(@Valid @RequestBody ActKodu actKodu) throws URISyntaxException {\n log.debug(\"REST request to save ActKodu : {}\", actKodu);\n if (actKodu.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new actKodu cannot already have an ID\")).body(null);\n }\n ActKodu result = actKoduRepository.save(actKodu);\n return ResponseEntity.created(new URI(\"/api/act-kodus/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "private void createProduct(String pid, String name, String price, String description) {\n\n mApiService = ApiClient.getCurdClient().create(ApiInterface.class);\n\n ProductModel productModel = new ProductModel(pid, name, price, description, \"\", \"\");\n\n Call<ResponseModel> call = mApiService.createProduct(productModel);\n\n\n call.enqueue(new Callback<ResponseModel>() {\n @Override\n public void onResponse(Call<ResponseModel> call, Response<ResponseModel> response) {\n int statusCode = response.code();\n ResponseModel responseModel = response.body();\n\n Toast.makeText(SampleRetrofit.this, \" CreateProduct \" + responseModel.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n\n @Override\n public void onFailure(Call<ResponseModel> call, Throwable t) {\n // Log error here since request failed\n Log.e(\"\", t.toString());\n }\n\n });\n }", "@BodyParser.Of(play.mvc.BodyParser.Json.class)\n public static Result create() throws JsonParseException, JsonMappingException, IOException {\n JsonNode json = request().body().asJson();\n Thing thing = mapper.treeToValue(json, Thing.class);\n thing.save();\n return ok(mapper.valueToTree(thing));\n }", "int insert(MVoucherDTO record);", "@Override\n\tpublic String call() throws Exception {\n\n\t\tUser user = new User(username, password, email, fullname);\n\n\t\tif (userRepository.add(user)) {\n\t\t\treturn username + \" added successfully to users database\";\n\t\t}\n\n\t\treturn \"unable to add \" + username + \" to database\";\n\n\t}", "@POST\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response handlePostCreate(String body) {\n Gson gson = GSONFactory.getInstance();\n\n Employee createdEmployee = createEmployee(body);\n\n String serializedEmployee = gson.toJson(createdEmployee);\n\n Response response = Response.status(201).entity(serializedEmployee).build();\n return response;\n }", "void add( ModelObject modelObject, Long id );", "@POST( CONTROLLER )\n VersionedObjectKey createObject( @Body CreateObjectRequest request );", "public Long createRecord(Record object);", "protected Object create(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n try {\n em.persist(object);\n em.getTransaction().commit();\n LOG.debug(\"Persisted \" + object);\n } catch (Exception e) {\n LOG.error(\"Could not persist Object\", e);\n em.getTransaction().rollback();\n } finally {\n em.close();\n }\n return object;\n }", "@RequestMapping(method = RequestMethod.POST)\r\n public ResponseObject insert(@Validated @RequestBody Candidate candidate) {\r\n return candidateService.insert(candidate);\r\n }", "public abstract boolean create(T entity) throws ServiceException;", "@PostMapping(value=\"/addUser\")\n\t\t@Consumes({\"application/json\"})\n\t\t@ResponseBody\n\t\tpublic ResponseEntity<User> createUser(@RequestBody User user) throws TaskTrackerException{\n\t\t\tboolean isCreated = false;\n\t\t\ttry {\n\t\t\t\tisCreated = userService.createUser(user);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new TaskTrackerException(\"usernot created, Check if Parent task exists!\",e);\n\t\t\t}\n\t\t\t\n\t\t\tif(isCreated){\n\t\t\t\treturn new ResponseEntity<User>(HttpStatus.CREATED);\n\t\t\t} else {\n//\t\t\t\treturn new ResponseEntity<Product>(HttpStatus.OK);\n\t\t\t\t\n\t\t\t\treturn ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).header(\"message\", \"User not created, Check if User exists!\").build();\n\t\t\t}\n\t\t}", "@PostMapping(\"api/book\")\n public ResponseEntity<Book> addBook(@RequestBody Book book) {\n Result<Book> result = bookService.save(book);\n if (result.isSuccess()) {\n return ResponseEntity.ok(book);\n } else {\n return ResponseEntity.noContent().build();\n }\n }", "public void add(Object obj) {\r\n\t\tSession session = null;\r\n\t\tTransaction tx = null;\r\n\r\n\t\ttry {\r\n\t\t\tsession = factory.openSession();\r\n\t\t\ttx = session.beginTransaction();\r\n\r\n\t\t\tsession.save(obj);\r\n\t\t\ttx.commit();\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tif (tx != null)\r\n\t\t\t\ttx.rollback();\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (session != null)\r\n\t\t\t\tsession.close();\r\n\t\t}\r\n\t}", "public Boolean addUser(User user) throws ApplicationException;", "public boolean addRecord(UserDetails userobj) \r\n\t{\n\t\t\r\n\t\tConnection connectionobject = null;\r\n\t\tPreparedStatement pst = null;\r\n\t\tboolean f = false;\r\n\t\ttry\r\n\t\t{\r\n\t connectionobject = DBConnectClose.getMySQLConnection();\r\n\t\t \r\n\t pst = connectionobject.prepareStatement(\"insert into userdetails values(?,?,?,?,?,?,?,?,?)\");\r\n\t\t \r\n\t\t pst.setString(1, userobj.getEmail());\r\n\t\t pst.setString(2, userobj.getPassword());\r\n\t\t pst.setString(3, userobj.getName());\r\n\t\t pst.setString(4, userobj.getMobileno());\r\n\t\t pst.setString(5, userobj.getDob());\r\n\t\t pst.setString(6, userobj.getGender());\r\n\t\t pst.setString(7, userobj.getHobbyString());\r\n\t\t pst.setString(8, userobj.getCountry());\r\n\t\t pst.setString(9, userobj.getAddress());\r\n\t\t \t\t \r\n\t\t int i = pst.executeUpdate();\r\n\t\t \r\n\t\t System.out.println(i);\r\n\t\t \r\n\t\t if(i > 0 )\r\n\t\t \t f = true;\r\n \r\n\t }catch(SQLException e){e.printStackTrace();}\r\n\t finally \r\n\t {\r\n\t \t DBConnectClose.closeMySQLPreaparedStatementConnection(pst);\r\n\t \t DBConnectClose.closeMySQLConnection(connectionobject);\r\n\t\t }\r\n\t\t\r\n\t return f;\r\n\t}", "@PostMapping(\"/addEmployee\")\n\tpublic ResponseEntity<EmployeeMon> createEmployee(@RequestBody EmployeeMon employee)\n\t{\n\t\ttry {\n\t\t\tEmployeeMon stud = repository.save(\n\t\t\t\t\tnew EmployeeMon(employee.getId(),employee.getName(),employee.getAddress(), employee.getEmail(),\n\t\t\t\t\t\t\temployee.getSalary()));\n\t\t\tLOGGER.info(\"Inserted data into Table\");\n\t\t\treturn new ResponseEntity<>(stud, HttpStatus.CREATED);\n\t\t} catch(Exception e) {\n\t\t\treturn new ResponseEntity<>(null, HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}", "@RequestMapping(value = \"/newritem\", method = RequestMethod.POST)\r\n public ResponseEntity<Void> createUser(@RequestBody Item ritem, UriComponentsBuilder ucBuilder) throws Exception {\r\n System.out.println(\"Creating Ritem \" + ritem.getProduct());\r\n \r\n /*if (userService.isUserExist(user)) {\r\n System.out.println(\"A User with name \" + user.getName() + \" already exist\");\r\n return new ResponseEntity<Void>(HttpStatus.CONFLICT);\r\n }*/\r\n \r\n itemService.persist(ritem);\r\n\r\n \r\n HttpHeaders headers = new HttpHeaders();\r\n headers.setLocation(ucBuilder.path(\"/ritem/{id}\").buildAndExpand(ritem.getId()).toUri());\r\n return new ResponseEntity<Void>(headers, HttpStatus.CREATED);\r\n }", "@Override\n public void onSuccess() {\n Log.d(\"haha\", \"添加数据成功,返回objectId为:\" + p2.getObjectId());\n }", "int insert(Model record);", "@PostMapping(\"/save\")\n\tpublic ResponseEntity<String> createEmployee(@RequestBody Employee employee) {\n\t\tInteger id = service.saveEmployee(employee);\n\t\tString message = \"Employee '\" + id + \"' Created!\";\n\t\treturn new ResponseEntity<String>(message, HttpStatus.CREATED); // 201\n\t}", "int insert(UserEntity record);", "@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}", "@PostMapping// this matches post key word\n\tpublic ResponseEntity<UsersModel> saveNewUser(@RequestBody UsersModel u){\n\t\tif(u.getUserId() != 0) {\n\t\t\treturn new ResponseEntity(\"userId must be 0\", HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn new ResponseEntity<UsersModel>(us.saveNewUser(u), HttpStatus.CREATED);\n\t}", "@PostMapping(\"/employees\")\n public Mono<ResponseEntity> addEmployee(@Valid @RequestBody Employee theEmployee) {\n theEmployee.setId(0);\n\n return this.employeeService.save(theEmployee).map(employee -> new ResponseEntity<>(new DataResponse<>(HttpStatus.CREATED.value(), \"Employee added successfully\", employee), HttpStatus.CREATED));\n }", "int insert(BlogDetails record);", "@Override\r\n\tpublic void postRequest(Request request, Response response) {\r\n\t\tcreateUser(request, response);\r\n\t}", "@Override\r\n\tpublic String insert() {\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doSave(admin)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"²åÈë\");\r\n\t\treturn SUCCESS;\r\n\t}", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "@SuppressWarnings(\"UnnecessaryLocalVariable\")\r\n private int create(T o) throws PersistenceException {\r\n String query = PREFIX_INSERT_QUERY + this.type.getSimpleName();\r\n Integer status = getSqlSession().insert(query, o);\r\n // ne doit pas être utilisé avec une session Spring\r\n // getSqlSession().commit();\r\n return status;\r\n }", "int insert(CmsRoomBook record);", "int insert(GoodsPo record);", "@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}", "@Override\n\tpublic BaseResponse createTrip(Trip trip) {\n\t\tBaseResponse res = new BaseResponse();\n\t\ttry {\n\t\t\t/*List<Trip> list = namedParameterJdbcTemplate.query(sql,\n\t\t\t\t\tgetSqlParameterByModel(new Trip(trip.getTripName())), new TripMapper());\n\t\t\tif (list.size() > 0) {\n\t\t\t\tres.setMesssageCode(\"002\");\n\t\t\t\tres.setMessage(\"Trip name already exist!\");\n\t\t\t} else {*/\n\t\t\t\tinsertTrip(trip);\n\t\t\t\tres.setMesssageCode(\"000\");\n\t\t\t\tres.setMessage(\"Successful !\");\n\n\t\t\t//}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in create trip => \" + e.getMessage());\n\t\t\tres.setMesssageCode(\"003\");\n\t\t\tres.setMessage(e.getMessage());\n\t\t}\n\n\t\treturn res;\n\n\t}", "int insert(UserInfo record);", "@Transactional(propagation = Propagation.REQUIRED)\n\tpublic ServiceResult save(final Object obj){\n\t\tServiceResult result = new ServiceResult();\n\t\tlog.debug(\"Saving :\"+obj);\n\t\ttry{\n\t\t\tdao.save(obj);\n\t\t\tresult.setResult(true);\n\t\t\tresult.setReturnObject(obj);\n\t\t} catch (Exception e){\n\t\t\tresult.setResult(false);\n\t\t\tresult.setMessage(\"Error:\"+e);\n\t\t\tlog.error(\"Error saving the object: \", e);\n\t\t}\n\t\treturn result;\n\t}", "@PostMapping(\"/save\")\n @ResponseStatus(HttpStatus.CREATED)//status 201\n public AsociadosProyecto save(@RequestBody AsociadosProyecto asociadosProyecto){\n return asociadosProyectoService.save(asociadosProyecto);\n }", "@Transactional\n @PostMapping(value = \"/pigsinvoicepigdetail/\")\n public ResponseEntity<Object> insertPig_PigInvoiceDetail(@RequestBody PigsInvoicePigDetailDTORequest pigsInvoicePigDetailDTORequest){\n\n PigsInvoicePigDetailDTOResponse temp = invoicePigDetailService.savePigsInvoicePigDetail(pigsInvoicePigDetailDTORequest);\n if(temp == null){\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n }\n return ResponseEntity.ok(temp);\n }", "private void saveObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n try {\n Field[] fields = object.getClass().getDeclaredFields();\n Field id = null;\n for (Field f : fields) {\n if (f.isAnnotationPresent(Id.class)) {\n id = f;\n }\n }\n id.setAccessible(true);\n\n if (Integer.parseInt(id.get(object).toString()) != 0 && !id.get(object).equals(null)) {\n crudService.update((SimpleORMInterface) object);\n } else {\n crudService.insert((SimpleORMInterface) object);\n }\n id.setAccessible(false);\n ConnectionPoll.releaseConnection(connection);\n\n } catch (IllegalAccessException | NoSuchFieldException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "@POST\n\t@Path(\"/newUser\")\n\t@Consumes({ MediaType.APPLICATION_JSON })\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Transactional\n\tpublic Response createUser(User user) {\n\t\tuserDao.createUser(user);\n\n\t\treturn Response.status(201)\n\t\t\t\t.entity(\"A new user has been created\").build();\n\t}", "public boolean createUser() {\r\n\t\tboolean signupSuccess = false;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and retrieving data (fetchSelectAllUsers())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection signupConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tinsert data into table\r\n\t\t\t*/\r\n\t\t\tsignupSuccess = signupConn.executeInsertIntoUsers(uName, password, fullName, phone, email);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn signupSuccess;\r\n\t}", "int insert(FundManagerDo record);", "public boolean save(New object);", "@Override\n public ResponseEntity createEmployee(@Valid Employee employeeRequest) {\n Employee savedemployee = employeeService.create(employeeRequest);\n URI location= ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\").buildAndExpand(savedemployee.getId()).toUri();\n return ResponseEntity.created(location).build();\n\n }", "@PostMapping(\"/book\")\n public ResponseEntity<?> addBook(@RequestBody Book book) {\n if(bookService.findBook(book.getBarcode()).isPresent()){\n return ResponseEntity.badRequest().body(\"Book with this barcode already exists.\");\n } else {\n bookService.addBook(book);\n return ResponseEntity.status(HttpStatus.OK).body(\"Book was added.\");\n }\n\n }", "public static void insertarGestoBien(Context context, int idNino, int idalimento) {\n String url = \"http://161.35.14.188/Persuhabit/GestoBien\";\n RequestQueue queue = Volley.newRequestQueue(context);\n\n// POST parameters\n Map<String, Object> params = new HashMap<String, Object>();\n params.put(\"idNino\", idNino);\n params.put(\"idalimento\", idalimento);\n\n\n JSONObject jsonObj = new JSONObject(params);\n\n// Request a json response from the provided URL\n JsonObjectRequest jsonObjRequest = new JsonObjectRequest\n (Request.Method.POST, url, jsonObj, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n }\n });\n\n// Add the request to the RequestQueue.\n queue.add(jsonObjRequest);\n }", "int createUser(User data) throws Exception;", "int insert(PmPost record);", "@PostMapping(\"/produtos\")\n @Timed\n public ResponseEntity<Produto> createProduto(@RequestBody Produto produto) throws URISyntaxException {\n log.debug(\"REST request to save Produto : {}\", produto);\n\n produto = DoubleUtil.handleProduto(produto);\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (!PrivilegioService.podeCriar(cargoRepository, ENTITY_NAME)) {\n log.error(\"TENTATIVA DE CRIAR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME + \" : {}\", produto);\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"privilegios insuficientes.\", \"Este usuario não possui privilegios sufuentes para criar esta entidade.\")).body(null);\n }\n//////////////////////////////////REQUER PRIVILEGIOS\n if (produto.getId() != null) {\n throw new BadRequestAlertException(\"A new produto cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Produto result = produtoRepository.save(produto);\n return ResponseEntity.created(new URI(\"/api/produtos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "int insert(StatusByUser record);", "@PostMapping(\"/tour-bubbls\")\n public ResponseEntity<TourBubblDTO> createTourBubbl(@Valid @RequestBody TourBubblDTO tourBubblDTO) throws URISyntaxException {\n log.debug(\"REST request to save TourBubbl : {}\", tourBubblDTO);\n if (tourBubblDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"tourBubbl\", \"idexists\", \"A new tourBubbl cannot already have an ID\")).body(null);\n }\n TourBubblDTO result = tourBubblService.save(tourBubblDTO);\n return ResponseEntity.created(new URI(\"/api/tour-bubbls/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"tourBubbl\", result.getId().toString()))\n .body(result);\n }", "@Test\n\tpublic void test_create_new_user_success(){\n\t\tUser user = new User(null, \"create_user\", \"[email protected]\", \"12345678\");\n\t\tResponseEntity<User> response = template.postForEntity(REST_SERVICE_URI + ACCESS_TOKEN + token, user, User.class);\n\t\tUser newUser = response.getBody();\n\t\tassertThat(newUser.getName(), is(\"create_user\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.CREATED));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}", "@PostMapping\n public User addUser(@Validated(value = Create.class) @RequestBody User user) {\n try {\n return userService.addUser(user);\n }catch (UserIdAlreadyExistsException exception){\n throw new UserIdAlreadyExistsException(\"User Id Already Exists\");\n }\n }", "@POST\n @Path(\"/addRequest\") \n @Produces(MediaType.APPLICATION_JSON)\n public Status addRequest(@HeaderParam(\"patientEmail\") String patientEmail,@HeaderParam(\"relativeEmail\") String relativeEmail,@HeaderParam(\"familyPosition\")int familyPosition){\n RequestDaoImpl ReqDaoImpl=new RequestDaoImpl();\n int result=ReqDaoImpl.addRequest(relativeEmail, patientEmail,familyPosition);\n boolean flag;\n if(result==1){\n flag=true;\n }else{\n flag=false;\n }\n Status status = new Status();\n \n if (flag) {\n\n status.setStatus(1);\n status.setMessage(\"Successfully \");\n\n } else {\n\n status.setStatus(0);\n status.setMessage(\"failed\");\n\n }\n return status;\n\n \n// System.out.println(\"result=\"+result);\n// return result;\n }", "int insert(OfUserWechat record);", "@PostMapping(\"/jelos\")\n @Timed\n public ResponseEntity<Jelo> createJelo(@RequestBody Jelo jelo) throws URISyntaxException {\n log.debug(\"REST request to save Jelo : {}\", jelo);\n if (jelo.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new jelo cannot already have an ID\")).body(null);\n }\n Jelo result = jeloRepository.save(jelo);\n return ResponseEntity.created(new URI(\"/api/jelos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@PostMapping(\"/employee\")\r\n\tpublic Employee createEmployee(@RequestBody Employee emp)\r\n\t{\r\n\t\treturn empdao.save(emp);\t\r\n\t}", "@PostMapping(\"\")\n ResponseEntity<ResponseObject> insertProduct(@RequestBody Product newProduct) {\n // two products must not have the same name\n List<Product> foundProducts = repository.findByName(newProduct.getName().trim());\n return foundProducts.size() < 1 ? ResponseEntity.status(HttpStatus.OK).body(\n new ResponseObject(\"ok\", \"insert successfully\", repository.save(newProduct))\n ) : ResponseEntity.status(HttpStatus.OK).body(\n new ResponseObject(\"failed\", \"Product name already taken\", \"\")\n );\n }", "Post save(Post post) throws Exception;", "int insert(DBPublicResources record);", "@PostMapping(\"/users\")\n\tpublic ResponseEntity<Object> createUser(@Valid @RequestBody User user) {\n\t\tUser createUser = userService.save(user);\n\n\t\t// Return Created User URI e.g. users/6\n\t\t// It Will return the status code of 201 created\n\t\tURI uri = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\").buildAndExpand(createUser.getId())\n\t\t\t\t.toUri();\n\t\treturn ResponseEntity.created(uri).build();\n\n\t}", "@PostMapping(path=\"/api/employees/createEmployee\",consumes = MediaType.APPLICATION_JSON_VALUE, produces =\n MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<Employee> savePC(@RequestBody Employee employee) throws Exception {\n Employee emp = employeeService.saveEmployee(employee);\n if (emp == null) {\n throw new Exception();\n } else {\n ResponseEntity<Employee> tResponseEntity = new ResponseEntity<>(emp, HttpStatus.CREATED);\n return tResponseEntity;\n }\n }", "@PostMapping(\"/nominees\")\n @Timed\n public ResponseEntity<NomineeDTO> createNominee(@Valid @RequestBody NomineeDTO nomineeDTO) throws URISyntaxException {\n log.debug(\"REST request to save Nominee : {}\", nomineeDTO);\n if (nomineeDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new nominee cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n NomineeDTO result = nomineeService.save(nomineeDTO);\n return ResponseEntity.created(new URI(\"/api/nominees/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "int insert(QuestionOne record);", "public static Response createBook(String title, double price){\n Book b = new Book();\n b.setTitle(title);\n b.setPrice(price);\n EntityTransaction t = em.getTransaction();\n t.begin();\n em.persist(b);\n t.commit();\n return Response.ok().build();\n }", "@RequestMapping(method = RequestMethod.POST)\n public Bin create() {\n throw new NotImplementedException(\"To be implemented\");\n }", "public abstract boolean create(T entity) throws SQLException;" ]
[ "0.65877783", "0.6362812", "0.6355897", "0.6345093", "0.6281163", "0.6212216", "0.62028176", "0.61538565", "0.61396503", "0.6125304", "0.6088569", "0.60883886", "0.60262775", "0.601465", "0.60128176", "0.6008501", "0.59976566", "0.5967607", "0.59642375", "0.59581864", "0.595814", "0.5956199", "0.5948893", "0.5947767", "0.5945319", "0.5940554", "0.59317493", "0.5913979", "0.5901215", "0.5894393", "0.5866129", "0.58402455", "0.5831388", "0.5819058", "0.58185065", "0.5814097", "0.5809288", "0.58086455", "0.57975113", "0.57973003", "0.57844675", "0.5768749", "0.5766691", "0.57623506", "0.57616854", "0.575896", "0.57557297", "0.5753883", "0.5747144", "0.57412803", "0.57406265", "0.5735946", "0.5735167", "0.57348335", "0.57348335", "0.57348335", "0.57348335", "0.57348335", "0.57348335", "0.57348335", "0.57348335", "0.5733046", "0.5732874", "0.5725922", "0.57155657", "0.57143724", "0.5708506", "0.57061744", "0.5705793", "0.5700157", "0.5697817", "0.56975776", "0.5697183", "0.56938", "0.5690814", "0.5687412", "0.5686131", "0.56830657", "0.56805277", "0.5680047", "0.56786877", "0.5675647", "0.56750983", "0.56738806", "0.56729615", "0.5669558", "0.56630605", "0.5661976", "0.5660605", "0.56578535", "0.56547666", "0.56539303", "0.5651255", "0.56488466", "0.5647742", "0.5643951", "0.56432766", "0.5641189", "0.56411153", "0.5640416", "0.5640195" ]
0.0
-1
Method that receives an object by id from the database and return response with error message if something wrong. If everything ok response with success message
@RequestMapping(value = "/find/{id}", method = RequestMethod.GET) @ResponseBody public ResponseEntity findUser(@PathVariable long id) { User user = userService.findById(id); if (user == null) { return new ResponseEntity(HttpStatus.NO_CONTENT); } return new ResponseEntity(user, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value=\"/mensajes/{id}\", method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Mensaje> findById(@PathVariable int id){\n\t\tMensaje mensaje = chatDAO.findById(id);\n\t\tResponseEntity<Mensaje> r = ResponseEntity.status(HttpStatus.OK).body(mensaje);\n\t\treturn r;\n\t}", "@GetMapping(\"/id/{id}\")\n public ResponseEntity<?> getByIdPenerbit(@PathVariable Integer id){\n try {\n StatusMessageDto<PenerbitDto> response = new StatusMessageDto<>();\n PenerbitDto penerbitDto = penerbitService.getById(id);\n if(penerbitDto == null){\n response.setStatus(HttpStatus.BAD_REQUEST.value());\n response.setMessage(\"Penerbit tidak ditemukan!\");\n response.setData(penerbitDto);\n return ResponseEntity.badRequest().body(response);\n }\n else{\n response.setStatus(HttpStatus.OK.value());\n response.setMessage(\"Penerbit ditemukan!\");\n response.setData(penerbitDto);\n return ResponseEntity.ok().body(response);\n }\n } catch (Exception e) {\n return ResponseEntity.badRequest().body(e);\n }\n }", "@Override\n\tpublic ResponseObject<ActivityDTO> getById(Long id) {\n\t\ttry{\n\t\t\treturn createResponse(createDTO(activityDAO.findById(id).get()), SUCCESS_MESSAGE, null);\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn createResponse(null, ERROR_MESSAGE, e);\n\t\t}\n\t}", "private void handleFindById(String[] args) {\n if (args.length < 3) {\n String requiredArgs = \"<id>\";\n Messages.badNumberOfArgsMessage(args.length, FIND_BY_ID_OPERATION, requiredArgs);\n System.exit(1);\n }\n\n Long id = null;\n try {\n id = Long.parseLong(args[2]);\n } catch (NumberFormatException e) {\n System.out.println(\"Error - argument '\" + args[2] + \"' must be a number\");\n System.exit(1);\n }\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\" + id.toString());\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n invocationBuilder.header(\"accept\", MediaType.APPLICATION_JSON);\n\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n BrickDto brickDto = response.readEntity(BrickDto.class);\n System.out.println(\"Brick found. \" + brickDto);\n } else if (response.getStatus() == Response.Status.NOT_FOUND.getStatusCode()) {\n System.out.println(\"Error - brick was not found, wrong id: \" + id + \" Server returned: \" + response.getStatus());\n } else {\n System.out.println(\"Error on server, server returned \" + response.getStatus());\n }\n }", "@RequestMapping(value = \"/{id}\", method=RequestMethod.GET)\n public ResponseEntity<?> findById(@PathVariable final Integer id) {\n Team team = this.teamService.findById(id);\n return ResponseEntity.ok().body(team);\n }", "public void findById() {\n String answer = view.input(message_get_id);\n if (answer != null){\n try{\n long id = Long.parseLong(answer);\n Customer c = model.findById(id);\n if(c!=null)\n view.showCustomerForm(c);\n else\n view.showMessage(not_found_error);\n }catch(NumberFormatException nfe){\n view.showMessage(\"ID must be number\");\n }\n }\n }", "@Override\r\n\tpublic ResultBean getById(String id) throws Exception {\n\t\tResultBean resultBean = new ResultBean();\r\n\t\ttry {\r\n\t\t\tresultBean.setData(codeMasterService.getById(id));\r\n\t\t\tresultBean.setSuccess(true);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tresultBean.setSuccess(false);\r\n\t\t\tresultBean.setMsg(e.getMessage());\r\n\t\t}\r\n\t\treturn resultBean;\r\n\t}", "@Override\n public ResponseEntity<User> findById(Long id) {\n User res_data = userRepository.findById(id).get();\n if (res_data != null) {\n return new ResponseEntity<>(res_data, HttpStatus.OK);\n }\n return new ResponseEntity<>((User) res_data, HttpStatus.NOT_FOUND);\n }", "public ResponseEntity<Object> deleteUser(Long id) {\n if (userRepository.findById(id).isPresent()) {\n userRepository.deleteById(id);\n if (userRepository.findById(id).isPresent()) {\n return ResponseEntity.unprocessableEntity().body(\"Failed to delete the specified record\");\n } else return ResponseEntity.ok().body(\"Successfully deleted specified record\");\n } else\n return ResponseEntity.unprocessableEntity().body(\"No Records Found\");\n }", "@Override\n\tpublic ResponseEntity<?> findOne(Long id) {\n\t\treturn null;\n\t}", "@GetMapping(\"/one/{id}\")\n\tpublic ResponseEntity<?> fetchOneData(@PathVariable(\"id\") Integer id) {\n\t\tResponseEntity<?> res = null;\n\t\ttry {\n\t\t\tEmployee emp = service.getOneEmpObject(id);\n\t\t\tres = new ResponseEntity<Employee>(emp, HttpStatus.OK);\n\t\t} catch (Exception e) {\n\t\t\tres = new ResponseEntity<String>(\"Unable Featch Data \", HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "public EmployeeResponse getById(int id) throws EmployeeNotFoundException {\n\n Optional<Employee> result=employeeRepository.findById(id);\n if (result.isPresent()){\n EmployeeResponse response=new EmployeeResponse();\n response.setId(result.get().getId());\n response.setName(result.get().getName());\n return response;\n }\n\n throw new EmployeeNotFoundException(\"Employee not found id=\"+id);\n// return response;\n }", "@RequestMapping(method=RequestMethod.GET,value=\"/{id}\",consumes=MediaType.APPLICATION_JSON_VALUE, produces=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseEntity<Producto> buscarPorId(@PathVariable Integer id){\r\n\t\tProducto productoBuscado=dao.buscar(id);\r\n\t\treturn new ResponseEntity<Producto>(productoBuscado,HttpStatus.OK);\r\n\t}", "public void postDoRetrieve(ID id)\n {\n }", "@Override\n\tpublic IDataResult<Product> getById(int id) {\n\t\tvar product = productDao.getById(id);\n\t\tif (product.id == 0) {\n\t\t\treturn new ErrorDataResult<Product>(\"Böyle bir ürün bulunmuyor.\");\n\t\t}\n\t\treturn new SuccessDataResult<Product>(product);\n\t}", "@RequestMapping(value =\"get{id}\", method = RequestMethod.GET)\n private UserMessage get(@PathVariable long id ){\n log.debug(\"getthing message by id# \" + id);\n UserMessage found = messageRepository.findOne(id);\n log.debug(\"got id#\" + id);\n return found;\n }", "@GET\n\t@Path(\"/id\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Response findById(@QueryParam(\"id\") Long id) throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tUser userById = userDao.getUserById(id);\n\t\t\n\t\tif (userById != null) {\n\t\t\treturn Response\n\t\t\t\t\t.status(200)\n\t\t\t\t\t.entity(userById)\n\t\t\t\t\t.header(\"Access-Control-Allow-Headers\", \"X-extra-header\")\n\t\t\t\t\t.allow(\"OPTIONS\")\n\t\t\t\t\t.build();\n\t\t} else {\n\t\t\treturn Response\n\t\t\t\t\t.status(404)\n\t\t\t\t\t.entity(\"The user with the id \" + id + \" does not exist\")\t\t\t\t\t\n\t\t\t\t\t.build();\n\t\t}\n\t}", "public ResponseEntity<GrupoDS> recuperarGrupoPorId(@ApiParam(value = \"ID do grupo.\",required=true) @PathVariable(\"id\") Long id) {\n Optional<GrupoModel> optional = grupoRepository.findById(id);\n if (optional != null) {\n \treturn new ResponseEntity<GrupoDS>(new GrupoDS(optional.get()), HttpStatus.OK);\n }\n return new ResponseEntity<GrupoDS>(HttpStatus.NOT_FOUND);\n }", "public abstract Optional<Object> getByID(@PathVariable(\"id\") int id);", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "@GetMapping(\"/id/{id}\")\n public ResponseEntity<ServiceResult> findById(@PathVariable String id) {\n ServiceResult serviceResult = new ServiceResult();\n AdCampaign adCampaign = new AdCampaign();\n logger.info(\"Start controller call get data from ID - \"+id);\n try {\n adCampaign = adCampaignService.findByIdCustom(id);\n serviceResult.setMessage(\"Get Data from ID\"+id+\" Success\");\n serviceResult.setData(adCampaignService.findByIdCustom(id));\n serviceResult.setStatus(ServiceResult.Status.SUCCESS);\n }catch (Exception ex){\n logger.info(\"Error call get data from ID - \"+id);\n serviceResult.setMessage(ex.getMessage());\n }\n logger.info(\"End call get data from ID - \"+id);\n return new ResponseEntity<ServiceResult>(serviceResult, HttpStatus.OK);\n }", "@GetMapping(\"/turno/{id}\")\r\n public ResponseEntity<Turno> getTurno(@PathVariable(\"id\") Long id) \r\n {\r\n Turno turn = turnoRepository.findOne(id);\r\n if (turn == null) \r\n {\r\n return ResponseEntity.notFound().header(\"X-error\", \"No se encontro el paciente con el Id: \"+id).build();\r\n }\r\n return ResponseEntity.ok(turn);\r\n }", "T findById(final ID id) throws RequiredValueException, NoEntityFoundException;", "@GetMapping(\"/users/{id}\")\n @PreAuthorize(\"hasRole('Admin')\")\n public SuccessResponse<UserResponse> getUserById(@PathVariable Integer id) {\n if(!connectionService.isReachable()) {\n String exceptionMessage = \"Cannot connect to database.\";\n System.out.println(exceptionMessage);\n throw new DatabaseException(exceptionMessage);\n }\n\n return userService\n .findUserById(id)\n .map(UserResponse::fromUser)\n .map(SuccessResponse::new)\n .orElseThrow(() -> new RestException(\"Cannot find user with this ID.\"));\n }", "public static Result readOne(Long id) throws JsonProcessingException, IOException {\n Thing thing = Thing.find.byId(id);\n if(thing == null){\n return notFound(\"No such Thing with id \" + id);\n }else{\n JsonNode json1 = mapper.readTree(thing.cachedJson);\n JsonNode json = mapper.valueToTree(thing);\n \n return ok(json1);\n }\n }", "@GET\n @Path(\"{id}\")\n @Produces(\"application/json\")\n public Response findById(@PathParam(\"id\") Integer id) {\n try {\n Dao dao;\n DynaActionForm form;\n List<DynaActionForm> resultSet;\n \n dao = DaoFactory.getDao(\"Profile\");\n form = new DynaActionForm();\n form.setItem(\"selector\", \"byId\");\n form.setItem(\"id\", id);\n resultSet = dao.select(form);\n \n if(resultSet.size() != 1){\n return Response.status(Response.Status.NOT_FOUND).build();\n }\n else {\n ProfileEntity profile = new ProfileEntity();\n profile.fromMap(resultSet.get(0).getItems());\n return Response.ok(profile).build();\n }\n } catch (Exception ex) {\n Logger.getLogger(ProfileResource.class.getName()).log(Level.SEVERE, null, ex);\n return Response.serverError().build();\n }\n }", "@GetMapping(\"/act-kodus/{id}\")\n @Timed\n public ResponseEntity<ActKodu> getActKodu(@PathVariable Long id) {\n log.debug(\"REST request to get ActKodu : {}\", id);\n ActKodu actKodu = actKoduRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(actKodu));\n }", "@GetMapping(\"/jelos/{id}\")\n @Timed\n public ResponseEntity<Jelo> getJelo(@PathVariable Long id) {\n log.debug(\"REST request to get Jelo : {}\", id);\n Jelo jelo = jeloRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(jelo));\n }", "@GET\n @Path(\"{id}\")\n @Produces({ \"application/json\" })\n public abstract Response find(@PathParam(\"id\") Long id);", "@Override\n public Result readById(final int id) throws DaoException {\n throw new DaoException(\"Unsupported operation. Result has no id\");\n }", "public New getObject(long id);", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\r\n public Callable<ResponseObject> findById(@PathVariable(\"id\") Long id) {\r\n return new Callable<ResponseObject>() {\r\n @Override\r\n public ResponseObject call() throws Exception {\r\n return candidateService.findById(id);\r\n }\r\n };\r\n }", "@Override\n public T findById(ID id) {\n return crudRepository.findById(id).orElseThrow(\n () -> new ResourceNotFoundException(\"Can not find an entity with id: \" + id));\n }", "@GetMapping(\"/{id}\")\n\tpublic ResponseEntity<UsersDTO> getUserById(@PathVariable(\"id\") final Long id){\n\t\tOptional<UsersDTO> user = userJpaRepository.findById(id);\n\t\tif(! user.isPresent()) {\n\t\t\t return new ResponseEntity<UsersDTO>(new CustomErrorType(\"User with id : \"\n\t\t\t\t\t \t + id + \" not found\"), HttpStatus.NOT_FOUND);\n\t\t}\n\t\treturn new ResponseEntity<UsersDTO>(user.get(), HttpStatus.OK);\t\t\t\n\t}", "@RequestMapping(value = \"{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity<?> get(@PathVariable long id) {\n Todo result = getTodoOrThrow(id);\n\n return ResponseEntity.ok(dtoConverter.convert(result));\n }", "@Override\n\tpublic DataResult<Photo> getById(int id) {\n\t\treturn new SuccessDataResult<Photo>(this.photoDao.getById(id));\n\t}", "@GetMapping(\"/{id}\")\n\tpublic ResponseEntity<Contato> getById(@PathVariable long id) \n\t{\n\t\tContato contato = contatoService.getById(id);\n\n\t\tif(contato == null) \n\t\t{\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\treturn ResponseEntity.ok(contato);\n\t}", "public abstract T findOne(int id);", "@GetMapping(\"/fretes/{id}\")\n\tpublic ResponseEntity<?> findById(@PathVariable(\"id\") Integer id) {\n\t\treturn freteRepo.findById(id).map(record -> ResponseEntity.ok().body(record))\n\t\t\t\t.orElse(ResponseEntity.notFound().build());\n\t}", "public Data findById(Object id);", "@GetMapping(value = \"/consultarByID\")\n public ResponseEntity consultar(@RequestParam Long id) {\n return empleadoService.consultar(id);\n }", "@GetMapping(\"/{id}\") // método http enviado para a nossa api\n\tpublic ResponseEntity<Postagem> GetById(@PathVariable long id) { // método pegar por id //Pathvariabe: caminho da variável da url\n\t\treturn repositoty.findById(id) // esse método pode devolver tanto postagem, quanto um not found caso o objeto não exista ou exista um erro na requisição\n\t\t\t\t.map(resp -> ResponseEntity.ok(resp)) // caso capture resposta positiva, devolver como recurso na requisição\n\t\t\t\t.orElse(ResponseEntity.notFound().build()); // caso n tiver dados \n\t\t//assim que for feita alguma requisição do tipo get em \"/postagens\", e se passar um atributo, no caso o id, vai ser acessado este método que irá capturar qual é a variável que estamos recebendo dentro do @pathvariable, assim, retornando a interface injetada com @autowired\n\t}", "Object get(ID id) throws Exception;", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n\t\tpublic ResponseEntity<Optional<Pedido>> find(@PathVariable Integer id) {\n\t\t\tOptional<Pedido> obj = service.find(id);\n\t\t\treturn ResponseEntity.ok().body(obj);\n\t\t}", "@Override\n @Transactional(readOnly = true)\n public JeuDTO findOne(Long id) {\n log.debug(\"Request to get Jeu : {}\", id);\n Jeu jeu = jeuRepository.findOne(id);\n return jeuMapper.toDto(jeu);\n }", "@Override\n public Header<UserApiResponse> read(Long id) {\n return baseRepository.findById(id)\n .map(user -> response(user))\n .map(userApiResponse -> Header.OK(userApiResponse))\n .orElseGet(() -> Header.ERROR(\"데이터 없음\"));\n\n }", "public T selectById(int id) {\n Logger logger = getLogger();\n T object = null;\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectById())) {\n\n preparedStatement.setInt(1, id);\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n object = setObjectParams(rs);\n setObjectId(rs, object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select by id: success\");\n return object;\n }", "@GetMapping(\"{id}\")\n\tprotected ResponseEntity<Alerta> consultarAlertaById(@PathVariable(\"id\") Integer idAlerta){\n\t\t\n\t\t\n\t\tAlerta alerta = service.consultarAlertaById(idAlerta);\n\t\t\n\t\tif(alerta == null)\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t\n\t\treturn ResponseEntity.ok(alerta);\n\t}", "@GetMapping(\"/user/{id}\")\n public ResponseEntity getUserById(@PathVariable(value = \"id\") Long id) {\n User user = userRepository.getOne(id);\n\n // Not found, returning 404 Not Found\n if (user == null)\n return ResponseEntity.notFound().build();\n\n // Found\n return ResponseEntity.ok().body(user);\n }", "VendorNotificationResponseDTO findById(String id)throws Exception;", "public T findById(int id)\n {\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n String query = createSelectQuery(\"id\");\n try\n {\n connection = ConnectionFactory.getConnection();\n statement = connection.prepareStatement(query);\n statement.setInt(1,id);\n resultSet = statement.executeQuery();\n\n return createObjects(resultSet).get(0);\n }catch (SQLException e)\n {\n LOGGER.log(Level.WARNING,type.getName() + \"DAO:findById\"+ e.getMessage());\n }finally {\n ConnectionFactory.close(resultSet);\n ConnectionFactory.close(statement);\n ConnectionFactory.close(connection);\n }\n return null;\n }", "@Override\n\tpublic DbQueryStatus findSongById(String songId) {\n\t\tif (songId == null){\n\t\t\tdbQueryStatus.setMessage(\"parameters are missing, please double check the parameters\");\n\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_BAD_REQUEST);\n\t\t}\n\t\t// if there are some parameters missing\n\t\telse {\n\t\t\ttry {\n\t\t\t\tobjectId = new ObjectId(songId);\n\t\t\t} catch (Exception e) {\n\t\t\t\tdbQueryStatus.setMessage(\"The input songId is invalid\");\n\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_BAD_REQUEST);\n\t\t\t\treturn dbQueryStatus;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tHashtable queryPair = new Hashtable();\n\t\t\t\tqueryPair.put(\"_id\", objectId);\n\t\t\t\tDocument query = new Document(queryPair);\n\n\t\t\t\tMongoCursor<Document> cursor = collection.find(query).iterator();\n//\t\tSystem.out.println(\"set is \" + cursor.toString());\n\t\t\t\tif (cursor.hasNext()) {\n\t\t\t\t\tDocument songDocFound = cursor.next();\n\t\t\t\t\tSong songFound = converter.toSong(songDocFound);\n\n\t\t\t\t\tdbQueryStatus.setMessage(\"The song is successfully found in the database\");\n\t\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_OK);\n\t\t\t\t\tdbQueryStatus.setData(songFound);\n\t\t\t\t} else {\n\t\t\t\t\t//when object id is not existing int he database.\n\t\t\t\t\tdbQueryStatus.setMessage(\"The song with id given is not found in the database\");\n\t\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_NOT_FOUND);\n\t\t\t\t\tdbQueryStatus.setData(null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tdbQueryStatus.setMessage(\"Find Song failed\");\n\t\t\t\tdbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_GENERIC);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dbQueryStatus.getMessage());\n\t\treturn dbQueryStatus;\n\t}", "@Transactional(readOnly = true)\n public Optional<InsuranceObjectDTO> findOne(Long id) {\n log.debug(\"Request to get InsuranceObject : {}\", id);\n return insuranceObjectRepository.findById(id)\n .map(insuranceObjectMapper::toDto);\n }", "@Test\n\tpublic void test_get_by_id_success(){\n\t\tResponseEntity<User> response = template.getForEntity(\n\t\t\t\tREST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, User.class);\n\t\tUser user = response.getBody();\n\t\tassertThat(user.getEmail(), is(\"[email protected]\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.OK));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<Bird> getBird(@PathVariable(value = \"id\",required = true) String id ){\n logger.trace(\"Get Bird by Id invoked, with id {}\" , id);\n Bird bird = birdService.findById(id);\n logger.trace(\"Get Bird by Id finished, with id {} \" , id);\n return ResponseEntity.status(HttpStatus.OK).body(bird);\n }", "@GetMapping(\"/getPaymentById2\")\n public CommonResult ResponseEntity(Long id) {\n ResponseEntity<CommonResult> entity = restTemplate.getForEntity(PAYMENT_URL + \"/getPaymentById?id=\" + id, CommonResult.class);\n if (entity.getStatusCode().is2xxSuccessful()) {\n return entity.getBody();\n }\n return new CommonResult(444, \"操作失败\");\n }", "@Test\n public void validResturantById() throws Exception {\n Logger.getGlobal().info(\"Start validResturantById test\");\n ResponseEntity<Entity> restaurant = restaurantController.findById(RESTAURANT);\n\n Assert.assertEquals(HttpStatus.OK, restaurant.getStatusCode());\n Assert.assertTrue(restaurant.hasBody());\n Assert.assertNotNull(restaurant.getBody());\n Assert.assertEquals(RESTAURANT, restaurant.getBody().getId());\n Assert.assertEquals(RESTAURANT_NAME, restaurant.getBody().getName());\n Logger.getGlobal().info(\"End validResturantById test\");\n }", "RequesterVO get(int id);", "@Test\n void getByIdSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }", "@RequestMapping(value = \"/findId/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public final EmployeeDTO findEmployeeById(@PathVariable(\"id\") long id) {\n try {\n LOGGER.info(\"getting Employee with id=\" + id);\n return employeeFacade.findEmployeeById(id);\n } catch (NonExistingEntityException e) {\n throw new RequestedResourceNotFound(\"Employee with id=\" + id + \" does not exist in system.\", e);\n } catch (IllegalArgumentException e) {\n throw new RequestedResourceNotFound(\"Argument id is illegal.\", e);\n }\n }", "@GetMapping(\"/:id\")\n public ResponseEntity<Picture> picById(@PathVariable long id) {\n Optional<Picture> optionalPic = pictureManager.getById(id);\n if (optionalPic.isPresent()) {\n return ResponseEntity.ok(optionalPic.get());\n }\n\n return ResponseEntity.notFound().build();\n }", "@Override\n @Transactional(readOnly = true)\n public MechanicDTO findOne(Long id) {\n log.debug(\"Request to get Mechanic : {}\", id);\n Mechanic mechanic = mechanicRepository.findOne(id);\n return mechanicMapper.toDto(mechanic);\n }", "@GetMapping(\"/{id}\")\n public ChatMessage getById(@PathVariable Long id) {\n return messageService.getById(id)\n .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));\n }", "@GetMapping(\"/nominees/{id}\")\n @Timed\n public ResponseEntity<NomineeDTO> getNominee(@PathVariable Long id) {\n log.debug(\"REST request to get Nominee : {}\", id);\n Optional<NomineeDTO> nomineeDTO = nomineeService.findOne(id);\n return ResponseUtil.wrapOrNotFound(nomineeDTO);\n }", "@CrossOrigin(origins = \"*\")\r\n\t@GetMapping(\"/user/{id}\")\r\n\tpublic ResponseEntity<Users> getUserById(@PathVariable(value=\"id\")Long id){\r\n\t\t\r\n\t\tUsers user = usersDAO.findById(id);\r\n\t\t\r\n\t\tif(user==null) {\r\n\t\t\t\r\n\t\t\treturn ResponseEntity.notFound().build();\r\n\t\t}\r\n\t\treturn ResponseEntity.ok().body(user);\r\n\t}", "public User getById(@NotBlank String id){\n System.out.println(\"Sukses mengambil data User.\");\n return null;\n }", "T findById(ID id) ;", "@RequestMapping(value = \"/book/{id}\", method = RequestMethod.GET)\r\n public ResponseEntity<Book> get(@PathVariable(\"id\") long id) throws Exception{\r\n Book book = bookService.getBookById(id);\r\n return ResponseEntity.ok().body(book);\r\n }", "public Comic saveComicById(Long id) {\n\t\tif(findById(id).isPresent()) throw new ValidationException(\"Comic (id= \"+ id +\") already registered\");\n\t\t\n\t\t\n\t\tRestTemplate restTemplate = new RestTemplate();\t\t\n\t\tString url = \"https://gateway.marvel.com/v1/public/comics/\" + id\n\t\t\t\t\t\t+ \"?apikey=\" + key\n\t\t\t\t \t\t+ \"&hash=\" + hash\n\t\t\t\t \t\t+ \"&ts=\" + ts;\n\t\t\n\t\tString response = restTemplate.getForObject(url, String.class);\n\t\t\n\t\treturn saveFromApi(response).get(0);\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<LinhvucDTO> findOne(Long id) {\n log.debug(\"Request to get Linhvuc : {}\", id);\n return linhvucRepository.findById(id)\n .map(linhvucMapper::toDto);\n }", "@RequestMapping(value = \"/estados/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Estado> get(@PathVariable Long id, HttpServletResponse response) {\n log.debug(\"REST request to get Estado : {}\", id);\n Estado estado = estadoRepository.findOne(id);\n if (estado == null) {\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n return new ResponseEntity<>(estado, HttpStatus.OK);\n }", "@RequestMapping(value = \"/oeuvres/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Oeuvre> getOeuvre(@PathVariable Long id) {\n log.debug(\"REST request to get Oeuvre : {}\", id);\n Oeuvre oeuvre = oeuvreRepository.findOne(id);\n return Optional.ofNullable(oeuvre)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "@Override\n\tpublic ResponseEntity<?> get(Long id) {\n\t\treturn ResponseEntity.ok(service.deposit.get(id));\n\t}", "@Transactional(readOnly = true)\n public Optional<KohnegiDTO> findOne(Long id) {\n log.debug(\"Request to get Kohnegi : {}\", id);\n return kohnegiRepository.findById(id)\n .map(kohnegiMapper::toDto);\n }", "@RequestMapping(\n value = \"/user/{user_id}\", method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_UTF8_VALUE\n )\n public ResponseEntity<User> getUser(@PathVariable(\"user_id\") long id) {\n System.out.println(\"Fetching User with id \" + id);\n User user = new User();\n user.setId(id);\n user.setName(\"Boby\");\n return new ResponseEntity<>(user, HttpStatus.OK);\n }", "@GetMapping(\"/productos/{id}\")\n @Timed\n public ResponseEntity<Producto> getProducto(@PathVariable Long id) {\n log.debug(\"REST request to get Producto : {}\", id);\n Producto producto = productoRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(producto));\n }", "@GetMapping(\"Track/{id}\")\n public ResponseEntity<?> getTrack(@PathVariable(\"id\") int id) {\n ResponseEntity responseEntity;\n try {\n Track track=trackService.getTrackById(id);\n responseEntity=new ResponseEntity<>(track,HttpStatus.OK);\n }\n catch (Exception ex){\n responseEntity=new ResponseEntity<>(ex.getMessage(),HttpStatus.CONFLICT);\n }\n return responseEntity;\n }", "@GetMapping(path = \"/{id}\")\n public Response<Object> show\n (\n @PathVariable(\"id\") Long id\n )\n {\n\n try {\n return Response.ok().setPayload(facultyService.show(id));\n } catch (FacultyNotFoundException e) {\n return Response.exception().setErrors(e.getMessage());\n }\n }", "@GetMapping(\"userId\")\n public ResponseEntity<UserEntity> getById(@RequestParam(\"id\") long id) {\n return ResponseEntity.ok(uService.geById(id));\n }", "@Override\n public User findById(Integer id) {\n try {\n return runner.query(con.getThreadConnection(),\"select *from user where id=?\",new BeanHandler<User>(User.class),id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }", "@Override\n public AlunoDTO findOne(String id) {\n log.debug(\"Request to get Aluno : {}\", id);\n Aluno aluno = alunoRepository.findOne(id);\n return alunoMapper.toDto(aluno);\n }", "@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }", "@GetMapping (\"/getOneAnswer\")\n @ResponseBody\n public Answer getOneAnswer(long id){\n Optional<Answer> oanswer = this.answerRepository.findById(id);\n if(oanswer.isPresent()){\n return oanswer.get();\n }\n return null;\n }", "@RequestMapping(value = \"/user/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<User> getUser(@PathVariable(\"id\") long id) {\n Optional<User> user = userService.findById(id);\n\n// user.ifPresent(item -> user1 = item);\n\n if (user.isPresent())\n return new ResponseEntity<>(user.get(), HttpStatus.OK);\n else return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }", "@GetMapping(\"/enregistrements/{id}\")\n @Timed\n public ResponseEntity<Enregistrement> getEnregistrement(@PathVariable Long id) {\n log.debug(\"REST request to get Enregistrement : {}\", id);\n Enregistrement enregistrement = enregistrementRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(enregistrement));\n }", "public Candidat getUserByid(int id) {\n Candidat candidat = StaticVars.currentCandidat;\n String url = StaticVars.baseURL + \"/userbyid\";\n ConnectionRequest req = new ConnectionRequest();\n req.setUrl(url);\n req.setPost(false);\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n }\n\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return candidat;\n\n }", "@Transactional(readOnly = true)\n public Optional<Fonction> findOne(Long id) {\n log.debug(\"Request to get Fonction : {}\", id);\n return fonctionRepository.findById(id);\n }", "@Transactional(readOnly = true)\n public Optional<SolicitacaoExameDTO> findOne(Long id) {\n log.debug(\"Request to get SolicitacaoExame : {}\", id);\n return solicitacaoExameRepository.findById(id)\n .map(solicitacaoExameMapper::toDto);\n }", "@GetMapping (\"/getOneQuestion\")\n @ResponseBody\n public Question getOneQuestion(long id){\n Optional<Question> oquestion = this.questionRepository.findById(id);\n if(oquestion.isPresent()){\n return oquestion.get();\n }\n return null;\n }", "@GetMapping(\"/{id}\")\n\tpublic String getById(@PathVariable int id) {\n\t\tSystem.out.println(\"recuperer la commande avec l'id= \" +id);\n\t\tOptional<Commande> optional = commandeRepository.findById(id);\n\t\tif (optional.isPresent()) {\n\t\t\tSystem.out.println(\"Commande= \" +optional.get());\n\t\t} else {\n\t\t\tSystem.out.println(\"La commande avec l'id \" +id+ \" n'existe pas.\");\n\t\t}\n\t\treturn \"details_commande\";\n\t}", "@Override\n @Transactional(readOnly = true)\n public SintomaDTO findOne(Long id) {\n log.debug(\"Request to get Sintoma : {}\", id);\n Sintoma sintoma = sintomaRepository.findOne(id);\n return sintomaMapper.toDto(sintoma);\n }", "@Test\r\n\tpublic void getMessageByIdPositiveTest() {\r\n\r\n\t\tInteger messageID = 1;\r\n\t\tString messageText = \"Some text\";\r\n\t\tLong messageGrID = 1L;\r\n\r\n\t\tMessageEntity expectedMessage = new MessageEntity();\r\n\r\n\t\texpectedMessage.setMesId(messageID.longValue());\r\n\t\texpectedMessage.setText(messageText);\r\n\t\texpectedMessage.setGrId(messageGrID);\r\n\t\texpectedMessage.setDate();\r\n\r\n\t\tOptional<MessageEntity> of = Optional.of(expectedMessage);\r\n\r\n\t\tMockito.when(messageRepository.findById(messageID.longValue())).thenReturn(of);\r\n\r\n\t\tassertThat(mesServ.getMessageById(messageID))\r\n\t\t\t\t.describedAs(\"Actual object returned from method is different from the expected one.\")\r\n\t\t\t\t.isEqualTo(expectedMessage);\r\n\t}", "@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }", "@RequestMapping(\"/getContact\")\n\tprivate ResponseEntity<String> getContact(@RequestParam int id) throws JsonProcessingException {\n\t\t\n\t\tContacts contact = c_service.getContactById(id);\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (contact == null) {\n\t return new ResponseEntity<String>(\"No User with that Id found\", \n\t responseHeaders, HttpStatus.UNAUTHORIZED);\n\t } else {\n\t responseHeaders.add(\"Content-Type\", \"application/json\");\n\t String json = convertToJson(contact);\n\t return new ResponseEntity<String>(json, responseHeaders, HttpStatus.OK); \n\t }\t\t\n\t}", "T getById(ID id);", "@GET\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGetbyId(@PathParam(\"id\") String id) {\n Gson gson = GSONFactory.getInstance();\n Employee employee = getEmployeeById(id);\n\n if (employee == null) {\n Response response = Response.status(404).build();\n return response;\n } else {\n String jsonOutput = gson.toJson(employee);\n Response response = Response.ok().entity(jsonOutput).build();\n return response;\n }\n }", "@RequestMapping(value = \"/bancos/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Banco> getBanco(@PathVariable Long id) {\n log.debug(\"REST request to get Banco : {}\", id);\n Banco banco = bancoService.findOne(id);\n return Optional.ofNullable(banco)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<Mock> findOne(Long id) {\n log.debug(\"Request to get Mock : {}\", id);\n return mockRepository.findById(id);\n }", "@Override\n\tpublic Gasto findById(Integer id) {\n\t\treturn gastoModel.findById(id).orElseThrow(null);\n\t}", "T getById(int id);" ]
[ "0.657776", "0.639862", "0.6360868", "0.62347263", "0.62242603", "0.6199483", "0.619696", "0.6193374", "0.6192188", "0.6188639", "0.61868024", "0.6183813", "0.61450446", "0.6101525", "0.6092493", "0.6079451", "0.6070819", "0.60535175", "0.60415334", "0.6036222", "0.6021771", "0.6017957", "0.6014432", "0.6005482", "0.6004443", "0.5984066", "0.59819496", "0.59799343", "0.59764683", "0.5973476", "0.5966342", "0.5965641", "0.596107", "0.59544814", "0.5947072", "0.5937055", "0.5915656", "0.5910319", "0.59044844", "0.5902793", "0.58927536", "0.58872867", "0.5880189", "0.5878819", "0.58621216", "0.58588547", "0.5835274", "0.5830165", "0.5828846", "0.58194095", "0.5814783", "0.58107495", "0.5804556", "0.5803653", "0.5799436", "0.57883364", "0.578676", "0.5766641", "0.5764487", "0.57613575", "0.57550263", "0.5752499", "0.5751302", "0.57457566", "0.57441866", "0.5740668", "0.57358694", "0.572827", "0.5725872", "0.57227534", "0.5720544", "0.5716751", "0.57145655", "0.57128364", "0.57063884", "0.57036644", "0.57018244", "0.56986076", "0.5696643", "0.56963146", "0.56961304", "0.5694441", "0.5690656", "0.5689956", "0.56876254", "0.5686714", "0.5678037", "0.5674431", "0.56742674", "0.5670688", "0.56699413", "0.566206", "0.5660894", "0.5659582", "0.5658678", "0.5657154", "0.56521046", "0.5628131", "0.5627176", "0.56251216" ]
0.57754374
57
Method that receives an list objects by id from the database and return response with error message if something wrong. If everything ok response with success message
@RequestMapping(value = "/getAll", method = RequestMethod.GET) public ResponseEntity getAllUsers() { List<User> users = userService.getAllUsers(); if (CollectionUtils.isEmpty(users)) { return new ResponseEntity(HttpStatus.NO_CONTENT); } return new ResponseEntity(users, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value=\"/by-id/{id}\",method=RequestMethod.GET)\r\n\tpublic ResponseEntity<?> listarById(@PathVariable(\"id\") long id) {\r\n\t\treturn new ResponseEntity<List<Cliente>>(clienteService.listarById(id), HttpStatus.OK);\r\n\t}", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "@RolesAllowed({TipoRole.ADMIN})\r\n\t@GET\r\n\t@Path(\"/listar/pessoa/{id}\")\r\n\t@Produces(\"application/json\")\r\n\tpublic Response listar(@PathParam(\"id\") Integer idPessoa) {\r\n\t\t\r\n\t\tResponseBuilder builder = Response.status(Response.Status.BAD_REQUEST);\r\n\t\tbuilder.expires(new Date());\r\n\t\t\r\n\t\ttry {\r\n\r\n\t\t\tList<Arquivo> arquivos = ArquivoDAO.getInstance()\r\n\t\t\t\t\t.getByIdPessoa(idPessoa);\r\n\t\t\t\r\n\t\t\tbuilder.status(Response.Status.OK);\r\n\t\t\tbuilder.entity(arquivos);\r\n\r\n\t\t} catch (SQLExceptionNutrIF qme) {\r\n\r\n\t\t\tbuilder.status(Response.Status.INTERNAL_SERVER_ERROR).entity(\r\n\t\t\t\t\tqme.getError());\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn builder.build();\t\t\r\n\t}", "@GetMapping(value = \"/{id}\")\n\tpublic ResponseEntity<Response<PedidoDto>> listarPorId(@PathVariable(\"id\") Long id) {\n\t\tlog.info(\"Buscando pedido por ID: {}\", id);\n\t\tResponse<PedidoDto> response = new Response<PedidoDto>();\n\t\tOptional<Pedido> pedido = this.pedidoService.buscarPorId(id);\n\n\t\tif (!pedido.isPresent()) {\n\t\t\tlog.info(\"Pedido não encontrado para o ID: {}\", id);\n\t\t\tresponse.getErrors().add(\"Pedido não encontrado para o id \" + id);\n\t\t\treturn ResponseEntity.badRequest().body(response);\n\t\t}\n\n\t\tresponse.setData(pedidoService.converterPedidoDto(pedido.get()));\n\t\treturn ResponseEntity.ok(response);\n\t}", "List<T> findAllById(List<Object> ids) throws Exception;", "private void Msgdelete() {\n\t\tRequestParams params = new RequestParams();\n\t\tids=new String[myList.size()];\n\t\tfor (int i = 0; i < myList.size(); i++) {\n\t\t\tids[i]=myList.get(i).getId();\n\t\t\t//if (myList.get(i).getIscheck()) { }\n\t\t}\n\t\tGson gson = new Gson();\n\t \n\t\tparams.put(\"customer_id\", 16);\n\t\ttry {\n\t\t\tparams.put(\"ids\", new JSONArray(gson.toJson(ids)));\n\t\t} catch (JSONException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n \n\t\tparams.setUseJsonStreamer(true);\n\t\tMyApplication.getInstance().getClient()\n\t\t\t\t.post(Config.batchRead, params, new AsyncHttpResponseHandler() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody) {\n\t\t\t\t\t\tSystem.out.println(\"-onSuccess---\");\n\t\t\t\t\t\tString responseMsg = new String(responseBody)\n\t\t\t\t\t\t\t\t.toString();\n\t\t\t\t\t\tLog.e(\"LJP\", responseMsg);\n\t\t\t\t\t\t \n\t\t\t\t\t\tJSONObject jsonobject = null;\n\t\t\t\t\t\tint code = 0;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjsonobject = new JSONObject(responseMsg);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tcode = jsonobject.getInt(\"code\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(code==-2){\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}else if(code==1){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), jsonobject.getString(\"message\"),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "@GetMapping(\"/items/{id}\")\n public ResponseEntity<Items> getItems(@PathVariable Long id) {\n log.debug(\"REST request to get Items : {}\", id);\n Optional<Items> items = itemsRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(items);\n }", "@GetMapping(value = ServiceConfig.URL_PARTIE_ID_JOUEUR_TIRER_INDICE, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<List<Integer>> carteIndice(@PathVariable(name = ServiceConfig.PARTIE_ID_PARAM) String idP, @PathVariable(name=ServiceConfig.JOUEUR_ID_PARAM) String idJ, @RequestBody List<Integer> des) {\n try {\n facade.tirerIndice(idP, idJ, des);\n GlobalReplayProcessor.partieNotification.onNext(facade.findPartie(idP));\n return ResponseEntity.ok(des);\n } catch (PasJoueurCourantException e) {\n System.out.println(\"401 ws ce n'est pas le tour de ce joueur\");\n return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();\n } catch (PiocherIndiceNonAutoriseException e) {\n System.out.println(\"401 ws action non autorisé : vous n'avez pas fait de loupe au lancer de dé\");\n return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();\n } catch (ActionNonAutoriseeException e) {\n System.out.println(\"401 ws action non autorisé : ce n'est pas le moment pour de piocher une carte\");\n return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();\n } catch (JoueurPasDansLaPartieException | NonInscritException e) {\n System.out.println(\"404 ws joueur non trouvé\");\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n } catch (PartieInexistanteException e) {\n System.out.println(\"404 ws partie non trouvée\");\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n }\n }", "private void handleListOperation() {\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Error code:\" + response.getStatus());\n }\n }", "@GetMapping(\"user/{userId}/list\")\n public ResponseEntity<?> getUserListById(@PathVariable int userId) {\n GenericResponse response = new GenericResponse();\n if (!userService.existsByUserId(userId)) {\n response.setMessage(\"User was not found\");\n response.setStatus(404);\n return ResponseEntity.status(404).body(response);\n }\n List<UserList> resultList = userListService.getAllUserListByUserId(userId);\n if (resultList.size() > 0) {\n response.setStatus(200);\n return ResponseEntity.status(200).body(resultList);\n\n } else {\n response.setMessage(\"No Lists found\");\n response.setStatus(404);\n return ResponseEntity.status(404).body(response);\n }\n }", "@RequestMapping(value=\"/mensajes/{id}\", method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Mensaje> findById(@PathVariable int id){\n\t\tMensaje mensaje = chatDAO.findById(id);\n\t\tResponseEntity<Mensaje> r = ResponseEntity.status(HttpStatus.OK).body(mensaje);\n\t\treturn r;\n\t}", "List<UserInfo> getUserListByIdLists(List<Integer> idList);", "public List<Object> findById(Object obj) throws Exception {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic ApplicationResponse getUsers(String id) {\n\n\t\tList<UserResponse> responses = new ArrayList<>();\n\t\tif (!StringUtils.isEmpty(id)) {\n\t\t\tOptional<UserEntity> userEntity = repository.findById(id);\n\t\t\tif (userEntity.isPresent()) {\n\t\t\t\tUserEntity user = userEntity.get();\n\t\t\t\tUserResponse response = enitytomodel.apply(user);\n\t\t\t\tresponses.add(response);\n\t\t\t\treturn new ApplicationResponse(true, \"Success\", responses);\n\t\t\t}\n\t\t} else {\n\t\t\tList<UserEntity> list = repository.findAll();\n\t\t\tif (list.size() > 0) {\n\t\t\t\tfor (UserEntity user : list) {\n\t\t\t\t\tUserResponse response = enitytomodel.apply(user);\n\t\t\t\t\tresponses.add(response);\n\t\t\t\t}\n\t\t\t\treturn new ApplicationResponse(true, \"Success\", responses);\n\t\t\t}\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", null);\n\t}", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "@GET\n @Path(\"{id}\")\n @Produces({ \"application/json\" })\n public abstract Response find(@PathParam(\"id\") Long id);", "public abstract List get(List oids) throws OIDDoesNotExistException;", "@RequestMapping(method=RequestMethod.GET,value=\"/{id}\",consumes=MediaType.APPLICATION_JSON_VALUE, produces=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseEntity<Producto> buscarPorId(@PathVariable Integer id){\r\n\t\tProducto productoBuscado=dao.buscar(id);\r\n\t\treturn new ResponseEntity<Producto>(productoBuscado,HttpStatus.OK);\r\n\t}", "private void handleFindById(String[] args) {\n if (args.length < 3) {\n String requiredArgs = \"<id>\";\n Messages.badNumberOfArgsMessage(args.length, FIND_BY_ID_OPERATION, requiredArgs);\n System.exit(1);\n }\n\n Long id = null;\n try {\n id = Long.parseLong(args[2]);\n } catch (NumberFormatException e) {\n System.out.println(\"Error - argument '\" + args[2] + \"' must be a number\");\n System.exit(1);\n }\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\" + id.toString());\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n invocationBuilder.header(\"accept\", MediaType.APPLICATION_JSON);\n\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n BrickDto brickDto = response.readEntity(BrickDto.class);\n System.out.println(\"Brick found. \" + brickDto);\n } else if (response.getStatus() == Response.Status.NOT_FOUND.getStatusCode()) {\n System.out.println(\"Error - brick was not found, wrong id: \" + id + \" Server returned: \" + response.getStatus());\n } else {\n System.out.println(\"Error on server, server returned \" + response.getStatus());\n }\n }", "public Result all(String id);", "@ResponseBody\n @RequestMapping(value=\"/usercompleted\", method=RequestMethod.GET)\n public LinkedList<Completed> usersCompleted(@RequestParam(\"ID\") String id){\n dbManager.initializeDatabase();\n int ID=Integer.parseInt(id);\n LinkedList<Completed> usersCompleted=dbManager.getUsersCompletedList(ID);\n dbManager.closeDatabase();\n return usersCompleted;\n }", "protected abstract List performQuery(String[] ids);", "protected abstract void success(List<T> data);", "List<String> getList(String id);", "@Transactional\n public static Result updateListItem(String listId, String itemId){\n Item item = Item.findById(Long.parseLong(itemId));\n ItemList list = ItemList.findById(Long.parseLong(listId));\n if(list.containsItem(item)){\n \n }\n return ok(toJson(item));\n }", "List<T> getEntitiesByIds(List<ID_TYPE> ids) throws NotImplementedException;", "public Empleado list(int id) {\n Empleado emp = new Empleado();\r\n String sql = \"SELECT * FROM empleado WHERE Id=\" + id;\r\n \r\n try {\r\n con = cn.getConexion();\r\n ps = con.prepareStatement(sql);\r\n rs = ps.executeQuery();\r\n \r\n rs.next(); //un resultset empieza fuera, me posiciono en la primera\r\n emp.setId(rs.getInt(\"Id\"));\r\n emp.setNombre(rs.getString(\"Nombre\"));\r\n emp.setSalario(rs.getDouble(\"Salario\")); \r\n } catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return emp;\r\n }", "@GET\n\t@Path(\"{empID}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getById(@PathParam(\"empID\") int id) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tGenericEntity<List<EmployeeVO>> generic = new GenericEntity<List<EmployeeVO>>(employeeFacade.findById(id)) {};\n\t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", CorsFilter.DEFAULT_ALLOWED_ORIGINS).entity(generic).build();\n\t}", "@Test\n public void testGetShoppinglistsIdAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getShoppinglistsIdAction(\"{id}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ShoppingList\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "@RequestMapping(value=\"/getProductModel\", produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<ResponseDTO> getProductModels(@RequestParam int id)\n\t{\n\t\tResponseDTO responseDTO = new ResponseDTO();\n\t\tOptional<Users> user= customerService.getUserByEmail(SecurityUtils.getCurrentUserLogin());\n\t\t\n\t\tif (user.isPresent()) {\n\t\t\t\n\t\t\tresponseDTO.setProductModelList(productmodelservice.getProductModelById(id));\n\t\t\tresponseDTO.setMessage(\"success\");\n\t\t}\n\t\t\n\n\t\n\t\treturn new ResponseEntity<ResponseDTO>(responseDTO,HttpStatus.OK);\n\t}", "@GET\n\t@Path(\"/gerente/consultarBuenosClientes/{id: \\\\d+}\")\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response consultarBuenosClientes(@PathParam(\"id\") int id)throws Exception\n\t{\n\t\tArrayList<Cliente> mens = null;\n\t\tMaster mas = Master.darInstancia(getPath());\n\t\ttry \n\t\t{\n\t\t\tmens = mas.consultarBuenosClientes(id);\n\t\t\tSystem.out.println(mens);\n\t\t} catch (Exception e) {\n\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\n\t\t}\n\t\treturn Response.status(200).entity(mens).build();\n\t}", "private Future<JsonObject> fetchItem(String id) {\n Promise<JsonObject> p = Promise.promise();\n client\n .get(catPort, catHost, catItemPath)\n .addQueryParam(ID, id)\n .send()\n .onFailure(\n ar -> {\n ar.printStackTrace();\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n obj -> {\n JsonObject res = obj.bodyAsJsonObject();\n if (obj.statusCode() == 200)\n {\n if (res.getString(STATUS).equals(status.SUCCESS.toString().toLowerCase()))\n p.complete(obj.bodyAsJsonObject().getJsonArray(RESULTS).getJsonObject(0));\n }\n else{\n if (obj.statusCode() == 404)\n p.fail(ITEMNOTFOUND + id);\n else{\n LOGGER.error(\"failed fetchItem: \" + res);\n p.fail(INTERNALERROR);\n }\n\n }\n });\n return p.future();\n }", "@GetMapping(\"/J314Authorities.listusers/{id1}\")\n\t@Timed\n\t\n\tpublic ResultExt< List< J314UserAuthorityPoj >> getListUsers(HttpServletRequest request,HttpServletResponse response, @PathVariable String id1)\n\t{\n\t\t\n\t\tString params=UtilParams.paramsToString(\"String\",id1);\n\n\t\tContexto ctx = Contexto.init();\n\t\tctx.put(Contexto.REQUEST,request);\n\t\tctx.put(Contexto.RESPONSE,response);\n\t\tctx.put(Contexto.CLAVE_SEGURIDAD,\"REST_ENTITY_J314AUTHORITY_GETLISTUSERS\");\n\t\tctx.put(Contexto.URL_SOLICITADA,\"/J314Authorities.listusers/{id1}\");\n\t\tResult< List< J314UserAuthorityPoj >> res=new Result<>();\n\t\tif (log.isInfoEnabled()) log.info(\"Entrada en REST GET:getListUsers(\"+params+\")\"+params);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(!verificaPermisos(\"REST_ENTITY_J314AUTHORITY_GETLISTUSERS\"))\n\t\t\t{\n\t\t\t\tres.addError(new ErrorSinPermiso(\"REST_ENTITY_J314AUTHORITY_GETLISTUSERS\",\"/J314Authorities.listusers/{id1}\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparams=UtilParams.paramsToString(\"String\",id1);\n\t\t\t\tif (log.isInfoEnabled()) log.info(\"Verificado en REST GET:getListUsers(\"+params+\")\"+params);\n\n\t\t\t\tString id1_ = id1;\n\n\t\t\t\tResult< List< J314UserAuthority > > res_=service.getListUsers(id1_);\n\t\t\t\tres.setInfoEWI(res_);\n\n\t\t\t\tres.setData( J314UserAuthorityPoj.toPOJOList(res_.getData()));\n\n\t\t\t}\n\t\t\taddTiempoSesion();\n\t\t}\tcatch(Exception e)\n\t\t{\n\t\t\tres.addError(new ErrorGeneral(e));\n\t\t\tif (log.isErrorEnabled()) log.error(\"Error en REST GET:getListUsers(\"+params+\"). Excepcion:\"+UtilException.printStackTrace(e));\n\t\t}\n\t\tif (log.isInfoEnabled()) log.info(\"Salida de REST GET:getListUsers(\"+params+\"). Resultado:\"+res.toString());\n\n\t\tResultExt< List< J314UserAuthorityPoj > > resFin=new ResultExt<>(res,ctx.getAs(\"ticketStr\"));\n\t\tContexto.close();\n\t\treturn resFin;\n\t}", "public String idLookupResponse(String id, String fieldList) throws Exception {\n SolrQuery solrQuery = new SolrQuery();\n solrQuery.set(\"rows\", \"1\");\n solrQuery.set(\"q\", \"id:\\\"\" + id + \"\\\"\");\n solrQuery.set(\"wt\", \"json\");\n solrQuery.set(\"q.op\", \"AND\");\n solrQuery.set(\"indent\", \"true\");\n solrQuery.set(\"facet\", \"false\");\n \n if (fieldList!= null) {\n solrQuery.set(\"fl\",fieldList); \n }\n \n NoOpResponseParser rawJsonResponseParser = new NoOpResponseParser();\n rawJsonResponseParser.setWriterType(\"json\");\n\n QueryRequest req = new QueryRequest(solrQuery);\n req.setResponseParser(rawJsonResponseParser);\n SolrUtils.setSolrParams(solrQuery);\n NamedList<Object> resp = solrServer.request(req);\n String jsonResponse = (String) resp.get(\"response\");\n return jsonResponse;\n }", "@RequestMapping(value = \"{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity<?> get(@PathVariable long id) {\n Todo result = getTodoOrThrow(id);\n\n return ResponseEntity.ok(dtoConverter.convert(result));\n }", "public List<GrupoLocalResponse> buscarTodos();", "@GetMapping(value = \"patientemercontactnew\")\n\tpublic JsonResponse<List<RestPatientDetailsNewModel>> editpatientemercontactnew(@RequestParam String id) {\n\t\tlogger.info(\"Method :patient emercontact contact starts\");\n\t\t\n\t\t\n\t\tlogger.info(\"Method :patient emercontact ends\");\n\t\treturn PatientDetailsDao.patientemercontactnew(id);\n\t\t\n\t}", "public ArrayList<ArrayList<Integer>> selectForQuoiEntre(int id) throws DAOException;", "List<Long> getAuthorisedList( Long id) ;", "@GetMapping(value = \"editpatientfamdocnew\")\n\tpublic JsonResponse<List<RestPatientDetailsNewModel>> editpatientfamdocnew(@RequestParam String id) {\n\t\tlogger.info(\"Method :patientfamdocnew starts\");\n\t\t\n\t\t\n\t\tlogger.info(\"Method :patientfamdocnew ends\");\n\t\treturn PatientDetailsDao.editpatientfamdocnew(id);\n\t\t\n\t}", "@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response list() {\n\t\t//System.out.println(\"================================= public Response list()\");\n\t\tIterable<Student> students = this.studentService.findAll();\n\t\tif (students != null) {\n\t\t\tList<StudentModelBasic> sbmList = new ArrayList<>();\n\t\t\tfor (Student s : students) {\n\t\t\t\tsbmList.add(this.studentService.convertToModelBasic(s));\n\t\t\t}\n\t\t\t//System.out.println(students.toString());\n\t\t\treturn Response.ok(sbmList).build();\n\t\t} else {\n\t\t\treturn Response.status(Status.NOT_FOUND).build();\n\t\t}\n\t}", "public Mono<PlayList> findById(String id);", "@Override\n\tpublic List<MedioPago> getallbyid(List<?> lst) {\n\t\treturn null;\n\t}", "@GET(\"aktivitas/{id}\")\n Call<List<AktifitasModel>>\n getById(@Path(\"id\") String id);", "@Secured({ \"ROLE_ADMIN\", \"ROLE_TEACHER\" })\n\t@RequestMapping(method = RequestMethod.GET, value = \"/by_id/{ids}\")\n\tpublic ResponseEntity<?> getById(@PathVariable String ids) {\n\n\t\ttry {\n\t\t\tInteger id = Integer.valueOf(ids);\n\t\t\tif (markRepo.existsById(id)) {\n\t\t\t\treturn new ResponseEntity<MarkEntity>(markRepo.findById(id).get(), HttpStatus.OK);\n\n\t\t\t} else\n\t\t\t\treturn new ResponseEntity<RestError>(new RestError(10, \"There is no mark with such ID\"),\n\t\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t} catch (Exception e) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(1, \"Error ocured: \" + e.getMessage()),\n\t\t\t\t\tHttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}", "@GetMapping(\"/id/{id}\")\n public ResponseEntity<?> getByIdPenerbit(@PathVariable Integer id){\n try {\n StatusMessageDto<PenerbitDto> response = new StatusMessageDto<>();\n PenerbitDto penerbitDto = penerbitService.getById(id);\n if(penerbitDto == null){\n response.setStatus(HttpStatus.BAD_REQUEST.value());\n response.setMessage(\"Penerbit tidak ditemukan!\");\n response.setData(penerbitDto);\n return ResponseEntity.badRequest().body(response);\n }\n else{\n response.setStatus(HttpStatus.OK.value());\n response.setMessage(\"Penerbit ditemukan!\");\n response.setData(penerbitDto);\n return ResponseEntity.ok().body(response);\n }\n } catch (Exception e) {\n return ResponseEntity.badRequest().body(e);\n }\n }", "@Test\n public void listAll_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n List<Workflow> wfList = new ArrayList<>();\n wfList.add(addMOToDb(1));\n wfList.add(addMOToDb(2));\n wfList.add(addMOToDb(3));\n\n // PREPARE THE TEST\n // Fill in the workflow db\n\n // DO THE TEST\n Response response = callAPI(VERB.GET, \"/mo/\", null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n List<Workflow> readWorkflowList = response.readEntity(new GenericType<List<Workflow>>() {\n });\n assertEquals(wfList.size(), readWorkflowList.size());\n for (int i = 0; i < wfList.size(); i++) {\n assertEquals(wfList.get(i).getId(), readWorkflowList.get(i).getId());\n assertEquals(wfList.get(i).getName(), readWorkflowList.get(i).getName());\n assertEquals(wfList.get(i).getDescription(), readWorkflowList.get(i).getDescription());\n }\n\n\n }", "@Override\n public List<Customer> call() throws Exception {\n string = string.replace(\"[\", \"\");\n string = string.replace(\"]\",\"\");\n string = string.replace(\" \", \"\");\n String str = \"http://10.0.2.2:8082/getCustomersByID?customerIDs=\" + string.replace(\"\\\"\", \"'\");\n URLConnection urlConn;\n BufferedReader bufferedReader;\n List<Customer> customerList = new ArrayList<>();\n\n\n try {\n URL url = new URL(str);\n urlConn = url.openConnection();\n bufferedReader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n JSONObject jsonObject = new JSONObject(line);\n Customer customer = new Customer();\n customer.setCustomerID(jsonObject.getString(\"_id\"));\n customer.setLastName(jsonObject.getString(\"lastName\"));\n customer.setFirstName(jsonObject.getString(\"firstName\"));\n customer.setPhoneNumber(jsonObject.getString(\"phoneNumber\"));\n customer.setAddress(jsonObject.getString(\"address\"));\n customer.setBalance(jsonObject.getString(\"balance\"));\n customerList.add(customer);\n\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return customerList;\n }", "public ArrayList<DTOcomentarioRta> listadoComentarioxComercio(int idComercio) {\n ArrayList<DTOcomentarioRta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\" select co.id_comercio, c.id_comentario, c.nombreUsuario, c.descripcion, c.valoracion, c.fecha, co.nombre , r.descripcion, r.fecha, r.id_rta, co.id_rubro\\n\"\n + \" from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\"\n + \" left join Respuestas r on r.id_comentario = c.id_comentario\\n\"\n + \" where co.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n int idcomentario = rs.getInt(2);\n String nombreU = rs.getString(3);\n String descripC = rs.getString(4);\n int valoracion = rs.getInt(5);\n String fechaC = rs.getString(6);\n String nombrecomercio = rs.getString(7);\n String descripcionR = rs.getString(8);\n String fechaR = rs.getString(9);\n int idR = rs.getInt(10);\n int rubro = rs.getInt(11);\n\n rubro rf = new rubro(rubro, \"\", true, \"\", \"\");\n comercio come = new comercio(nombrecomercio, \"\", \"\", id, true, \"\", \"\", rf, \"\");\n Comentario c = new Comentario(idcomentario, descripC, valoracion, nombreU, fechaC, come);\n respuestas r = new respuestas(idR, descripcionR, c, fechaR);\n DTOcomentarioRta cr = new DTOcomentarioRta(c, r);\n\n lista.add(cr);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "@Override\n\tpublic String list() throws Throwable {\n\t\treturn SUCCESS;\n\t}", "List<UserContentFile> findContentFiles(@Param(\"ids\") List<Long> ids);", "@GetMapping(\"/one/{id}\")\n\tpublic ResponseEntity<?> fetchOneData(@PathVariable(\"id\") Integer id) {\n\t\tResponseEntity<?> res = null;\n\t\ttry {\n\t\t\tEmployee emp = service.getOneEmpObject(id);\n\t\t\tres = new ResponseEntity<Employee>(emp, HttpStatus.OK);\n\t\t} catch (Exception e) {\n\t\t\tres = new ResponseEntity<String>(\"Unable Featch Data \", HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "@Override\n public void onResponse(Call<ResponseContent> call, Response<ResponseContent> response) {//obtener datos\n\n ResponseContent data = response.body();\n\n boolean answer = ValidateResponse( data );\n\n if( answer ){\n\n try{\n\n JSONArray arrayResult = data.getResults();\n JSONObject index = data.getIndex();\n\n for( int c = arrayResult.length() -1; c >= 0; c-- ){\n\n String id = arrayResult.getJSONObject(c)\n .getString( index.getString(\"0\") );\n String name = arrayResult.getJSONObject(c)\n .getString( index.getString(\"1\") );\n\n contentList.addView( GenerateComponentsList(c, name, id) );\n\n }\n }catch (Exception e){\n new ServicesPeticion().SaveError(e,\n new Exception().getStackTrace()[0].getMethodName().toString(),\n this.getClass().getName());\n }\n\n }else{\n Log.i( mss.TAG, data.getBody().toString() );\n }\n\n\n }", "public ArrayList consultaID(){\n ArrayList<Object> iduser = new ArrayList<Object>();\n\n sSQL = \"SELECT usuario.idusuario from usuario where usuario.idtipo_user='3'\";\n\n try {\n Statement st = cn.createStatement();\n ResultSet rs = st.executeQuery(sSQL);\n while (rs.next()) {\n iduser.add(rs.getInt(\"usuario.idusuario\"));\n\n }\n \n \n return iduser;\n } catch (Exception e) {\n \n System.out.println(\"consultando usuarios registrados para la seleccion del representante\");\n return null;\n \n }\n }", "@GetMapping(\"getans/{id}\")\n public ResponseEntity<List<Answer>> getAnswer(@PathVariable Long id) {\n\n List<Answer> a = this.userServices.getAnswer(id);\n\n if (a.size() <= 0) {\n\n return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n }\n\n return ResponseEntity.status(HttpStatus.CREATED).body(a);\n\n }", "@RequestMapping(value = \"/empregado/list/{empregadoId}\" , method = RequestMethod.GET)\n\tpublic Optional<EmpregadoDto> list(@PathVariable Integer idEmp){\n\t\treturn repoEmp.findById(idEmp);\n\t}", "WsTodo[] getTodosByTodoList(String listId);", "@PostMapping(\"/listarUsuarios\")\r\npublic String listarUsuarios(Model model) {\n try (Connection connection = dataSource.getConnection()) {\r\n Statement stmt = connection.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT id,nome,email FROM usuarios\");\r\n\r\n ArrayList<Usuario> output = new ArrayList<Usuario>();\r\n while (rs.next())\r\n output.add(new Usuario((Integer) rs.getObject(1), (String) rs.getObject(2), (String) rs.getObject(3)));\r\n\r\n model.addAttribute(\"listaUsuarios\", output);\r\n\r\n return \"dashboard_listausuarios\";\r\n\r\n } catch (Exception e) {\r\n model.addAttribute(\"message\", e.getMessage());\r\n return \"error\";\r\n }\r\n\r\n}", "@GetMapping(\"/listInByIds\")\n public R<List<User>> listInByIds(@RequestParam(value = \"ids\") List<String> ids) {\n return R.ok(userService.selectBatchIds(ids));\n }", "@PostMapping(\"/{id}\")\n public HttpEntity<?> getLeftOvers(@PathVariable UUID id) {\n ApiResponse mb = ussdService.getMb(id);\n return ResponseEntity.status(mb.isSuccess()?201:409).body(mb);\n\n }", "@GetMapping(value = \"/consultarByID\")\n public ResponseEntity consultar(@RequestParam Long id) {\n return empleadoService.consultar(id);\n }", "<TEntite> void envoiReponseAvecDonnees(ArrayList<TEntite> listeEntites, HttpServletResponse reponse, int codeDeStatutHttp, String message) throws IOException;", "public void get_userslist(){\n minterface = ApiClient.getAPICLIENT().create(RetroInterface.class);\n Call<Userlists> mgetlist_user = minterface.mgetuser_list();\n mgetlist_user.enqueue(new Callback<Userlists>() {\n @Override\n public void onResponse(Call<Userlists> call, Response<Userlists> response) {\n if(response.isSuccessful()){\n if(response.code()==200){\n for(int i =0;i<response.body().getResults().size();i++){\n Resultss mresult = new Resultss();\n if(response.body().getResults().get(i).getStatus()==1) {\n mresult.setId(response.body().getResults().get(i).getId());\n mresult.setName(response.body().getResults().get(i).getName());\n mresult.setPicture(response.body().getResults().get(i).getPicture());\n Log.d(TAG, \"onResponse: pictures\" + response.body().getResults().get(i).getPicture());\n mresult.setStatus(response.body().getResults().get(i).getStatus());\n mresult.setUsername(response.body().getResults().get(i).getUsername());\n mgetlist.add(mresult);\n }\n\n }\n mpoepolelisadapter = new ListOfPeople_Adpater(mgetlist,getContext());\n mlistview_people.setAdapter(mpoepolelisadapter);\n\n }\n }\n }\n\n @Override\n public void onFailure(Call<Userlists> call, Throwable t) {\n Log.d(TAG, \"onFailure: failed\"+t.toString());\n\n }\n });\n }", "@RequestMapping(value = \"/addObjects\", method = RequestMethod.POST)\r\n\t\r\n\t public String addObjects(@RequestBody String selecteditem) {\r\n\t\t\t \r\n\t\t String key,selected,oldKey=\"\";\r\n\t\t boolean haveID =false;\r\n\t\t StringBuilder result = new StringBuilder();\r\n\t\t Long id=null,oldid=null,tempid=null;\r\n\t\t Integer idStringvalue = null;\r\n\t\t JSONArray jsonArray=new JSONArray(selecteditem);\r\n\r\n\t\t \r\n\t\t /*Code to detect which record needs to be delete Starts here*/\r\n\t\t ArrayList<String> listdata = new ArrayList<String>(); \r\n\t\t if (jsonArray != null) {\r\n\t\t\t\r\n\t\t for (int i=0;i<jsonArray.length();i++){ \r\n\t\t \t JSONObject jsonObject=jsonArray.getJSONObject(i);\r\n\t\t \ttry{\r\n\t\t \t\t listdata.add(Integer.toString(jsonObject.getInt(\"idvalue\")));\r\n\t\t \t \r\n\t\t \t}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\tcontinue;\r\n\t\t \t}\r\n\t\t } \r\n\t\t } \r\n\t\t\r\n\t\t Users users=new Users();\r\n\t\t users = CommonUtil.getCurrentSessionUser();\r\n\t\t Map<String, SalesforceSetupDetail> tableData = new HashMap<>();\r\n \ttableData = salesforceSetupDetail.getKeyValueMapString(\"SalesforceSetupDetail\", \"salesforceObjectApiName\", \"SalesforceSetupDetail\", \" Where createdById=\"+users.getId());\r\n \t\r\n \tArrayList<String> ListOfID = new ArrayList<String>();\r\n \t/*Creating list of ID coming from databse starts here*/\r\n \tIterator<Map.Entry<String, SalesforceSetupDetail>> entries = tableData.entrySet().iterator();\r\n \twhile (entries.hasNext()) {\r\n \t Map.Entry<String, SalesforceSetupDetail> entry = entries.next();\r\n \t SalesforceSetupDetail colvalues = tableData.get(entry.getKey().toString());\r\n \t ListOfID.add(colvalues.getId().toString()); \r\n \t}\r\n\t\t\r\n\t\t\tCollection<String> selectedList = new ArrayList(listdata);\r\n\t\t\tCollection<String> unSelectedList = new ArrayList(ListOfID);\r\n\r\n\t\t\tList<String> sourceList = new ArrayList<String>(selectedList);\r\n\t\t\tList<SalesforceSetupDetail> ssdlist = new ArrayList<SalesforceSetupDetail>();\r\n\t\t\tList<String> destinationList = new ArrayList<String>(unSelectedList);\r\n\t\t\tdestinationList.removeAll(sourceList);\r\n\t\t\tfor (String string : destinationList) {\r\n\t\t\t\tSalesforceSetupDetail ssd = new SalesforceSetupDetail();\r\n\t\t\t\tssd.setId(Long.parseLong(string));\r\n\t\t\t\tssdlist.add(ssd);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(destinationList);\r\n\r\n\t\t\tif(!ssdlist.isEmpty())\r\n\t\t\t{\r\n\t\t\t\tSFSD.deleteBatchEntity(SalesforceSetupDetail.class, ssdlist);\r\n\t\t\t}\t\r\n\t\t /*End here*/\r\n\t\t \r\n\t\t List<SalesforceSetupDetail> listssd = new ArrayList<SalesforceSetupDetail>();\r\n\t\t for(int i=0;i<jsonArray.length();i++)\r\n\t\t {\r\n\t\t\t \r\n\t\t\t JSONObject jsonObject=jsonArray.getJSONObject(i);\r\n\t\t\t key=jsonObject.getString(\"key\");\r\n\t\t\t selected=jsonObject.getString(\"selected\");\r\n\t\t\t idStringvalue=!jsonObject.get(\"idvalue\").equals(null)? ((Integer)jsonObject.get(\"idvalue\")) : null;\r\n\t\t\t if(idStringvalue!=null)\r\n\t\t\t {\r\n\t\t\t\t id = new Long(idStringvalue.toString());\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\tif(!key.equalsIgnoreCase(selected))/*only go inside for field name*/\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (!oldKey.equalsIgnoreCase(key)) {\r\n\r\n\t\t\t\t\tif (oldKey!=\"\") {/*This will run whenever new object name occurs and store previously build String*/\r\n\t\t\t\t\t\t/*All objects were stored from here except last one*/\r\n\t\t\t\t\t\tresult.deleteCharAt(result.length() - 1);\r\n\t\t\t\t\t\tSalesforceSetupDetail detail = new SalesforceSetupDetail(oldKey, result.toString());\r\n\t\t\t\t\t\tdetail.setId(oldid);\r\n\t\t\t\t\t\ttempid=oldid;\r\n\t\t\t\t\t\tlistssd.add(detail);\r\n\t\t\t\t\t\tresult = new StringBuilder();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\toldid=id;\r\n\t\t\t\toldKey = key;\r\n\t\t\t\tresult.append(selected);\r\n\t\t\t\tresult.append(\",\");\r\n\t\t\t\t\r\n\t\t\t\t/*This will run only for last object*/\r\n\t\t\t\tif (i == jsonArray.length() - 1) {\r\n\t\t\t\t\tresult.deleteCharAt(result.length() - 1);\r\n\t\t\t\t\tSalesforceSetupDetail detail = new SalesforceSetupDetail(oldKey, result.toString());\r\n\t\t\t\t\tif(tempid!=oldid)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdetail.setId(oldid);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlistssd.add(detail);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t }\r\n\t\t salesforceSetupDetail.saveUpdateBatchEntity(SalesforceSetupDetail.class, listssd);\r\n\t\t System.out.println(selecteditem);\r\n\t\t return null;\r\n\t }", "public List<Cliente> consultarClientes();", "@GetMapping(\"/getquestion/{id}\")\n public ResponseEntity<List<Questions>> getQuestion(@PathVariable Long id) {\n\n List<Questions> q = this.userServices.getquetion(id);\n\n if (q.size() <= 0) {\n\n return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n\n }\n\n return ResponseEntity.status(HttpStatus.CREATED).body(q);\n\n }", "@Override\n\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (response.get(\"status\").toString().equals(\"1\")) {\n\t\t\t\t\t\t\tdbService.deleteAllOrders();\n\t\t\t\t\t\t\tdbService.deleteAllDishes();\n\t\t\t\t\t\t\torderList.clear();\n\t\t\t\t\t\t\tcheckList.clear();\n\t\t\t\t\t\t\tJSONArray orderArray = ((JSONObject)response.get(\"body\")).getJSONArray(\"order_list\");\n\t\t\t\t\t\t\tfor (int i = 0; i < orderArray.length(); i++) {\n\t\t\t\t\t\t\t\tisMarked isMarked = new isMarked(0);\n\t\t\t\t\t\t\t\tcheckList.add(isMarked);\n\t\t\t\t\t\t\t\tJSONObject orderObject = orderArray.getJSONObject(i);\n\t\t\t\t\t\t\t\tJSONArray dishArray = orderObject.getJSONArray(\"dish_list\");\n\t\t\t\t\t\t\t\tLog.v(\"arrange\", dishArray.toString());\n\t\t\t\t\t\t\t\tAlinoneOrder order = new AlinoneOrder(orderObject.get(\"order_id\").toString(), orderObject.get(\"phone\").toString(), orderObject.get(\"address\").toString(), orderObject.get(\"merchant_id\").toString(), new Date(),\n\t\t\t\t\t\t\t\t\t\torderObject.getString(\"name\"), orderObject.getBoolean(\"if_pay\"), Float.valueOf(orderObject.get(\"price\").toString()));\n\t\t\t\t\t\t\t\tdbService.saveOrder(order);\n\t\t\t\t\t\t\t\torderList.add(order);\n\t\t\t\t\t\t\t\tdishList.clear();\n\t\t\t\t\t\t\t\tfor (int j = 0; j < dishArray.length(); j++) {\n\t\t\t\t\t\t\t\t\tJSONObject dishObject = dishArray.getJSONObject(j);\n\t\t\t\t\t\t\t\t\tDish dish = new Dish(dishObject.getString(\"name\"), dishObject.getInt(\"count\"), Float.valueOf(dishObject.get(\"price\").toString()), order.getOrderID());\n\t\t\t\t\t\t\t\t\tdishList.add(dish);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdbService.saveDishLists(dishList, order);\n\t\t\t\t\t\t\t\tLog.d(\"adasdasd\", dishList.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"获取已绑定订单成功\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tif (orderList.size() > 0) {\n\t\t\t\t\t\t\t\taddOrderButton.setVisibility(View.GONE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\taddOrderButton.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t}\n\t\t\t\t}", "public List<EjemplarVO> EjemplaresLibro(int id) {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tEjemplarDAO OwlDAO = new EjemplarDAO();\n\t\t\tList<EjemplarVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerEjemplaresBy(\"libro\", \"\", id, mysql);\n\t\t\tif (resultado.isEmpty()) {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn new ArrayList();\n\n\t\t\t} else {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn resultado;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "@Override\n public List<T> findAllById(Iterable<Integer> ids) {\n List<T> entities = new ArrayList<>();\n for (int id : ids) {\n entities\n .add(findById(id).orElseThrow(() -> new EntityNotFoundException(\"ID Not found:\" + id)));\n }\n return entities;\n }", "@DeleteMapping(\"/{id}\")\n @ApiResponse(responseCode = \"204\")\n Mono<ResponseEntity<Void>> deleteById(@PathVariable Integer id) {\n return readListService.deleteReadList(id)\n .map(deleted -> ResponseEntity.ok().<Void>build())\n .defaultIfEmpty(ResponseEntity.notFound().build());\n }", "@Override\n public void success(List<Book> list, Response response) {\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }", "@Override\n @GET\n @Path(\"/{id}\")\n public Author get (@PathParam(\"id\") int id) {\n EntityManager em = PersistenceUtil.getEntityManagerFactory().createEntityManager();\n AuthorDao authorDao = new AuthorDao(em);\n Author a = authorDao.get(Author.class, id);\n a.getWorks().size();//it's needed to initialize session\n em.close();\n return a;\n }", "@Override\r\n\tpublic int responseInsert(List<ResearchResponseVO> list) {\n\t\treturn map.responseInsert(list);\r\n\t}", "@RequestMapping(method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseEntity<List<Producto>> buscarTodo(){\r\n\t\tList<Producto> productos = dao.buscarTodo();\r\n\t\treturn new ResponseEntity<List<Producto>>(productos,HttpStatus.OK);\r\n\t}", "@Override\n\tpublic Optional<Rol> listarId(int id) {\n\t\treturn dao.findById(id);\n\t}", "@RequestMapping(value = \"fetch-message-by-id\", method = RequestMethod.POST)\n public List<Message> fetchMessages(@RequestParam String id)\n {\n SessionService.sessionBuilder(session -> {\n messageList = session.createQuery(\"from Message where sender = '\"+id+\"' or receiver='\"+id+\"' order by id desc\",\n Message.class).list();\n });\n return messageList;\n }", "@PutMapping(\"user/{userId}/list/{listId}\")\n @ResponseBody\n public ResponseEntity<?> editUserList(@PathVariable int userId, @PathVariable Integer listId,\n @RequestBody UserList userList, BindingResult bindingResult) {\n GenericResponse response = new GenericResponse();\n if (bindingResult.hasErrors()) { // invalid json/body check\n response.setStatus(422);\n response.setErrors(bindingResult);\n return ResponseEntity.status(422).body(response);\n }\n if (!userService.existsByUserId(userId)) { // if the userId given wasn't in database at all\n response.setMessage(\"User was not found\");\n response.setStatus(404);\n return ResponseEntity.status(404).body(response);\n }\n if (!userListService.existUserList(userId, listId)) { // User doesn't own a list with the details they provided\n response.setMessage(\"This list does not exist or your account does not have access.\");\n response.setStatus(401);\n return ResponseEntity.status(401).body(response);\n }\n if (userListService.existUserList(userId, userList.getListName()) && !userListService.getUserList(userList.getListName()).getListId().equals(listId)) { // User already has another list with same name, so Error\n\n response.setMessage(\" List name already exists\");\n response.setStatus(422);\n return ResponseEntity.status(422).body(response);\n } else {\n UserList newUserList = userListService.updateUserList(userId, listId, userList.getListName(), userList.getListDescription());\n response.setMessage(\" Successfully edited \" + newUserList.getListName());\n response.setStatus(201);\n return ResponseEntity.status(201).body(response);\n\n }\n }", "public static List<Response> getElementListById(List<String> toAdd, List<Response> newJson){\n List<Response> jsonToAdd = new ArrayList<>();\n for(int i = 0; i < newJson.size(); i++){\n String rId = newJson.get(i).id;\n if(toAdd.contains(rId)){\n jsonToAdd.add(newJson.get(i));\n }\n\n }\n return jsonToAdd;\n }", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "@Test\n public void testGetShoppinglistsIdEntriesAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getShoppinglistsIdEntriesAction(\"{id}\", -1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseShoppingListEntry\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "@GetMapping(\"/all/id\")\n public List<String> getAllId(){\n return productService.getAllId();\n }", "@Test\n public void testDocumentsResponse() {\n DocumentsResponse testResponse = new DocumentsResponse(testDocList);\n checkDocumentsList(testResponse);\n }", "public static ArrayList<Member> findById(String id){\n setConnection();\n \n ArrayList<Member> members = new ArrayList<>();\n \n try{\n Statement statement = con.createStatement();\n \n //Query statement\n String query = \"SELECT * FROM member WHERE id LIKE ?\";\n\n //Create mysql prepared statement\n PreparedStatement preparedStatement = con.prepareStatement(query);\n preparedStatement.setString(1, \"%\"+id+\"%\");\n \n //Execute the prepared statement\n ResultSet result = preparedStatement.executeQuery();\n \n while(result.next()){\n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n members.add(new Member(memberId, name, email, phone, address, dob));\n }\n\n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return members;\n }", "@GetMapping(\"/items/{item_id}\")\n\tpublic ResponseEntity<Item> getItemById(@PathVariable(value=\"item_id\") Long item_id){ \n\t\tItem item = itemDAO.findOne(item_id);\n\t\t\n\t\tif(item == null) {\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\treturn ResponseEntity.ok().body(item);\n\t}", "public ModelChatlist(String id) {\n this.id = id;\n }", "@Override\r\n\tpublic ResultBean getById(String id) throws Exception {\n\t\tResultBean resultBean = new ResultBean();\r\n\t\ttry {\r\n\t\t\tresultBean.setData(codeMasterService.getById(id));\r\n\t\t\tresultBean.setSuccess(true);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tresultBean.setSuccess(false);\r\n\t\t\tresultBean.setMsg(e.getMessage());\r\n\t\t}\r\n\t\treturn resultBean;\r\n\t}", "ResponseEntity execute();", "@GetMapping(\"/list/{listId}\")\n public List<TodoItem> getItem(@PathVariable UUID listId) {\n return itemService.getAllTodoItemsForListId(listId);\n }", "@Override\n public void success(Object object, String msg) {\n if (object != null && object instanceof GetAdList) {\n GetAdList list = (GetAdList) object;\n Log.e(\"lbb\", \"---------3-------0-2-\");\n if (list != null && list.data != null && list.data.size() >= 0) {\n BaseApplication.mInstance.imageIdList3 = list.data;\n adLists = list.data;\n try {\n setTV();\n BaseApplication.mInstance.context.sendBroadcast(new Intent(ACTION_GetAdList3));\n } catch (Exception e) {\n e.printStackTrace();\n }\n //getActivity().sendBroadcast(new Intent(ACTION_GetAdList3));\n SharedPreUtil.putStringValue(getActivity(), ACTION_GetAdList3, new JsonBuild().setModel(object).getJson1());\n Log.e(\"lbb\", \"---------3-----1-2---\");\n }\n }\n }", "List<ProductInfoOutput> findList(List<String> productIdList);", "@Override\r\n\tpublic ShoppingList findShoppingListbyId(int id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn this.shoppingListMapper.findById(id);\r\n\t}", "@GetMapping(\"/id/{id}\")\n public ResponseEntity<ServiceResult> findById(@PathVariable String id) {\n ServiceResult serviceResult = new ServiceResult();\n AdCampaign adCampaign = new AdCampaign();\n logger.info(\"Start controller call get data from ID - \"+id);\n try {\n adCampaign = adCampaignService.findByIdCustom(id);\n serviceResult.setMessage(\"Get Data from ID\"+id+\" Success\");\n serviceResult.setData(adCampaignService.findByIdCustom(id));\n serviceResult.setStatus(ServiceResult.Status.SUCCESS);\n }catch (Exception ex){\n logger.info(\"Error call get data from ID - \"+id);\n serviceResult.setMessage(ex.getMessage());\n }\n logger.info(\"End call get data from ID - \"+id);\n return new ResponseEntity<ServiceResult>(serviceResult, HttpStatus.OK);\n }", "@Override\n\tpublic <T extends BasePojo> List<T> queryByIds(String ids) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void selectList(RestRequest request, RestResponse response) throws Exception {\n\t\t\n\t}", "void getDataSuccess(List<GrilInfo.GrilsEntity> grilsEntities);", "@GET\n @Path(\"/getdetallealquilerfactura_id/{token}/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String getdetallealquilerfactura_id(\n @PathParam(\"token\") String token,\n @PathParam(\"id\")int id) throws Exception{\n \n Respuesta respon = new Respuesta();\n \n CheckToken check = new CheckToken();\n \n \n //instancie el objeto de DB\n DB dbase = new DB(\"itla2\",\"itlajava\",\"12345678@itla\");\n \n if (check.checktocken2(token)==0) \n { \n respon.setId(2);\n respon.setMensaje(\"Lo Sentimos token Desactivado, Comuniquese Con el Administrador, Gracias\");\n return respon.ToJson(respon);\n \n } \n \n //realizo el sql de busqueda\n String sql =\"SELECT f_id,f_id_t_alquiler_factura,f_tipo_factura_t_alquiler_factura,f_id_t_productos,\";\n sql+=\"f_fecha_salida,f_fecha_entrada,f_fecha_real_entrada,f_cantidad,f_precio,f_costo,f_itbis \";\n sql+=\" FROM public.t_detalle_alquiler_factura where f_id = \"+id;\n \n try\n {\n ResultSet rs = dbase.execSelect(sql); \n if(!rs.next())\n {\n \n Respuesta respo = new Respuesta();\n \n respo.setId(0);\n respo.setMensaje(\"No hay registros actualmente en la base de datos\");\n return respo.ToJson(respo);\n \n }\n while (rs.next())\n { \n \n \n detalleAlquilerFactura daf = new detalleAlquilerFactura();\n \n daf.setF_id(rs.getInt(1));\n daf.setF_id_t_alquiler_factura(rs.getInt(2));\n daf.setF_tipo_Factura_t_alquiler_factura(rs.getString(3));\n daf.setF_id_t_Producto(rs.getInt(4));\n daf.setF_fecha_salida(rs.getString(5));\n daf.setF_fecha_entrada(rs.getString(6));\n daf.setF_fecha_entrada_real(rs.getString(6));\n daf.setF_cantidad(rs.getInt(7));\n daf.setF_precio(rs.getInt(7));\n daf.setF_costo(rs.getInt(7));\n daf.setF_itbis(rs.getInt(8));\n \n //asigno elrs a la lista\n \n respon.setId(1);\n respon.setMensaje(respon.ToJson(daf));\n \n \n }\n } \n catch (SQLException e) \n {\n //si falla un error de base de datos\n respon.setId(-1);\n respon.setMensaje(\"Error de la base de datos \"+e.getMessage());\n return respon.ToJson(respon);\n \n }\n dbase.CerrarConexion();\n return respon.ToJson(respon); //retornando el Gson \n\n }", "public void afficherReclamationAdmin(ObservableList<Reclamation> oblist1){\n try {\n PreparedStatement pt1 = c.prepareStatement(\"SELECT id_r, message, etat, date_rec, reponse, prenom, nom FROM reclamation, user where idch=id_u and etat != 'Archivée'\");\n ResultSet rs = pt1.executeQuery();\n while (rs.next()) {\n String fetch = rs.getString(\"prenom\")+\" \"+rs.getString(\"nom\");\n System.out.println(rs.getString(\"reponse\"));\n oblist1.add(new Reclamation(rs.getInt(\"id_r\"), rs.getString(\"message\"), rs.getString(\"etat\"), rs.getString(\"date_rec\"), rs.getString(\"reponse\"), fetch));\n }\n } catch (SQLException ex) {\n Logger.getLogger(ReclamationCRUD.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\r\n public Callable<ResponseObject> findById(@PathVariable(\"id\") Long id) {\r\n return new Callable<ResponseObject>() {\r\n @Override\r\n public ResponseObject call() throws Exception {\r\n return candidateService.findById(id);\r\n }\r\n };\r\n }", "public Items[] findWhereIdEquals(int id) throws ItemsDaoException;", "@RequestMapping(value = \"/staff/\", method = RequestMethod.GET) //Mapping url localhost:8080/api/staff/ dengan method GET\n public ResponseEntity<List<Staff>> listAllStaffs() {\n List<Staff> staffs = staffService.findAllStaffs(); //Invoke method findAllStaffs\n if (staffs.isEmpty()) { //Check kondisi\n return new ResponseEntity<>(staffs, HttpStatus.NOT_FOUND);\n }\n return new ResponseEntity<>(staffs, HttpStatus.OK);\n }", "void notifySuccess(final List<ShotBO> response);" ]
[ "0.63783836", "0.6228269", "0.6194962", "0.617985", "0.6043703", "0.6030332", "0.59166956", "0.59120417", "0.59036994", "0.59034413", "0.5793658", "0.57847893", "0.5761919", "0.57501024", "0.57139874", "0.5711695", "0.57043165", "0.56986576", "0.5698427", "0.56970245", "0.56962776", "0.56869483", "0.56832486", "0.566444", "0.5648857", "0.5621194", "0.5618503", "0.55995667", "0.5591147", "0.5588629", "0.55861336", "0.5583171", "0.55721986", "0.5572058", "0.5554832", "0.555208", "0.55467606", "0.5535105", "0.55247104", "0.5495371", "0.54835296", "0.5482056", "0.5473578", "0.5469267", "0.5457408", "0.5453006", "0.54492813", "0.5446724", "0.5445653", "0.54410124", "0.5435322", "0.5433083", "0.5430518", "0.54262006", "0.5423648", "0.5418954", "0.5404307", "0.53984797", "0.538496", "0.53768444", "0.5364354", "0.53625554", "0.5346203", "0.53444964", "0.53444386", "0.53441155", "0.5343216", "0.53394216", "0.5327937", "0.53243464", "0.532335", "0.5319929", "0.5319851", "0.531684", "0.5316426", "0.5312122", "0.5306273", "0.5297386", "0.5284406", "0.52833176", "0.5282908", "0.52812964", "0.52670586", "0.52654845", "0.5263731", "0.52625895", "0.52621317", "0.52601624", "0.52504706", "0.52485824", "0.5246773", "0.5246613", "0.52443993", "0.5242734", "0.5242655", "0.52412015", "0.52358854", "0.5235536", "0.5233101", "0.5231908", "0.5231142" ]
0.0
-1
String before1 = "715b00000"; String before1 = "27e80000"; String before1 = "715b00000";
public static void main(String[] args) { // String before1 = "27e80000"; // String before1 = "715b00000"; String before1 = "715b00000"; long after1 = Long.parseLong(before1, 16); System.out.println(after1); // String before2 = "28d80000"; // String before2 = "7c0000000"; // String before2 = "71db80000"; String before2 = "720580000"; long after2 = Long.parseLong(before2, 16); System.out.println(after2); long size = (after2 - after1) / 1024 / 1024; System.out.println("Size: " + size + "M"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }", "private static String m12563a(String str, String str2) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 3 + String.valueOf(str2).length());\n sb.append(str);\n sb.append(\"|S|\");\n sb.append(str2);\n return sb.toString();\n }", "private static int m14203b(String str, String str2) {\n String str3 = \"1970/01/01 00:00:00\";\n if (str == null) {\n str = str3;\n }\n if (str2 == null) {\n str2 = str3;\n }\n String str4 = \"[:/\\\\s]\";\n String[] split = str.split(str4);\n String[] split2 = str2.split(str4);\n int max = Math.max(split.length, split2.length);\n int i = 0;\n while (i < max) {\n int parseInt = i < split.length ? Integer.parseInt(split[i]) : 0;\n int parseInt2 = i < split2.length ? Integer.parseInt(split2[i]) : 0;\n if (parseInt < parseInt2) {\n return -1;\n }\n if (parseInt > parseInt2) {\n return 1;\n }\n i++;\n }\n return 0;\n }", "void mo5875b(String str, long j);", "static String m60358a(String str, String str2) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 3 + String.valueOf(str2).length());\n sb.append(str);\n sb.append(\"|S|\");\n sb.append(str2);\n return sb.toString();\n }", "public static void main(String[] args) throws Exception {\n String s;\n// s = \"0000000000000\";\n s = \"000000-123456\";\n// s = \"000000123456\";\n if (s.matches(\"^0+$\")) {\n s = \"0\";\n }else{\n s = s.replaceFirst(\"^0+\",\"\");\n }\n System.out.println(s);\n\n\n// System.out.println(StringUtils.addRight(s,'A',mod));\n// String s = \"ECPay thong bao: Tien dien T11/2015 cua Ma KH PD13000122876, la 389.523VND. Truy cap www.ecpay.vn hoac lien he 1900561230 de biet them chi tiet.\";\n// Pattern pattern = Pattern.compile(\"^(.+)[ ](\\\\d+([.]\\\\d+)*)+VND[.](.+)$\");\n// Matcher matcher = pattern.matcher(s);\n// if(matcher.find()){\n// System.out.println(matcher.group(2));\n// }\n }", "public static String canonicalDecomposeWithSingleQuotation(String paramString)\n/* */ {\n/* 2506 */ char[] arrayOfChar1 = paramString.toCharArray();\n/* 2507 */ int i = 0;\n/* 2508 */ int j = arrayOfChar1.length;\n/* 2509 */ Object localObject1 = new char[arrayOfChar1.length * 3];\n/* 2510 */ int k = 0;\n/* 2511 */ int m = localObject1.length;\n/* */ \n/* 2513 */ char[] arrayOfChar2 = new char[3];\n/* */ \n/* */ \n/* */ \n/* 2517 */ int i2 = 4;\n/* */ \n/* */ \n/* 2520 */ int i6 = (char)indexes[8];\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2527 */ int i1 = 0xFF00 | i2;\n/* 2528 */ int i3 = 0;\n/* 2529 */ int i8 = 0;\n/* 2530 */ long l = 0L;\n/* 2531 */ int i5 = 0;\n/* 2532 */ int i10 = 0;\n/* */ int i9;\n/* 2534 */ int i7 = i9 = -1;\n/* */ for (;;) {\n/* 2536 */ int n = i;\n/* */ \n/* 2538 */ while ((i != j) && (((i5 = arrayOfChar1[i]) < i6) || \n/* */ \n/* 2540 */ (((l = getNorm32(i5)) & i1) == 0L) || ((i5 >= 44032) && (i5 <= 55203))))\n/* */ {\n/* */ \n/* 2543 */ i8 = 0;\n/* 2544 */ i++;\n/* */ }\n/* */ \n/* */ int i4;\n/* 2548 */ if (i != n) {\n/* 2549 */ i4 = i - n;\n/* 2550 */ if (k + i4 <= m) {\n/* 2551 */ System.arraycopy(arrayOfChar1, n, localObject1, k, i4);\n/* */ }\n/* */ \n/* 2554 */ k += i4;\n/* 2555 */ i3 = k;\n/* */ }\n/* */ \n/* */ \n/* 2559 */ if (i == j) {\n/* */ break;\n/* */ }\n/* */ \n/* 2563 */ i++;\n/* */ char c2;\n/* 2565 */ if (isNorm32Regular(l)) {\n/* 2566 */ c2 = '\\000';\n/* 2567 */ i4 = 1;\n/* */ \n/* */ }\n/* 2570 */ else if ((i != j) && \n/* 2571 */ (Character.isLowSurrogate(c2 = arrayOfChar1[i]))) {\n/* 2572 */ i++;\n/* 2573 */ i4 = 2;\n/* 2574 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ } else {\n/* 2576 */ c2 = '\\000';\n/* 2577 */ i4 = 1;\n/* 2578 */ l = 0L;\n/* */ }\n/* */ \n/* */ char[] arrayOfChar3;\n/* */ char c1;\n/* 2583 */ if ((l & i2) == 0L)\n/* */ {\n/* 2585 */ i7 = i9 = (int)(0xFF & l >> 8);\n/* 2586 */ arrayOfChar3 = null;\n/* 2587 */ i10 = -1;\n/* */ } else {\n/* 2589 */ localObject2 = new DecomposeArgs(null);\n/* */ \n/* */ \n/* 2592 */ i10 = decompose(l, i2, (DecomposeArgs)localObject2);\n/* 2593 */ arrayOfChar3 = extraData;\n/* 2594 */ i4 = ((DecomposeArgs)localObject2).length;\n/* 2595 */ i7 = ((DecomposeArgs)localObject2).cc;\n/* 2596 */ i9 = ((DecomposeArgs)localObject2).trailCC;\n/* 2597 */ if (i4 == 1)\n/* */ {\n/* 2599 */ c1 = arrayOfChar3[i10];\n/* 2600 */ c2 = '\\000';\n/* 2601 */ arrayOfChar3 = null;\n/* 2602 */ i10 = -1;\n/* */ }\n/* */ }\n/* */ \n/* 2606 */ if (k + i4 * 3 >= m)\n/* */ {\n/* 2608 */ localObject2 = new char[m * 2];\n/* 2609 */ System.arraycopy(localObject1, 0, localObject2, 0, k);\n/* 2610 */ localObject1 = localObject2;\n/* 2611 */ m = localObject1.length;\n/* */ }\n/* */ \n/* */ \n/* 2615 */ Object localObject2 = k;\n/* 2616 */ if (arrayOfChar3 == null)\n/* */ {\n/* 2618 */ if (needSingleQuotation(c1))\n/* */ {\n/* */ \n/* 2621 */ localObject1[(k++)] = 39;\n/* 2622 */ localObject1[(k++)] = c1;\n/* 2623 */ localObject1[(k++)] = 39;\n/* 2624 */ i9 = 0;\n/* 2625 */ } else if ((i7 != 0) && (i7 < i8))\n/* */ {\n/* */ \n/* 2628 */ k += i4;\n/* 2629 */ i9 = insertOrdered((char[])localObject1, i3, localObject2, k, c1, c2, i7);\n/* */ }\n/* */ else\n/* */ {\n/* 2633 */ localObject1[(k++)] = c1;\n/* 2634 */ if (c2 != 0) {\n/* 2635 */ localObject1[(k++)] = c2;\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 2641 */ else if (needSingleQuotation(arrayOfChar3[i10])) {\n/* 2642 */ localObject1[(k++)] = 39;\n/* 2643 */ localObject1[(k++)] = arrayOfChar3[(i10++)];\n/* 2644 */ localObject1[(k++)] = 39;\n/* 2645 */ i4--;\n/* */ do {\n/* 2647 */ localObject1[(k++)] = arrayOfChar3[(i10++)];\n/* 2648 */ i4--; } while (i4 > 0);\n/* */ }\n/* 2650 */ else if ((i7 != 0) && (i7 < i8)) {\n/* 2651 */ k += i4;\n/* 2652 */ i9 = mergeOrdered((char[])localObject1, i3, localObject2, arrayOfChar3, i10, i10 + i4);\n/* */ }\n/* */ else\n/* */ {\n/* */ do {\n/* 2657 */ localObject1[(k++)] = arrayOfChar3[(i10++)];\n/* 2658 */ i4--; } while (i4 > 0);\n/* */ }\n/* */ \n/* */ \n/* 2662 */ i8 = i9;\n/* 2663 */ if (i8 == 0) {\n/* 2664 */ i3 = k;\n/* */ }\n/* */ }\n/* 2667 */ return new String((char[])localObject1, 0, k);\n/* */ }", "public static int getVeryLongCompare(String a, String b) {\r\n\t\tif(a.equals(b))\r\n\t\t\treturn 0;\r\n\t\telse {\r\n\t\t\tint result = 0;\r\n\t\t\tboolean minus = false;\r\n\t\t\tif(a.charAt(0) == 45 && b.charAt(0) != 45) return -1;\r\n\t\t\tif(a.charAt(0) != 45 && b.charAt(0) == 45) return 1;\r\n\t\t\tif(a.charAt(0) == 45 && b.charAt(0) == 45) { \r\n\t\t\t\tminus = true;\r\n\t\t\t\ta = a.substring(1,a.length());\r\n\t\t\t\tb = b.substring(1,b.length());\r\n\t\t\t}\r\n\t\t\tif (a.charAt(0) == 46) a = \"0\" + a;\r\n\t\t\tif (b.charAt(0) == 46) b = \"0\" + b;\r\n\t\t\twhile(a.charAt(0) == 48 && a.charAt(1) != 46)\r\n\t\t\t\ta = a.substring(1,a.length());\r\n\t\t\twhile(b.charAt(0) == 48 && b.charAt(1) != 46)\r\n\t\t\t\tb = b.substring(1,b.length());\r\n\t\t\tboolean done = false;\r\n\t\t\tint aPointPos = a.indexOf(\".\");\r\n\t\t\tint bPointPos = b.indexOf(\".\");\r\n\t\t\tint aLength = a.length();\r\n\t\t\tint bLength = b.length();\r\n\t\t\tint aIntegerPart = aLength; \r\n\t\t\tint bIntegerPart = bLength;\r\n\t\t\tint aCurDigit = 0;\r\n\t\t\tint bCurDigit = 0;\r\n\t\t\tif (aPointPos > -1) {\r\n\t\t\t\taIntegerPart = aPointPos;\r\n\t\t\t}\r\n\t\t\tif (bPointPos > -1) {\r\n\t\t\t\tbIntegerPart = bPointPos;\r\n\t\t\t}\r\n\t\t\tif (aIntegerPart != bIntegerPart) {\r\n\t\t\t\tdone = true;\r\n\t\t\t\tif(aIntegerPart > bIntegerPart)\tresult = 1;\r\n\t\t\t\telse result = -1;\r\n\t\t\t} else {\r\n\t\t\t\tfor (int i = 0; i < aIntegerPart; i++) {\r\n\t\t\t\t\taCurDigit = a.charAt(i) - 48;\r\n\t\t\t\t\tbCurDigit = b.charAt(i) - 48;\r\n\t\t\t\t\tif(aCurDigit != bCurDigit) {\r\n\t\t\t\t\t\tdone = true;\r\n\t\t\t\t\t\tif(aCurDigit > bCurDigit) { result = 1; }\r\n\t\t\t\t\t\telse { result = -1; }\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tint maxFloatPart = Math.max(aLength - aIntegerPart - 1, bLength - bIntegerPart - 1);\r\n\t\t\t\tif(!done) {\r\n\t\t\t\t\tfor (int i = 0; i < maxFloatPart; i++) {\r\n\t\t\t\t\t\tif(aLength < aIntegerPart + i + 2) {\r\n\t\t\t\t\t\t\taCurDigit = 0;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\taCurDigit = a.charAt(aIntegerPart + i + 1) - 48;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(bLength < bIntegerPart + i + 2) {\r\n\t\t\t\t\t\t\tbCurDigit = 0;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbCurDigit = b.charAt(bIntegerPart + i + 1) - 48;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(aCurDigit != bCurDigit) {\r\n\t\t\t\t\t\t\tdone = true;\r\n\t\t\t\t\t\t\tif(aCurDigit > bCurDigit) { result = 1; }\r\n\t\t\t\t\t\t\telse { result = -1; }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(minus) result = 0 - result;\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}", "private static int indexOfFirstDifferentChar(@NotNull CharSequence s1, int start1, @NotNull String s2, int start2) {\n boolean ignoreCase = !SystemInfo.isFileSystemCaseSensitive;\n int len1 = s1.length();\n int len2 = s2.length();\n while (start1 < len1 && start2 < len2) {\n char c1 = s1.charAt(start1);\n char c2 = s2.charAt(start2);\n if (!StringUtil.charsMatch(c1, c2, ignoreCase)) {\n return start1;\n }\n start1++;\n start2++;\n }\n return start1;\n }", "public void mo9824b(String str) {\n int i;\n int i2;\n try {\n int length = str.length() * 3;\n int i3 = C3670m.m8671i(length);\n int i4 = i3 + length;\n if (i4 > this.f9107e) {\n byte[] bArr = new byte[length];\n int a = C3700r1.m8885a(str, bArr, 0, length);\n mo9814c(a);\n mo9826b(bArr, 0, a);\n return;\n }\n if (i4 > this.f9107e - this.f9108f) {\n mo9827i();\n }\n int i5 = C3670m.m8671i(str.length());\n i = this.f9108f;\n if (i5 == i3) {\n int i6 = i + i5;\n this.f9108f = i6;\n int a2 = C3700r1.m8885a(str, this.f9106d, i6, this.f9107e - i6);\n this.f9108f = i;\n i2 = (a2 - i) - i5;\n mo9820l(i2);\n this.f9108f = a2;\n } else {\n i2 = C3700r1.m8884a((CharSequence) str);\n mo9820l(i2);\n this.f9108f = C3700r1.m8885a(str, this.f9106d, this.f9108f, i2);\n }\n this.f9109g += i2;\n } catch (C3703c e) {\n this.f9109g -= this.f9108f - i;\n this.f9108f = i;\n throw e;\n } catch (ArrayIndexOutOfBoundsException e2) {\n throw new C3674d(e2);\n } catch (C3703c e3) {\n mo9808a(str, e3);\n }\n }", "String einfachesErsetzen(String s) {\n\t\tString newS = s.replace(\"2\", \"0\");\n\t\tif (newS == s) {\n\t\t\tSystem.out.println(\"gleich\");\n\t\t}\n\t\treturn newS;\n\t}", "static int beautifulBinaryString(String b) {\n int index = b.indexOf(\"010\", 0) ;\n int change = 0;\n while (index != -1) {\n change++;\n index = b.indexOf(\"010\", index + 3) ;\n }\n return change;\n }", "private static String zzgr(String string2) {\n int n = string2.length();\n StringBuilder stringBuilder = new StringBuilder(n);\n int n2 = 0;\n while (n2 < n) {\n char c = string2.charAt(n2);\n if (c >= ' ' && c <= '~' && c != '\\\"' && c != '\\'') {\n stringBuilder.append(c);\n } else {\n stringBuilder.append(String.format(\"\\\\u%04x\", c));\n }\n ++n2;\n }\n return stringBuilder.toString();\n }", "void mo1329d(String str, String str2);", "@Test(timeout = 4000)\n public void test38() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = 744.4583836715912;\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n streamTokenizer0.ordinaryChar((-45));\n String string1 = SQLUtil.normalize(\"744.4583836715912\", false);\n assertTrue(string1.equals((Object)string0));\n }", "static StringBuilder xOrBits(StringBuilder original) {\n\n\t\tfor (int k = 0; k < CRCPOLY.length(); k++) {\n\t\t\tif (original.charAt(k) == CRCPOLY.charAt(k)) {\n\t\t\t\toriginal.replace(k, k + 1, \"0\");\n\t\t\t} else\n\t\t\t\toriginal.replace(k, k + 1, \"1\");\n\t\t}\n\n\t\treturn original;\n\t}", "public final synchronized void mo12514a(String str) {\n long j;\n this.f5341c = true;\n if (this.f5340b.size() == 0) {\n j = 0;\n } else {\n j = this.f5340b.get(this.f5340b.size() - 1).f5362c - this.f5340b.get(0).f5362c;\n }\n if (j > 0) {\n long j2 = this.f5340b.get(0).f5362c;\n C1264ee.m6817b(\"(%-4d ms) %s\", Long.valueOf(j), str);\n for (C1290fc next : this.f5340b) {\n long j3 = next.f5362c;\n C1264ee.m6817b(\"(+%-4d) [%2d] %s\", Long.valueOf(j3 - j2), Long.valueOf(next.f5361b), next.f5360a);\n j2 = j3;\n }\n }\n }", "int mo23349e(String str, String str2);", "public static int isBigger(String s1, String s2) {\r\n s1.trim();\r\n s2.trim();\r\n\r\n String nS1 = \"\";\r\n String nS2 = \"\";\r\n\r\n int idx1 = 0;\r\n int idx2 = 0;\r\n\r\n int len1 = s1.length();\r\n int len2 = s2.length();\r\n\r\n while(idx1 < len1 && !Character.isDigit(s1.charAt(idx1))) {\r\n idx1++;\r\n }\r\n\r\n while(idx2 < len2 && !Character.isDigit(s2.charAt(idx2))) {\r\n idx2++;\r\n }\r\n\r\n while(idx1 < len1) {\r\n if(s1.charAt(idx1) == ',') {\r\n idx1++;\r\n continue;\r\n }\r\n nS1 += s1.charAt(idx1);\r\n idx1++;\r\n }\r\n\r\n while(idx2 < len2) {\r\n if(s2.charAt(idx2) == ',') {\r\n idx2++;\r\n continue;\r\n }\r\n nS2 += s2.charAt(idx2);\r\n idx2++;\r\n }\r\n if(nS1.isEmpty()){\r\n nS1 = \"10000000000\";\r\n }\r\n\r\n if(nS2.isEmpty()){\r\n nS2 = \"10000000000\";\r\n }\r\n System.out.println(nS1 + \" \" + nS2);\r\n double d1 = Double.parseDouble(nS1);\r\n double d2 = Double.parseDouble(nS2);\r\n\r\n int val = Double.compare(d1, d2);\r\n if(val > 0)\r\n return 1;\r\n return 0;\r\n }", "private static String m60359b(String str, String str2, String str3) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 4 + String.valueOf(str2).length() + String.valueOf(str3).length());\n sb.append(str);\n sb.append(\"|T|\");\n sb.append(str2);\n sb.append(\"|\");\n sb.append(str3);\n return sb.toString();\n }", "@Test\n public void stringFromLong() {\n assertEquals(\n \"784dd132\",\n JdkHashTools.getStringFromLong(2018365746)\n );\n }", "private static String m12564b(String str, String str2, String str3) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 4 + String.valueOf(str2).length() + String.valueOf(str3).length());\n sb.append(str);\n sb.append(\"|T|\");\n sb.append(str2);\n sb.append(\"|\");\n sb.append(str3);\n return sb.toString();\n }", "void mo64942a(String str, long j, long j2);", "private String m20344d(String str) {\n String valueOf = String.valueOf(Math.abs(str.hashCode() % 100));\n return this.f17416e + File.separator + valueOf;\n }", "private static char[] m3268z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 18);\n }\n return toCharArray;\n }", "protected int stringCompare(String s1,String s2)\r\n\t{\r\n\t\tint shortLength=Math.min(s1.length(), s2.length());\r\n\t\tfor(int i=0;i<shortLength;i++)\r\n\t\t{\r\n\t\t\tif(s1.charAt(i)<s2.charAt(i))\r\n\t\t\t\treturn 0;\r\n\t\t\telse if(s1.charAt(i)>s2.charAt(i))\r\n\t\t\t\treturn 1;\t\r\n\t\t}\r\n\t\t//if the first shrotLenghtTH characters of s1 and s2 are same \r\n\t\tif(s1.length()<=s2.length()) //it's a close situation. \r\n\t\t\treturn 0;\r\n\t\telse \r\n\t\t\treturn 1; \r\n\t\t\r\n\t}", "static StringBuffer convert(String conv_Number){\r\n StringBuffer obj = new StringBuffer(conv_Number);\r\n for (int i=0 ; i<obj.length();i++){\r\n if(obj.charAt(i)<48 || obj.charAt(i)>57){\r\n obj.deleteCharAt(i);\r\n }}\r\n return obj;\r\n//* aurther=====================================================================@Wajaht Masood_003_assign\r\n }", "@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }", "private static String RemoveSpecialCharacter (String s1) {\n String tempResult=\"\";\n for (int i=0;i<s1.length();i++) {\n if (s1.charAt(i)>64 && s1.charAt(i)<=122){\n tempResult=tempResult+s1.charAt(i);\n }\n }\n return tempResult;\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "private static String getValue(String rawValue) {\n\t\trawValue = rawValue.trim();\n\t\tString f1 = \"\";\n\t\tString f2 = \"\";\n\t\tfor (int t = 1; t < rawValue.length() - 1; t++) {\n\t\t\tf1 += rawValue.charAt(t);\n\t\t}\n\t\tfor (int t = 0; t < f1.length() && t < 16; t++) {\n\t\t\tf2 += f1.charAt(t);\n\t\t}\n\t\treturn f2;\n\t}", "public static double prefixString(String s1, String s2) {\n String[] a1 = s1.split(\"\\\\.\");\n String[] a2 = s2.split(\"\\\\.\");\n\n int min = Math.min(a1.length, a2.length);\n int max = Math.max(a1.length, a2.length);\n int cnt = 0;\n\n for (int i = 0; i < min; ++i) {\n if (a1[i].equals(a2[i])) {\n cnt += 1;\n } else {\n break;\n }\n }\n return formatDouble((double) cnt / min);\n }", "public static int numDecodings2(String s) {\r\n\t\tif(s == null || s.length() == 0)\r\n\t\t\treturn 0;\r\n\t\tint len = s.length();\r\n\t\tint prev1 = 1;\r\n\t\tint prev2 = s.charAt(0) == '0' ? 0 : 1;\r\n\t\t\r\n\t\tfor(int i = 2; i <= len; i++) {\r\n\t\t\tint code1 = Integer.valueOf(s.substring(i - 1, i)); // 1 digit\r\n\t\t\tint code2 = Integer.valueOf(s.substring(i - 2, i)); // 2 digit\r\n\t\t\tint temp = prev2;\r\n\t\t\tprev2 = (code1 != 0 ? prev2 : 0) + (code2 <= 26 && code2 > 9 ? prev1 : 0);\r\n\t\t\tprev1 = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn prev2;\r\n\t}", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }", "public static int shiftedDiff(String first, String second){\n\n LOG.info(\"Running shiftedDiff() method\");\n\n if(first.length() != second.length()){\n return -1;\n }\n\n if(first.equals(second)){\n LOG.info(\"Strings are equals\");\n return 0;\n }\n\n for(int i = 0; i<first.length();i++){\n first = first.substring(first.length()-1)+first.substring(0,first.length()-1);\n if(first.equals(second)){\n return i+1;\n }\n }\n return -1;\n }", "int mo23353w(String str, String str2);", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "private static char[] m619z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 20);\n }\n return toCharArray;\n }", "static String GetCheckDigitAndCheckCode(String input) {\n int sum = 0;\n for(int i = 0; i < input.length(); i++) {\n if(i%2 == 0 || i == 0) {\n\n sum += 3 * Character.getNumericValue(input.charAt(i));\n }else {\n sum += Character.getNumericValue(input.charAt(i));\n }\n }\n int subDigit = ((sum/10) + 1 ) * 10;\n int checkDigit = subDigit - sum;\n\n input = input + checkDigit;\n\n\n int digit1 = get9Digits(input.substring(0, 8));\n int digit2 = get9Digits(input.substring(9));\n\n // NOTE - Not able to understand what means by index of 2\n // digit numbers so here am just adding instead of multiplying the 2 9 digits.\n int result = digit1 + digit2 + 207;\n int remainder = result % 103;\n\n StringBuilder sb = new StringBuilder();\n sb.append(checkDigit);\n sb.append(',');\n sb.append(remainder);\n return sb.toString();\n }", "private static char[] m6491z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 108);\n }\n return toCharArray;\n }", "@Test\n public void testLatestCodeExtraction() {\n String normalText = \"§8> §b§o@YourTwitter\";\n String cutText = \"§8> §b§o@YourTwitterAccount\";\n Assert.assertEquals(\"§b§o\", stringUtils.lastFormattingCodesOf(normalText));\n Assert.assertEquals(\"§b§o\", stringUtils.lastFullFormattingCodesOf(cutText));\n }", "int mo23352v(String str, String str2);", "void mo13161c(String str, String str2);", "int mo23347d(String str, String str2);", "public C3244x1 mo12669d(String str) {\n C3244x1 x1Var = new C3244x1();\n String trim = str.trim();\n String str2 = trim;\n for (String replace : f11726b) {\n str2 = str2.replace(replace, \"\");\n }\n if (str2.length() > 120) {\n str2 = str2.substring(0, 119);\n StringBuilder sb = new StringBuilder();\n sb.append(str2.trim());\n sb.append(\"... exceeds the limit of \");\n sb.append(120);\n sb.append(\" characters. Trimmed\");\n x1Var.mo12658a(sb.toString());\n x1Var.mo12656a(520);\n }\n x1Var.mo12657a((Object) str2.trim());\n return x1Var;\n }", "public C3244x1 mo12668c(String str) {\n C3244x1 x1Var = new C3244x1();\n String lowerCase = str.trim().toLowerCase();\n String str2 = lowerCase;\n for (String replace : f11727c) {\n str2 = str2.replace(replace, \"\");\n }\n try {\n if (str2.length() > 512) {\n str2 = str2.substring(0, C0753l.f3451u);\n StringBuilder sb = new StringBuilder();\n sb.append(str2);\n sb.append(\"... exceeds the limit of \");\n sb.append(512);\n sb.append(\" chars. Trimmed\");\n x1Var.mo12658a(sb.toString());\n x1Var.mo12656a(521);\n }\n } catch (Exception unused) {\n }\n x1Var.mo12657a((Object) str2);\n return x1Var;\n }", "void beginNonZeroHex(String s) {\n \t\tboolean findot = false;\n \t\tString mantisse = \"\";\n \t\tint exposant = -1;\n \t\tfor (int i = 0; i < s.length(); i++) {\n \t\t\tswitch(s.charAt(i)) {\n \t\t\tcase 'p':\n \t\t\t\texposantFlottantHex(mantisse, exposant, s.substring(i+1));\n \t\t\t\treturn;\n \t\t\tcase 'P':\n \t\t\t\texposantFlottantHex(mantisse, exposant, s.substring(i+1));\n \t\t\t\treturn;\n \t\t\tcase '.':\n \t\t\t\tfindot = true;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tmantisse += s.charAt(i);\n \t\t\t\tif(!findot) {\n \t\t\t\t\tif(exposant == -1) {\n \t\t\t\t\t\texposant ++;\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\texposant += 4;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t//compareExposantHex(exposant, mantisse); \n \t}", "@Test\n void testParseTestcaseFrom50Specification(){\n String testcase = \"\\r\\n\" +\n \"/ISk5\\\\2MT382-1000\\r\\n\" +\n \"\\r\\n\" +\n \"1-3:0.2.8(50)\\r\\n\" +\n \"0-0:1.0.0(101209113020W)\\r\\n\" +\n \"0-0:96.1.1(4B384547303034303436333935353037)\\r\\n\" +\n \"1-0:1.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:1.8.2(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.2(123456.789*kWh)\\r\\n\" +\n \"0-0:96.14.0(0002)\\r\\n\" +\n \"1-0:1.7.0(01.193*kW)\\r\\n\" +\n \"1-0:2.7.0(00.000*kW)\\r\\n\" +\n \"0-0:96.7.21(00004)\\r\\n\" +\n \"0-0:96.7.9(00002)\\r\\n\" +\n \"1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)\\r\\n\" +\n \"1-0:32.32.0(00002)\\r\\n\" +\n \"1-0:52.32.0(00001)\\r\\n\" +\n \"1-0:72.32.0(00000)\\r\\n\" +\n \"1-0:32.36.0(00000)\\r\\n\" +\n \"1-0:52.36.0(00003)\\r\\n\" +\n \"1-0:72.36.0(00000)\\r\\n\" +\n \"0-0:96.13.0(303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F30313233343536373839\" +\n \"3A3B3C3D3E3F303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F)\\r\\n\" +\n \"1-0:32.7.0(220.1*V)\\r\\n\" +\n \"1-0:52.7.0(220.2*V)\\r\\n\" +\n \"1-0:72.7.0(220.3*V)\\r\\n\" +\n \"1-0:31.7.0(001*A)\\r\\n\" +\n \"1-0:51.7.0(002*A)\\r\\n\" +\n \"1-0:71.7.0(003*A)\\r\\n\" +\n \"1-0:21.7.0(01.111*kW)\\r\\n\" +\n \"1-0:41.7.0(02.222*kW)\\r\\n\" +\n \"1-0:61.7.0(03.333*kW)\\r\\n\" +\n \"1-0:22.7.0(04.444*kW)\\r\\n\" +\n \"1-0:42.7.0(05.555*kW)\\r\\n\" +\n \"1-0:62.7.0(06.666*kW)\\r\\n\" +\n \"0-1:24.1.0(003)\\r\\n\" +\n \"0-1:96.1.0(3232323241424344313233343536373839)\\r\\n\" +\n \"0-1:24.2.1(101209112500W)(12785.123*m3)\\r\\n\" +\n \"!EF2F\\r\\n\" +\n \"\\r\\n\";\n DSMRTelegram dsmrTelegram = ParseDsmrTelegram.parse(testcase);\n\n // CHECKSTYLE.OFF: ParenPad\n assertEquals(\"/ISk5\\\\2MT382-1000\", dsmrTelegram.getRawIdent());\n assertEquals(\"ISK\", dsmrTelegram.getEquipmentBrandTag());\n assertEquals(\"MT382-1000\", dsmrTelegram.getIdent());\n\n assertEquals(\"5.0\", dsmrTelegram.getP1Version());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:30:20+01:00\"), dsmrTelegram.getTimestamp());\n\n assertEquals(\"K8EG004046395507\", dsmrTelegram.getEquipmentId());\n assertEquals(\"0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?\", dsmrTelegram.getMessage());\n\n assertEquals( 2, dsmrTelegram.getElectricityTariffIndicator());\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedNormalTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedNormalTariff(), 0.001);\n assertEquals( 1.193, dsmrTelegram.getElectricityPowerReceived(), 0.001);\n assertEquals( 0.0, dsmrTelegram.getElectricityPowerReturned(), 0.001);\n assertEquals( 4, dsmrTelegram.getPowerFailures());\n assertEquals( 2, dsmrTelegram.getLongPowerFailures());\n\n assertEquals(2, dsmrTelegram.getPowerFailureEventLogSize());\n\n List<PowerFailureEvent> powerFailureEventLog = dsmrTelegram.getPowerFailureEventLog();\n assertEquals(2, powerFailureEventLog.size());\n assertPowerFailureEvent(powerFailureEventLog.get(0), \"2010-12-08T15:20:15+01:00\", \"2010-12-08T15:24:15+01:00\", \"PT4M\");\n assertPowerFailureEvent(powerFailureEventLog.get(1), \"2010-12-08T15:05:03+01:00\", \"2010-12-08T15:10:04+01:00\", \"PT5M1S\");\n\n assertEquals( 2, dsmrTelegram.getVoltageSagsPhaseL1());\n assertEquals( 1, dsmrTelegram.getVoltageSagsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSagsPhaseL3());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL1());\n assertEquals( 3, dsmrTelegram.getVoltageSwellsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL3());\n assertEquals( 220.1, dsmrTelegram.getVoltageL1(), 0.001);\n assertEquals( 220.2, dsmrTelegram.getVoltageL2(), 0.001);\n assertEquals( 220.3, dsmrTelegram.getVoltageL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getCurrentL1(), 0.001);\n assertEquals( 2, dsmrTelegram.getCurrentL2(), 0.001);\n assertEquals( 3, dsmrTelegram.getCurrentL3(), 0.001);\n assertEquals( 1.111, dsmrTelegram.getPowerReceivedL1(), 0.001);\n assertEquals( 2.222, dsmrTelegram.getPowerReceivedL2(), 0.001);\n assertEquals( 3.333, dsmrTelegram.getPowerReceivedL3(), 0.001);\n assertEquals( 4.444, dsmrTelegram.getPowerReturnedL1(), 0.001);\n assertEquals( 5.555, dsmrTelegram.getPowerReturnedL2(), 0.001);\n assertEquals( 6.666, dsmrTelegram.getPowerReturnedL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getMBusEvents().size());\n\n assertEquals( 3, dsmrTelegram.getMBusEvents().get(1).getDeviceType());\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getMBusEvents().get(1).getEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getMBusEvents().get(1).getTimestamp());\n assertEquals( 12785.123, dsmrTelegram.getMBusEvents().get(1).getValue(), 0.001);\n assertEquals( \"m3\", dsmrTelegram.getMBusEvents().get(1).getUnit());\n\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getGasEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getGasTimestamp());\n assertEquals(12785.123, dsmrTelegram.getGasM3(), 0.001);\n\n assertEquals(\"EF2F\", dsmrTelegram.getCrc());\n\n // The CRC of this testcase is invalid.\n // Or better: I have not been able to copy it from the documentation and\n // recreate the \"original\" record for which the provided CRC was calculated.\n // assertTrue(dsmrTelegram.isValidCRC());\n }", "static void method_1458() {\r\n boolean var10000 = true;\r\n char[] var10003 = \"/\\fë%mwH]s,\".toCharArray();\r\n Object var10004 = var10003.length;\r\n Object var4 = true;\r\n char[] var10002 = var10003;\r\n char[] var10001 = (char[])var10004;\r\n int var0 = 0;\r\n\r\n while(true) {\r\n var10003 = var10002;\r\n var10002 = var10001;\r\n var10001 = var10003;\r\n char[] var5 = var10002;\r\n var10002 = var10003;\r\n if(var10003 <= var0) {\r\n field_1436 = (new String((char[])var4)).intern();\r\n String var2 = field_1436;\r\n return;\r\n }\r\n\r\n char var10007 = (char)((Object[])var4)[var0];\r\n short var10009;\r\n switch(var0 % 7) {\r\n case 0:\r\n var10009 = 220;\r\n break;\r\n case 1:\r\n var10009 = 240;\r\n break;\r\n case 2:\r\n var10009 = 4;\r\n break;\r\n case 3:\r\n var10009 = 165;\r\n break;\r\n case 4:\r\n var10009 = 237;\r\n break;\r\n case 5:\r\n var10009 = 247;\r\n break;\r\n default:\r\n var10009 = 200;\r\n }\r\n\r\n ((Object[])var4)[var0] = (char)(var10007 ^ var5 ^ var10009);\r\n ++var0;\r\n }\r\n }", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "private static long m26007a(String str, long j) {\n if (str == null || str.isEmpty()) {\n return C10442z4.m26659a(ByteBuffer.allocate(8).putLong(j).array());\n }\n byte[] bytes = str.getBytes(f26939b);\n ByteBuffer allocate = ByteBuffer.allocate(bytes.length + 8);\n allocate.put(bytes);\n allocate.putLong(j);\n return C10442z4.m26659a(allocate.array());\n }", "private static String removeLeadingZero(String value) //Copied from github\r\n\t{\r\n\t\tString valueWithoutZeros = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tvalueWithoutZeros = value.replaceFirst(\"^0+\", \"\");\r\n\t\t}\r\n\t\tcatch(Exception ee)\r\n\t\t{\r\n\t\t\tvalueWithoutZeros = value;\r\n\t\t}\r\n\t\t\r\n\t\treturn valueWithoutZeros;\r\n\t}", "private static boolean m66062a(String str, int i, int i2, byte[] bArr, int i3) {\n int i4 = i3;\n while (i < i2) {\n if (i4 == bArr.length) {\n return false;\n }\n if (i4 != i3) {\n if (str.charAt(i) != '.') {\n return false;\n }\n i++;\n }\n int i5 = i;\n int i6 = 0;\n while (i5 < i2) {\n char charAt = str.charAt(i5);\n if (charAt < '0' || charAt > '9') {\n break;\n } else if (i6 == 0 && i != i5) {\n return false;\n } else {\n i6 = ((i6 * 10) + charAt) - 48;\n if (i6 > 255) {\n return false;\n }\n i5++;\n }\n }\n if (i5 - i == 0) {\n return false;\n }\n int i7 = i4 + 1;\n bArr[i4] = (byte) i6;\n i4 = i7;\n i = i5;\n }\n if (i4 != i3 + 4) {\n return false;\n }\n return true;\n }", "public int compare(String str1, String str2) {\r\n int num1 = Integer.parseInt(str1.substring(4, str1.length()));\r\n int num2 = Integer.parseInt(str2.substring(4, str2.length()));\r\n\r\n return num1 - num2;\r\n\r\n }", "public int fromBeginning(String str) {\n if(str == null || str.length() == 0)\n return 0;\n char[] ca = str.toCharArray();\n int res = 0, pre = 0;\n for(char c : ca) {\n res += map.get(c);\n if(pre != 0 && pre < map.get(c))\n res -= 2 * pre;\n pre = map.get(c);\n }\n return res;\n }", "int mo54403a(String str, String str2);", "public static void main(String[] args) throws Exception {\n String data=\"=1&sta=dc4f223eb429&shop=1&token=123232jd&r=8134ad506c4e&id=12a2c334&type=check&data=t572007166r0e0c0h31624hb18fe34010150aps1800api5si10em2pl1024pll3072tag20 sp1\";\r\n// String data=\"=1&sta=dc4f223eb429&shop=1&token=123232jd&r=8134ad506c4e&id=12a2c334&type=configa&data=ch1cas5cat5sc5t30603970r0e0c0h47368cst36000iga1st1\";\r\n// System.out.println((int)'&');\r\n// System.out.println(data);\r\n// data = \"c3RhPTY4YzYzYWUwZGZlZiZzaG9wPTEmdG9rZW49MTIzMjMyamQmcj05NGQ5YjNhOWMyNmYmaWQ9MmRlY2ZkY2UmdHlwZT1wcm9iZWEmZGF0YT0lMDE5NGQ5YjNhOWMyNmYmJTAxJTAxMDAxN2M0Y2QwMWNmeCUwMTc4NjI1NmM2NzI1YkwlMDE1Yzk2OWQ3MWVmNjNRJTAxOTRkOWIzYTljMjZmJTIxJTAxN2NjNzA5N2Y0MWFmeCUwMSUwMWRjODVkZWQxNjE3ZjklMDE1NGRjMWQ3MmE0NDB4JTAxNzg2MjU2YzY3MjViRSUwMTVjOTY5ZDcxZWY2M0olMDE5NGQ5YjNhOWMyNmYlMUUlMDFlNGE3YTA5M2UzOTJ4JTAxNGMzNDg4OTQ5YjY2eCUwMTNjNDZkODMwZTAyMDYlMDElMDE2MGYxODk2ZjJmY2JDJTAxOTRkOWIzYTljMjZmKyUwMTkwYzM1ZjE3NWQ2MXglMDE0YzM0ODg5NDliNjZ4JTAxZTRhN2M1YzhjYzA4JTNBJTAxJTAxZjBiNDI5ZDI1MTFjWCUwMTVjOTY5ZDcxZWY2MyU1QyUwMWQ0NmE2YTE1NWJmMXglMDE5NGQ5YjNhOWMyNmYqJTAxPQ==\";\r\n// data = \"c3RhPTY4YzYzYWUwZGZlZiZzaG9wPTEmdG9rZW49MTIzMjMyamQmcj05NGQ5YjNhOWMyNmYmaWQ9NWY0NTQzZWMmdHlwZT1wcm9iZWEmZGF0YT0lMDE2OGM2M2FlMGRmZWYmJTAxMDhmNjljMDYzNDdmRSUwMTIwM2NhZThlMjZlY0clMDE9\";\r\n System.out.println(WIFIReportVO.buildWIFIReportVO(data));\r\n System.out.println(WIFIReportVO.buildWIFIReportVO(new String(Base64Utils.decodeFromString(data))));\r\n\r\n// HttpUtils.postJSON(\"http://127.0.0.1:8080/soundtooth/callout\" , \"{\\\"user_name\\\":\\\"用户名\\\",\\\"iSeatNo\\\":\\\"1001001\\\",\\\"callId\\\":\\\"210ab0fdfca1439ba268a6bf8266305c\\\",\\\"telA\\\":\\\"18133331269\\\",\\\"telB\\\":\\\"181****1200\\\",\\\"telX\\\":\\\"17100445588\\\",\\\"telG\\\":\\\"07556882659\\\",\\\"duration\\\":\\\"19\\\",\\\"userData\\\":\\\"ef7ede6f36c84f1d45333863c38ff14c\\\"}\");\r\n//// HttpUtils.postJSON(\"http://127.0.0.1:8080/soundtooth/callout\" , \"{\\\"user_name\\\":\\\"用户名\\\",\\\"iSeatNo\\\":\\\"1001001\\\",\\\"callId\\\":\\\"210ab0fdfca1439ba268a6bf8266305c\\\",\\\"telA\\\":\\\"18133331269\\\",\\\"telB\\\":\\\"181****1200\\\",\\\"telX\\\":\\\"17100445588\\\",\\\"telG\\\":\\\"07556882659\\\",\\\"duration\\\":\\\"19\\\",\\\"userData\\\":\\\"ef7ede6f36c84f1d45333863c38ff14c\\\"}\");\r\n// System.out.println(HttpUtils.postJSON(\"http://s.slstdt.com/collector/collect\" , \"\"));\r\n// System.out.println(HttpUtils.postJSON(\"http://s.slstdt.com/soundtooth/callout\" , \"\"));\r\n\r\n\r\n }", "public void miner(int diff) {\r\n\r\n String a1;\r\n a1 = new String(new char[diff]).replace('\\0', '0');\r\n while (!bhash.substring(0, diff).equals(a1)) {\r\n bonce = bonce + 1;\r\n bhash = calchash();\r\n //System.out.println(bhash);\r\n\r\n }\r\n String a = \"Mining complete of block:\" + bhash;\r\n System.out.println(a);\r\n\r\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1225, 754, 1225);\n javaCharStream0.backup(1);\n javaCharStream0.adjustBeginLineColumn(1, (-1));\n int int0 = javaCharStream0.getColumn();\n assertEquals(1223, javaCharStream0.bufpos);\n assertEquals((-1), int0);\n }", "private static String m2380a(byte[] bArr, byte[] bArr2) {\n byte[] bArr3 = new byte[(((bArr.length + 2) / 3) * 4)];\n int length = bArr.length - (bArr.length % 3);\n int i = 0;\n for (int i2 = 0; i2 < length; i2 += 3) {\n int i3 = i + 1;\n bArr3[i] = bArr2[(bArr[i2] & 255) >> 2];\n int i4 = i3 + 1;\n int i5 = i2 + 1;\n bArr3[i3] = bArr2[((bArr[i2] & 3) << 4) | ((bArr[i5] & 255) >> 4)];\n int i6 = i4 + 1;\n int i7 = i2 + 2;\n bArr3[i4] = bArr2[((bArr[i5] & 15) << 2) | ((bArr[i7] & 255) >> 6)];\n i = i6 + 1;\n bArr3[i6] = bArr2[bArr[i7] & 63];\n }\n switch (bArr.length % 3) {\n case 1:\n int i8 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i9 = i8 + 1;\n bArr3[i8] = bArr2[(bArr[length] & 3) << 4];\n int i10 = i9 + 1;\n bArr3[i9] = 61;\n bArr3[i10] = 61;\n break;\n case 2:\n int i11 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i12 = i11 + 1;\n int i13 = length + 1;\n bArr3[i11] = bArr2[((bArr[length] & 3) << 4) | ((bArr[i13] & 255) >> 4)];\n int i14 = i12 + 1;\n bArr3[i12] = bArr2[(bArr[i13] & 15) << 2];\n bArr3[i14] = 61;\n break;\n }\n try {\n return new String(bArr3, \"US-ASCII\");\n } catch (UnsupportedEncodingException e) {\n throw new AssertionError(e);\n }\n }", "public String mo38887b() {\n String trim = this.f30736g0.getText().toString().trim();\n if (trim.length() < 2) {\n return \"\";\n }\n return trim.substring(0, 2);\n }", "@Test\n public void testSeparateNumber131() { // FlairImage: 131\n java.util.concurrent.atomic.AtomicBoolean totuus = new java.util.concurrent.atomic.AtomicBoolean(false); \n StringBuilder testi = new StringBuilder(); \n assertEquals(\"From: FlairImage line: 135\", 0, separateNumber(testi,'-',totuus)); \n totuus.set(false); \n testi = new StringBuilder(\"123-asdasd\"); \n assertEquals(\"From: FlairImage line: 139\", 123, separateNumber(testi,'-',totuus)); \n assertEquals(\"From: FlairImage line: 140\", \"asdasd\", testi.toString()); \n assertEquals(\"From: FlairImage line: 141\", true, totuus.get()); \n totuus.set(false); \n testi = new StringBuilder(\"123-asdasd-muumi\"); \n assertEquals(\"From: FlairImage line: 145\", 123, separateNumber(testi,'-',totuus)); \n assertEquals(\"From: FlairImage line: 146\", \"asdasd-muumi\", testi.toString()); \n assertEquals(\"From: FlairImage line: 147\", true, totuus.get()); \n totuus.set(false); \n testi = new StringBuilder(\"asd-asdasd-muumi\"); \n assertEquals(\"From: FlairImage line: 151\", 0, separateNumber(testi,'-',totuus)); \n assertEquals(\"From: FlairImage line: 152\", \"asd-asdasd-muumi\", testi.toString()); \n assertEquals(\"From: FlairImage line: 153\", false, totuus.get()); \n totuus.set(false); \n testi = new StringBuilder(\"asd-asdasd-123\"); \n assertEquals(\"From: FlairImage line: 157\", 123, separateNumber(testi,'-',totuus)); \n assertEquals(\"From: FlairImage line: 158\", \"asd-asdasd-123\", testi.toString()); \n assertEquals(\"From: FlairImage line: 159\", false, totuus.get()); \n totuus.set(false); \n testi = new StringBuilder(\"asd-123-muumi\"); \n assertEquals(\"From: FlairImage line: 163\", 0, separateNumber(testi,'-',totuus)); \n assertEquals(\"From: FlairImage line: 164\", \"asd-123-muumi\", testi.toString()); \n assertEquals(\"From: FlairImage line: 165\", false, totuus.get()); \n }", "private static char[] m7947z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 16);\n }\n return toCharArray;\n }", "private static long rl(long a, String b) {\r\n long res = a;\r\n for (int c = 0; c < b.length() - 2; c += 3) {\r\n char dChar = b.charAt(c + 2);\r\n long dInt = dChar >= 'a' ? (int) dChar - 87 : Long.valueOf(String.valueOf(dChar));\r\n char char2 = b.charAt(c + 1);\r\n long dInt2 = char2 == '+' ? res >>> dInt : res << dInt;\r\n res = b.charAt(c) == '+' ? res + dInt2 & 4294967295l : res ^ dInt2;\r\n }\r\n return res;\r\n }", "@Test\n public void decodeStringDelta()\n {\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 1.0);\n assertEquals(3.0, encoder.decode(\"0011\"), 0.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 2.0);\n assertEquals(0.0, encoder.decode(\"0001\"), 2.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 0.5);\n assertEquals(3.0, encoder.decode(\"00110\"), 0.0);\n }\n }", "public static void main(String[] args) {\n\t\tString str2=\"the string sunrises\";\n\t\tString str=\"the string sunriseS\";\n\t\tString date=\"10-10-1990\";\n\t\tString h=\"hello\";\n\t\tString o=\"world\";\n\t\tint hi = 80;\n\t\tint j = 70;\n\t\tStringBuffer buff=new StringBuffer(str);\nbuff.reverse();\n//System.out.println(str.indexOf('s'));\n//System.out.println(str.indexOf('s',str.indexOf('s')+1));\n//\n//System.out.println(str.indexOf('s',str.indexOf('s',str.indexOf('s')+1)+1));\n\n\n//System.out.println(str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s')+1)+1)+1));\nSystem.out.println(str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s')+1)+1)+1)+1)));\n\n//System.out.println(str.charAt(1));\n//System.out.println(str.length());\n\nSystem.out.println(str.equals(str2));\nSystem.out.println(str.equalsIgnoreCase(str2));\nSystem.out.println(str.substring(0,2));\nSystem.out.println(str.trim());\nSystem.out.println(str.replace(\"s\",\"fer\"));\nSystem.out.println(date.replace(\"-\",\"/\"));\nSystem.out.println(\"$$$$\");\n String val[]= str.split(\" \");\n for(int i=0;i<val.length;i++)\n {\n\t System.out.println(val[i]); \n\t \n }\n \n System.out.println(buff);\n System.out.println(str2.concat(str));\n System.out.println(h+(hi+j));\n \n\t}", "private static byte[] m24635a(Context context, String str) {\n String f = C6014b.m23956f();\n String string = Secure.getString(context.getContentResolver(), \"android_id\");\n String substring = str.substring(0, Math.min(8, str.length() - 1));\n StringBuilder sb = new StringBuilder();\n sb.append(substring);\n sb.append(f.substring(0, Math.min(8, f.length() - 1)));\n String sb2 = sb.toString();\n StringBuilder sb3 = new StringBuilder();\n sb3.append(sb2);\n sb3.append(string.substring(0, Math.min(8, string.length() - 1)));\n String sb4 = sb3.toString();\n if (sb4.length() != 24) {\n StringBuilder sb5 = new StringBuilder();\n sb5.append(sb4);\n sb5.append(str.substring(8, 24 - sb4.length()));\n sb4 = sb5.toString();\n }\n return sb4.getBytes();\n }", "static void m14931d(String str, String str2) {\n if (m14929b() > C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "C12000e mo41087c(String str);", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.adjustBeginLineColumn((-1), 4093);\n assertEquals(4093, javaCharStream0.getBeginColumn());\n }", "public final void zzg(String string2) {\n int n10 = this.position;\n try {\n int n11 = string2.length() * 3;\n n11 = zzbn.zzt(n11);\n int n12 = string2.length();\n n12 = zzbn.zzt(n12);\n if (n12 == n11) {\n this.position = n11 = n10 + n12;\n byte[] byArray = this.buffer;\n int n13 = ((zzbn)this).zzag();\n n11 = zzff.zza(string2, byArray, n11, n13);\n this.position = n10;\n int n14 = n11 - n10 - n12;\n ((zzbn)this).zzo(n14);\n this.position = n11;\n return;\n }\n n11 = zzff.zza(string2);\n ((zzbn)this).zzo(n11);\n byte[] byArray = this.buffer;\n n12 = this.position;\n int n15 = ((zzbn)this).zzag();\n this.position = n11 = zzff.zza(string2, byArray, n12, n15);\n return;\n }\n catch (IndexOutOfBoundsException indexOutOfBoundsException) {\n zzbn$zzc zzbn$zzc = new zzbn$zzc(indexOutOfBoundsException);\n throw zzbn$zzc;\n }\n catch (zzfi zzfi2) {\n this.position = n10;\n this.zza(string2, zzfi2);\n return;\n }\n }", "public static String m3184a(String str) {\n if (str == null) {\n return null;\n }\n try {\n MessageDigest.getInstance(\"SHA-256\").update(str.getBytes(\"UTF-8\"));\n str = String.format(Locale.US, \"%064x\", new Object[]{new BigInteger(1, r1.digest())});\n } catch (Exception e) {\n C0784a.m3252a(C0766d.class, e);\n str = null;\n }\n return str;\n }", "public static void main(String[] args) {\n\t\tString s1 = \"234\";\n\t\tint fd = 0;\n\t\tint fd1 = 0;\n\t\tint fd2 = 1;\n\t\tfor (int df = s1.length() - 1; df >= 0; df--) {\n\t\t\tString firstLetter7 = String.valueOf(s1.charAt(df));\n\t\t\tif (firstLetter7.equals(\"0\"))\n\t\t\t\tfd1 = 0;\n\t\t\telse if (firstLetter7.equals(\"1\"))\n\t\t\t\tfd1 = 1;\n\t\t\telse if (firstLetter7.equals(\"2\"))\n\t\t\t\tfd1 = 2;\n\t\t\telse if (firstLetter7.equals(\"3\"))\n\t\t\t\tfd1 = 3;\n\t\t\telse if (firstLetter7.equals(\"4\"))\n\t\t\t\tfd1 = 4;\n\t\t\telse if (firstLetter7.equals(\"5\"))\n\t\t\t\tfd1 = 5;\n\t\t\telse if (firstLetter7.equals(\"6\"))\n\t\t\t\tfd1 = 6;\n\t\t\telse if (firstLetter7.equals(\"7\"))\n\t\t\t\tfd1 = 7;\n\t\t\telse if (firstLetter7.equals(\"8\"))\n\t\t\t\tfd1 = 8;\n\t\t\telse if (firstLetter7.equals(\"9\"))\n\t\t\t\tfd1 = 9;\n\t\t\tfd = fd + fd2 * fd1;\n\t\t\tfd2 = fd2 * 10;\n\t\t}\n\t\tint a = fd - 1;\n\t\tfor (int i = a; i > 1; i--) {\n\t\t\tint qw = 0;\n\t\t\tint qw1 = i;\n\t\t\tString s2 = \"\";\n\t\t\twhile (qw1 > 0) {\n\t\t\t\tqw = qw1 % 10;\n\t\t\t\tif (qw == 0)\n\t\t\t\t\ts2 = \"0\" + s2;\n\t\t\t\telse if (qw == 1)\n\t\t\t\t\ts2 = \"1\" + s2;\n\t\t\t\telse if (qw == 2)\n\t\t\t\t\ts2 = \"2\" + s2;\n\t\t\t\telse if (qw == 3)\n\t\t\t\t\ts2 = \"3\" + s2;\n\t\t\t\telse if (qw == 4)\n\t\t\t\t\ts2 = \"4\" + s2;\n\t\t\t\telse if (qw == 5)\n\t\t\t\t\ts2 = \"5\" + s2;\n\t\t\t\telse if (qw == 6)\n\t\t\t\t\ts2 = \"6\" + s2;\n\t\t\t\telse if (qw == 7)\n\t\t\t\t\ts2 = \"7\" + s2;\n\t\t\t\telse if (qw == 8)\n\t\t\t\t\ts2 = \"8\" + s2;\n\t\t\t\telse if (qw == 9)\n\t\t\t\t\ts2 = \"9\" + s2;\n\t\t\t\tqw1 = qw1 / 10;\n\t\t\t}\n\t\t\tSystem.out.println(s1);\n\t\t\tSystem.out.println(s2);\n\t\t\tExp11 ur = new Exp11();\n\t\t\ts1 = ur.emp11(s1, s2);\n\t\t}\n\t\tSystem.out.println(s1);\n\t}", "private static int m14199a(String str, String str2) {\n String str3 = \"0\";\n if (str == null) {\n str = str3;\n }\n if (str2 == null) {\n str2 = str3;\n }\n String str4 = \"\\\\.\";\n String[] split = str.split(str4);\n String[] split2 = str2.split(str4);\n int max = Math.max(split.length, split2.length);\n int i = 0;\n while (i < max) {\n int parseInt = i < split.length ? Integer.parseInt(split[i]) : 0;\n int parseInt2 = i < split2.length ? Integer.parseInt(split2[i]) : 0;\n if (parseInt < parseInt2) {\n return -1;\n }\n if (parseInt > parseInt2) {\n return 1;\n }\n i++;\n }\n return 0;\n }", "private static String m14296fm(String str) {\n return toHexString(m14295fl(str), \"\");\n }", "static void method_1458() {\r\n boolean var10000 = true;\r\n char[] var10003 = \"Â\u0002;\u0017sIȰ{T\u001e\".toCharArray();\r\n Object var10004 = var10003.length;\r\n Object var4 = true;\r\n char[] var10002 = var10003;\r\n char[] var10001 = (char[])var10004;\r\n int var0 = 0;\r\n\r\n while(true) {\r\n var10003 = var10002;\r\n var10002 = var10001;\r\n var10001 = var10003;\r\n char[] var5 = var10002;\r\n var10002 = var10003;\r\n if(var10003 <= var0) {\r\n field_1791 = (new String((char[])var4)).intern();\r\n String var2 = field_1791;\r\n return;\r\n }\r\n\r\n char var10007 = (char)((Object[])var4)[var0];\r\n short var10009;\r\n switch(var0 % 7) {\r\n case 0:\r\n var10009 = 220;\r\n break;\r\n case 1:\r\n var10009 = 19;\r\n break;\r\n case 2:\r\n var10009 = 57;\r\n break;\r\n case 3:\r\n var10009 = 122;\r\n break;\r\n case 4:\r\n var10009 = 30;\r\n break;\r\n case 5:\r\n var10009 = 36;\r\n break;\r\n default:\r\n var10009 = 165;\r\n }\r\n\r\n ((Object[])var4)[var0] = (char)(var10007 ^ var5 ^ var10009);\r\n ++var0;\r\n }\r\n }", "int difference(String str1,String str2){\n\t\ttry {\n\t\t\treturn mSoundex.difference(str1, str2);\n\t\t} catch (EncoderException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn 0;\n\t}", "private String intChecker(String s) {\n\t\tString newS = \"\";\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif(s.charAt(i) > 47 && s.charAt(i) < 58) {\n\t\t\t\tnewS += s.charAt(i);\n\t\t\t}\n\t\t}\n\t\treturn newS;\n\t}", "static void m14935e(String str, String str2) {\n if (m14929b() >= C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "void mo1334i(String str, String str2);", "public static String getCheckNumber(String paramString){\n int i =paramString.substring(0, 1).getBytes()[0];\n for(int j=1;;j++){\n if(j>=paramString.length())\n return intToHex(Integer.valueOf(i));\n i=(byte)(i^paramString.substring(j, j+1).getBytes()[0]);\n\n }\n }", "String mo3176a(String str, String str2);", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.GetSuffix(416);\n assertEquals(1, javaCharStream0.getBeginColumn());\n }", "public String mo16915b(String str, String str2) {\n try {\n return this.f9119b.getString(str, str2);\n } catch (Throwable unused) {\n return str2;\n }\n }", "private static int getCombiningIndexFromStarter(char paramChar1, char paramChar2)\n/* */ {\n/* 1213 */ long l = getNorm32(paramChar1);\n/* 1214 */ if (paramChar2 != 0) {\n/* 1215 */ l = getNorm32FromSurrogatePair(l, paramChar2);\n/* */ }\n/* 1217 */ return extraData[(getExtraDataIndex(l) - 1)];\n/* */ }", "public boolean isLessThan(StringNum a, StringNum b) {\n\t\tif(a.getNumber().length() > b.getNumber().length()) {\n\t\t\treturn false;\n\t\t}\n\t\telse if(a.getNumber().length() < b.getNumber().length()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i = 0; i < a.getNumber().length(); i++) {\n\t\t\t\tif(Character.getNumericValue(a.getNumber().charAt(i)) < Character.getNumericValue(b.getNumber().charAt(i))) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse if(Character.getNumericValue(a.getNumber().charAt(i)) > Character.getNumericValue(b.getNumber().charAt(i))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void stringFromBytesArray() {\n byte[] input = new byte[]{\n 12,\n -68,\n 102,\n 17,\n -11,\n 84,\n 11,\n -48,\n -128,\n -102,\n 56,\n -115,\n -55,\n 90,\n 97,\n 91\n };\n\n assertEquals(\n \"0cbc6611f5540bd0809a388dc95a615b\",\n JdkHashTools.getStringFromByteArray(input)\n );\n }", "public static final String m17015P(String str, String str2) {\n AppMethodBeat.m2504i(114129);\n if (str.contains(VideoMaterialUtil.FRAMES_ID_SEPARATOR_3D) || str.length() <= 0) {\n String[] split = str.split(VideoMaterialUtil.FRAMES_ID_SEPARATOR_3D);\n if (split[0] == null || split[0].length() <= 0) {\n AppMethodBeat.m2505o(114129);\n return str2;\n }\n str = split[0];\n AppMethodBeat.m2505o(114129);\n return str;\n }\n AppMethodBeat.m2505o(114129);\n return str;\n }", "private static final int m40100b(String str) {\n int length = str.length();\n int i = 0;\n while (true) {\n if (i >= length) {\n i = -1;\n break;\n } else if (!C12798a.m40012a(str.charAt(i))) {\n break;\n } else {\n i++;\n }\n }\n return i == -1 ? str.length() : i;\n }", "public static String blowup(String str) {\n\t\tString result = \"\";\n\t\tfor(int i = 0; i < str.length() - 1; i++){\n\t\t\tif(Character.isDigit(str.charAt(i))){\n\t\t\t\tresult += miniBlow(str.charAt(i + 1), (str.charAt(i) - '0'));\n\t\t\t} else {\n\t\t\t\tresult += str.charAt(i);\n\t\t\t}\n\t\t}\n\t\tif(str.length() != 0 && !Character.isDigit(str.charAt(str.length() - 1))) {\n\t\t\tresult += str.charAt(str.length() - 1);\n\t\t}\n\t\treturn result;\n\t}", "private static C10387b m26008a(String str) {\n String str2;\n int i;\n if (str == null) {\n return null;\n }\n int indexOf = str.indexOf(44);\n if (indexOf >= 0) {\n str2 = str.substring(0, indexOf);\n i = indexOf + 1;\n } else {\n str2 = \"\";\n i = 0;\n }\n int indexOf2 = str.indexOf(47, i);\n String str3 = \"LogSamplerImpl\";\n if (indexOf2 <= 0) {\n String str4 = \"Failed to parse the rule: \";\n String valueOf = String.valueOf(str);\n Log.e(str3, valueOf.length() != 0 ? str4.concat(valueOf) : new String(str4));\n return null;\n }\n try {\n long parseLong = Long.parseLong(str.substring(i, indexOf2));\n long parseLong2 = Long.parseLong(str.substring(indexOf2 + 1));\n if (parseLong < 0 || parseLong2 < 0) {\n StringBuilder sb = new StringBuilder(72);\n sb.append(\"negative values not supported: \");\n sb.append(parseLong);\n sb.append(Constants.URL_PATH_DELIMITER);\n sb.append(parseLong2);\n Log.e(str3, sb.toString());\n return null;\n }\n C10388a h = C10387b.m26478h();\n h.mo28112a(str2);\n h.mo28111a(parseLong);\n h.mo28113b(parseLong2);\n return (C10387b) h.mo27817c();\n } catch (NumberFormatException e) {\n String str5 = \"parseLong() failed while parsing: \";\n String valueOf2 = String.valueOf(str);\n Log.e(str3, valueOf2.length() != 0 ? str5.concat(valueOf2) : new String(str5), e);\n return null;\n }\n }", "@Test\n public void testFromLong() throws Exception {\n assertEquals(\"1 a\", undertest2.fromLong(0));\n // 0b100 => 0b10->1->\"2\", 0b0->0->\"a\"\n assertEquals(\"2 a\", undertest2.fromLong(1));\n // 0b010 => 0b01->2->\"3\", 0b0->0->\"a\"\n assertEquals(\"3 a\", undertest2.fromLong(2));\n // 0b110 => 0b11->3->\"4\", 0b0->0->\"a\"\n assertEquals(\"4 a\", undertest2.fromLong(3));\n // 0b001 => 0b00->0->\"1\", 0b1->1->\"b\"\n assertEquals(\"1 b\", undertest2.fromLong(4));\n // 0b101 => 0b10->1->\"2\", 0b1->1->\"b\"\n assertEquals(\"2 b\", undertest2.fromLong(5));\n // 0b011 => 0b01->2->\"3\", 0b1->1->\"b\"\n assertEquals(\"3 b\", undertest2.fromLong(6));\n // 0b111 => 0b11->3->\"4\", 0b1->1->\"b\"\n assertEquals(\"4 b\", undertest2.fromLong(7));\n // 255l->0b11111111->0b111 => 0b11->3->\"4\", 0b1->1->\"b\"\n assertEquals(\"4 b\", undertest2.fromLong(255));\n }", "private static int findNextStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1576 */ int j = 0xFF00 | paramInt3;\n/* */ \n/* 1578 */ DecomposeArgs localDecomposeArgs = new DecomposeArgs(null);\n/* */ \n/* */ \n/* 1581 */ while (paramInt1 != paramInt2)\n/* */ {\n/* */ \n/* 1584 */ char c1 = paramArrayOfChar[paramInt1];\n/* 1585 */ if (c1 < paramChar) {\n/* */ break;\n/* */ }\n/* */ \n/* 1589 */ long l = getNorm32(c1);\n/* 1590 */ if ((l & j) == 0L) {\n/* */ break;\n/* */ }\n/* */ char c2;\n/* 1594 */ if (isNorm32LeadSurrogate(l))\n/* */ {\n/* 1596 */ if ((paramInt1 + 1 == paramInt2) || \n/* 1597 */ (!UTF16.isTrailSurrogate(c2 = paramArrayOfChar[(paramInt1 + 1)]))) {\n/* */ break;\n/* */ }\n/* */ \n/* 1601 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ \n/* 1603 */ if ((l & j) == 0L) {\n/* */ break;\n/* */ }\n/* */ } else {\n/* 1607 */ c2 = '\\000';\n/* */ }\n/* */ \n/* */ \n/* 1611 */ if ((l & paramInt4) != 0L)\n/* */ {\n/* */ \n/* 1614 */ int i = decompose(l, paramInt4, localDecomposeArgs);\n/* */ \n/* */ \n/* */ \n/* 1618 */ if ((localDecomposeArgs.cc == 0) && ((getNorm32(extraData, i, paramInt3) & paramInt3) == 0L)) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* 1623 */ paramInt1 += (c2 == 0 ? 1 : 2);\n/* */ }\n/* */ \n/* 1626 */ return paramInt1;\n/* */ }", "public static void main(String[] args) {\n\t\tString a=\"56513243254\";\r\n\t\tchar[] chrCharArray=a.toCharArray();\r\n\t\tint c=0;\r\n\t\tfor(int i=0;i<chrCharArray.length;i++) {\r\n\t\t\t\r\n\t\t\tfor(int y=i+1;y<chrCharArray.length-1;y++) {\r\n\t\t\t\t\r\n\t\t\t\tif(chrCharArray[y]<chrCharArray[y+1]) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tc=chrCharArray[y+1];\r\n\t\t\t\t\tchrCharArray[y]=chrCharArray[y+1];\r\n\t\t\t\t\tchrCharArray[y+1]=(char) c;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(chrCharArray);\r\n\t}", "int mo5867a(String str, long j);", "private byte m1656i() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 < this.f2518c) {\n CharSequence charSequence = this.f2516a;\n this.f2519d = i2 + 1;\n char charAt2 = charSequence.charAt(i2);\n this.f2520e = charAt2;\n if (charAt2 == '>') {\n return 12;\n }\n if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i3 = this.f2519d;\n if (i3 >= this.f2518c) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n this.f2519d = i3 + 1;\n charAt = charSequence2.charAt(i3);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n } else {\n this.f2519d = i;\n this.f2520e = '<';\n return 13;\n }\n }\n }", "static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "public int minCharacters(String a, String b) {\n int[] c1 = new int[26];\n int[] c2 = new int[26];\n for (char c: a.toCharArray()) {\n c1[c-'a']++;\n }\n for (char c: b.toCharArray()) {\n c2[c-'a']++;\n }\n\n // initialize res\n int m = a.length();\n int n = b.length();\n int res = m + n;\n\n // 1. make string a and b only consist of distinct character\n for (int i = 0; i < 26; ++i) {\n // means operations to change all characters(m+n) to character i (c1[i] and c2[i])\n res = Math.min(res, m + n - c1[i] - c2[i]);\n }\n\n // cal prefix sum\n // this prefix sum represents the frequency of all characters less than i;\n for (int i = 1; i < 26; ++i) {\n c1[i] += c1[i - 1];\n c2[i] += c2[i - 1];\n }\n\n // 2,3 a less than b or b less than a\n // why the up-limit is 25? cos, the character 'z' can not be the base character. there is no one\n for (int i = 0; i < 25; ++i) {\n // c1[i] for freq of characters less than or equal to i in a\n // c2[i] for freq of characters less than or equal to i in b\n\n // 2. make a < b\n // replace all characters less or equal to i in `b` to larger ones and all characters grater than i in `a` to less ones\n res = Math.min(res, c2[i] + m - c1[i]);\n // 3. make a > b\n // replace all characters less or equal to i in `a` to larger ones and all characters grater than i in `b` to less ones\n res = Math.min(res, c1[i] + n - c2[i]);\n }\n return res;\n }", "private String removeBinFirstAndLast(String runtimeBin) {\n if (StringUtils.isBlank(runtimeBin)) {\n return null;\n }\n if (runtimeBin.startsWith(\"0x\")) {\n runtimeBin = StringUtils.removeStart(runtimeBin, \"0x\");\n }\n if (runtimeBin.length() > 68) {\n runtimeBin = runtimeBin.substring(0, runtimeBin.length() - 68);\n }\n return runtimeBin;\n }", "public String front22(String str) {\n String front2;\n if (str.length() <= 2) {\n front2 = str;\n } else {\n front2 = str.substring(0, 2);\n }\n \n return front2 + str + front2;\n}" ]
[ "0.60477734", "0.5670845", "0.56229633", "0.5586389", "0.5562448", "0.54943895", "0.5464968", "0.54637635", "0.54327327", "0.5425119", "0.54218024", "0.5416638", "0.5404547", "0.53772366", "0.53594327", "0.53456277", "0.531869", "0.526274", "0.5260052", "0.52599525", "0.5248623", "0.5248063", "0.52340555", "0.52325255", "0.5204539", "0.51947874", "0.5185883", "0.5182652", "0.51693153", "0.5168243", "0.5165661", "0.5153767", "0.5149515", "0.51409316", "0.5126643", "0.51224566", "0.51211834", "0.51186454", "0.50988454", "0.5094587", "0.5077423", "0.506775", "0.50633234", "0.50579697", "0.505248", "0.5036509", "0.50329274", "0.5021454", "0.501331", "0.50100434", "0.49984285", "0.49957535", "0.49935943", "0.498775", "0.49857992", "0.49813813", "0.49803036", "0.49801776", "0.4978541", "0.4977983", "0.49756074", "0.49671328", "0.49664629", "0.49602503", "0.4949439", "0.49455673", "0.4939058", "0.49381196", "0.49352083", "0.49275014", "0.4927083", "0.4912146", "0.49086076", "0.4904758", "0.49037263", "0.49024147", "0.4898027", "0.48942038", "0.4891871", "0.48891327", "0.48886833", "0.48843753", "0.4884013", "0.48764387", "0.4876278", "0.48761067", "0.48756793", "0.48727658", "0.48726115", "0.4870709", "0.48678136", "0.4865419", "0.48603645", "0.4852664", "0.48513713", "0.48469535", "0.48466122", "0.48362157", "0.48319194", "0.48300242" ]
0.74294275
0
produces a random colored Gremblin
private static Gremblin getRandomGrem(DMPlayer p){ double ran = Math.random(); //red if(ran<=.333){ return new Gremblin('r',p); } //blue if(ran<.667){ return new Gremblin('b',p); } //yellow return new Gremblin('y',p); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeRandColor(){}", "public void generateColor() {\n if (army < 0)\n color = Color.getHSBColor(0f, 1 - (float) Math.random() * 0.2f, 0.5f + (float) Math.random() * 0.5f);\n else if (army > 0)\n color = Color.getHSBColor(0.7f - (float) Math.random() * 0.2f, 1 - (float) Math.random() * 0.2f, 0.4f + (float) Math.random() * 0.25f);\n else color = Color.getHSBColor(0f, 0, 0.55f + (float) Math.random() * 0.25f);\n }", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "private Color randomColor() {\r\n Random rand = new Random();\r\n float r = rand.nextFloat();\r\n float g = rand.nextFloat();\r\n float b = rand.nextFloat();\r\n\r\n randomColor = new Color(r, g, b, 1);\r\n return randomColor;\r\n }", "public static TetriminoColor getRandomColor() {\n\t\treturn new TetriminoColor(random.nextInt(256), random.nextInt(256), random.nextInt(256));\n\t}", "public static Colores GetRandomColor(){\n Colores color=Colores.BLANCO;\n Random r=new Random();\n if(r.nextInt(2)==0){\n color=Colores.BLANCO;\n }else{\n color=Colores.NEGRO;\n }\n return color;\n }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tg.setColor(new Color((int)(Math.random() * 255),(int)(Math.random() * 255) , (int)(Math.random() * 255)));\r\n\t\tg.setFont(new Font(\"궁서\", Font.BOLD, 50));\r\n\t\t\r\n\t\tint n = (int) (Math.random() * 4);\r\n\t\tg.drawString(ss[n], x, y);\r\n\t}", "public Color newColor(){\n\t\tRandom random = new Random();\n\n\t\tint red;\n\t\tint green;\n\t\tint blue;\n\n\t\tint counter = 0;\n\n\t\tdo {\n\t\t\tred = random.nextInt(255);\n\t\t\tgreen = random.nextInt(255);\n\t\t\tblue = random.nextInt(255);\n\t\t\tcounter++;\n\t\t\t\n\t\t}while(red + green + blue < 400 && counter < 20);\n\n\t\treturn Color.rgb(red, green, blue,1);\n\t}", "public static Vector4f randomColor() {\n return new Vector4f(RANDOM.nextFloat(), RANDOM.nextFloat(), RANDOM.nextFloat(), 1);\n }", "public static Color randomColor() {\n\t\tColor c = new Color(random.nextInt(256),random.nextInt(256),random.nextInt(256));\n\t\treturn c;\n\t}", "private ChatColor randomRainbowColor() {\n\t\tswitch(random.nextInt(6)) {\n\t\t\tcase 0:\n\t\t\t\treturn ChatColor.AQUA;\n\t\t\tcase 1:\n\t\t\t\treturn ChatColor.GREEN;\n\t\t\tcase 2:\n\t\t\t\treturn ChatColor.LIGHT_PURPLE;\n\t\t\tcase 3:\n\t\t\t\treturn ChatColor.YELLOW;\n\t\t\tcase 4:\n\t\t\t\treturn ChatColor.RED;\n\t\t\tcase 5:\n\t\t\t\treturn ChatColor.GOLD;\n\t\t\tdefault:\n\t\t\t\treturn ChatColor.WHITE;\n\t\t}\n\t}", "private Color getRandomColor()\r\n\t{\r\n\t\tColor randomColor = new Color ((float) Math.random(), (float) Math.random(), (float) Math.random());\r\n\t\treturn randomColor;\r\n\t}", "protected Color randomColor()\n {\n // There are 256 possibilities for the red, green, and blue attributes\n // of a color. Generate random values for each color attribute.\n Random randNumGen = RandNumGenerator.getInstance();\n return new Color(randNumGen.nextInt(256), // amount of red\n randNumGen.nextInt(256), // amount of green\n randNumGen.nextInt(256)); // amount of blue\n }", "private void randomiseColors() {\n \t// Give the star a random color for normal circumstances...\n \tcolor.set((float) Random.nextDouble(),\n \t\t\t(float) Random.nextDouble(), (float) Random.nextDouble());\n \n // When the star is twinkling, we draw it twice, once in the color below \n // (not spinning) and then once in the main color defined above.\n twinkleColor.set((float) Random.nextDouble(),\n \t\t(float) Random.nextDouble(), (float) Random.nextDouble());\n }", "public static Color RandomColor(){\n\t\n\tRandom rand = new Random();\n\tint red, green, blue;\n\tred = rand.nextInt(255);\n\tgreen = rand.nextInt(255);\n\tblue = rand.nextInt(255);\n\t\n\tColor color = new Color(red,green,blue);\n\treturn color;\n\t\n\t}", "public Color getRandomColor() {\n\t\tRandom rand = new Random();\n\t\tint i = rand.nextInt(3);\n\t\tif(i==0){\n\t\t\treturn Color.blue.darker();\n\t\t}else if(i==1) {\n\t\t\treturn Color.red.darker();\n\t\t}else\n\t\t\treturn Color.GREEN.darker();\n\t}", "public int getRandomColor() {\n Random rand = new Random();\n\n int[] colors = new int[]{\n Color.argb(255, 255, 216, 0), //gold\n Color.argb(255, 0, 255, 255), //aqua\n Color.argb(255, 128, 255, 208), //aquamarine\n Color.argb(255, 176, 255, 48), //greenyellow\n Color.argb(255, 255, 104, 176), //hotpink\n Color.argb(255, 240, 128, 128), //lightcoral\n Color.argb(255, 255, 96, 64), //tomato\n Color.argb(255, 255, 255, 0) //yellow\n };\n return colors[rand.nextInt(colors.length)];\n }", "private Color randomColor()\r\n {\r\n \tint randomNum = random.nextInt(5);\r\n \t\r\n \tif (randomNum == RED)\r\n \t\treturn Color.RED;\r\n \telse if (randomNum == GREEN)\r\n \t\treturn Color.GREEN;\r\n \telse if (randomNum == BLUE)\r\n \t\treturn Color.BLUE;\r\n \telse if (randomNum == BLACK)\r\n \t\treturn Color.BLACK;\r\n \telse \r\n \t\treturn Color.CYAN;\r\n \t\r\n\t\t\r\n }", "void testRandColor(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.randColor(), Color.ORANGE);\r\n t.checkExpect(this.game3.randColor(), Color.RED);\r\n t.checkExpect(this.game5.randColor(), Color.PINK);\r\n }", "public Color randColor() {\r\n return this.loc.get(this.rand.nextInt(this.loc.size()));\r\n }", "public Color generateColor() { //function to generate a random color from the array of colors passed in\n Random rand = new Random();\n int randomNum = rand.nextInt((colorChoices.length));\n return colorChoices[randomNum];\n }", "static int getMondrianColour(int randomRange) {\n Random rand = new Random();\n int randomInt = rand.nextInt(randomRange);\n int colour = R.color.mondrian_white;\n switch (randomInt) {\n case 0:\n colour = R.color.mondrian_blue;\n break;\n case 1:\n colour = R.color.mondrian_red;\n break;\n case 2:\n colour = R.color.mondrian_yellow;\n break;\n }\n return colour;\n }", "String getColor();", "public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}", "public static Color getRandomColor(){\n int number = Math.abs(random.nextInt()) % getColorsTabLen();\n //Now I get the item from tab by drawing index\n //String colorName = colorNames[number];\n //In this case I get the color by index\n try {\n return COLORS[number];\n } catch (ArrayIndexOutOfBoundsException e){\n return getRandomColor();\n }\n }", "public void drawGrid(Graphics g)\n {\n //g.setColor(Color.GREEN);\n \n \n if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor); \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n else\n { \n if(lastpowerUp.equals(\"BLUE\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray); \n } \n else if(difficult.equals(\"GHOST\"))\n g.setColor(Color.WHITE);\n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n }", "Chromosome getRandom();", "public MinigameGhost() {\n this(Math.random() * RIGHT_BORDER, Math.random() * LOWER_BORDER);\n }", "public void reset() {\n x = random(-2*width, 3*width); // set the x position\n y = random(-height, 2*height); // set the y position\n c[0] = color(random(150, 255), random(150, 255), random(150, 255)); // set the top color (a bit lighter)\n // randomly set the 4 colors in the base of the shape\n for (int i=1; i<5; i++) {\n c[i] = color(random(255), random(255), random(255)); // random RGB color\n }\n }", "private String getColor(String tagName) {\n if (labelColor.containsKey(tagName)) {\n return labelColor.get(tagName);\n } else {\n Random random = new Random();\n // create a big random number - maximum is ffffff (hex) = 16777215 (dez)\n int nextInt = random.nextInt(256 * 256 * 256);\n // format it as hexadecimal string (with hashtag and leading zeros)\n String colorCode = String.format(\"#%06x\", nextInt);\n labelColor.put(tagName, colorCode);\n return labelColor.get(tagName);\n }\n }", "public void randBalloonColor(Graphics art)\n\t{\n\t\tart.setColor(Color.white);\n\t\tart.fillRect(0, 0, 900, 150);\n\t\tcount++;\n\t\tif(count % 100 == 0)\n\t\t{\n\t\t\trandomColor = colors[gen.nextInt(colors.length)];\n\t\t}\n\t\tart.setColor(Color.red);\n\t\tart.setColor(randomColor);\n\t\tart.fillOval(750, 47, 55, 70);\n\t\t\n\t}", "private Colors ingameColor() {\n\t\tList<Colors> colors = new ArrayList<Colors>();\n\t\tIterator<Sphere> it = this.spheres.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSphere s = it.next();\n\t\t\tif (!colors.contains(s.color())) {\n\t\t\t\tcolors.add(s.color());\n\t\t\t}\n\t\t}\n\t\treturn colors.get(MathUtils.random(colors.size() - 1));\n\t}", "public RandomColorProvider() {\n\t\tcurrentColorValue = 0;\n\t}", "public void render(Graphics g) \n\t{\n\t g.setColor(new Color(r.nextInt()+255));\n\t g.fillRect((int)x,(int) y, 32, 32);\n\t}", "private void generateColors(){\n\t\tRandom r = new Random();\n\t\tcurrentIndex = 0;\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tcolors[i] = COLORS_DEFAULT[r.nextInt(COLORS_DEFAULT.length)];\n\t\t}\n\t}", "public float gaussianRandom() {\n\t\treturn (CCMath.constrain((float)nextGaussian() / 4,-1 ,1 ) + 1) / 2;\n\t}", "static void changeToRandomColor( int rowNum, int colNum ) {\n int red = ( int )( Math.random() * 256 );\n int green = ( int )( Math.random() * 256 );\n int blue = ( int )( Math.random() * 256 );\n Mosaic.setColor( rowNum, colNum, red, green, blue );\n\n }", "public void setRandomCombi(){\r\n Random rand = new Random();\r\n\r\n for (int i = 0; i < COMBI_LENGTH; i++){\r\n //Take a random Color, put length - 1 to avoid picking EMPTY color\r\n this.combi[i] = Colors.values()[rand.nextInt(Colors.values().length - 1)];\r\n }\r\n }", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "private void getRandomColor(RGB rgb) {\n synchronized (frame_) {\n final int i = (int) (Math.random() * frame_.length);\n rgb.r = frame_[i].r;\n rgb.g = frame_[i].g;\n rgb.b = frame_[i].b;\n }\n }", "public void randomColor(int brightness) {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(true);\n lightState.setBrightness(brightness);\n //generates a random HUE code to set the bulbs to a random color\n Random rand = new Random();\n lightState.setHue(rand.nextInt(65535));\n \n bridge.setLightStateForDefaultGroup(lightState);\n }", "Color(int R, int G, int B) {\r\n\t\t this.rgb = new RGB(R,G,B);\r\n\t\t this.colorific = true;\r\n\t }", "public void drawBlossom(Graphics g, Point2D p) {\n\t\t// Generate random numbers for color components\n\t\tint randRed = (int) (Math.random() * (250 - 0));\n\t\tint randGreen = (int) (Math.random() * (250 - 0));\n\t\tint randBlue = (int) (Math.random() * (250 - 0));\n\t\t// Set color of the blossom\n\t\tg.setColor(new Color(randRed, randGreen, randBlue));\n\t\t// Draw the blossom\n\t\tg.fillOval((int) p.getX() - BLOSSOM_DIAM / 2, (int) p.getY()\n\t\t\t\t- BLOSSOM_DIAM / 2, BLOSSOM_DIAM, BLOSSOM_DIAM);\n\t}", "private Brick generateBricks() {\n\t\tBrick randomBrick = null;\n\t\tRandom rand = new Random();\n\t\tint a = rand.nextInt(7);\n\t\tswitch (a) {\n\t\tcase 1:\n\t\t\trandomBrick = new LineBrick();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\trandomBrick = new LBrick();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\trandomBrick = new RLBrick();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\trandomBrick = new TBrick();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\trandomBrick = new SBrick();\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\trandomBrick = new RSBrick();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\trandomBrick = new Square();\n\t\t\tbreak;\n\t\t}\n\t\tbrickgc.setFill(randomBrick.getColor());\n\t\treturn randomBrick;\n\t}", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "public RedCell()\n {\n super(1, Greenfoot.getRandomNumber(2) + 1);\n setRotation(Greenfoot.getRandomNumber(360));\n }", "public void createLabyrinth() {\n int x = numberGenerator.nextInt(width-1);\n int y = numberGenerator.nextInt(height-1);\n //first walk until stop\n walkRandom(cells[x][y]);\n }", "private String rainbowColoredName(String name) {\n\t\tStringBuilder rainbowName = new StringBuilder();\n\t\tfor (char c: name.toCharArray()) {\n\t\t\trainbowName.append(randomRainbowColor());\n\t\t\trainbowName.append(c);\n\t\t}\n\t\treturn rainbowName.toString();\n\t}", "@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\t//设置随机数\n\t\tRandom random=new Random();\n\t\t//设置画笔颜色\n\t\tg.setColor(new Color ( random.nextInt(256),random.nextInt(256),random.nextInt(256) ) );\n\t\t//设置画笔字体\n\t\tg.setFont(new Font(\"宋体\",Font.BOLD,random.nextInt(65) ) );\n\t\t//画\n\t\tg.drawString(\"*\",random.nextInt(Factory.jframeWidth), random.nextInt(Factory.height));\n\t\t\t\t\n\t}", "public GameColor getColor();", "private static GBAPalette grayscalePalette(int size){\n GBAPalette.Creator creator = GBAPalette.create();\n //Interpolating! (0,0), (size, 31)\n //slope = 256 / size\n for(int count = 0; count < size; count++){\n int pixel = count * 31 / size;\n creator.with(GBAColor.from(pixel, pixel, pixel));\n }\n return creator.build();\n }", "RGB getNewColor();", "public int getBiomeGrassColor()\n {\n return 11176526;\n }", "RedSphere() {\n Random random = new Random();\n for (int i = 0; i < 6; i++) {\n value[i] = random.nextInt(33) + 1;\n }\n }", "private Pair<Integer, Integer> getRandomColor(int level) {\n int red = (int)(Math.random() * 255);\n int green = (int)(Math.random() * 255);\n int blue = (int)(Math.random() * 255);\n\n // TODO: Improve the formula for alphas\n int alpha1 = 200 + (int)(Math.random() * 55);\n int delta = (10 - level) * 2;\n int alpha2 = alpha1 + delta * (alpha1 > 227 ? -1 : 1);\n\n int color1 = Color.argb(alpha1, red, green, blue);\n int color2 = Color.argb(alpha2, red, green, blue);\n\n return new Pair(color1, color2);\n }", "private TetrisPiece randomPiece() {\n\t\tint rand = Math.abs(random.nextInt());\n\t\treturn new TetrisPiece(rand % (PIECE_COLORS.length));\n\t}", "private void green(){\n\t\tthis.arretes_fG();\n\t\tthis.coins_fG();\n\t\tthis.coins_a1G();\n\t\tthis.coins_a2G();\n\t\tthis.aretes_aG();\n\t\tthis.cube[31] = \"G\";\n\t}", "private int getRandomMaterialColor(String typeColor) {\n int returnColor = Color.GRAY;\n int arrayId = getResources().getIdentifier(\"mdcolor_\" + typeColor, \"array\", getContext().getPackageName());\n\n if (arrayId != 0) {\n TypedArray colors = getResources().obtainTypedArray(arrayId);\n int index = (int) (Math.random() * colors.length());\n returnColor = colors.getColor(index, Color.GRAY);\n colors.recycle();\n }\n return returnColor;\n }", "void rainbow(int width);", "public void paintComponent(Graphics g){\n\r\n int x, y, w, h, clientWidth, clientHeight;\r\n double scale;\r\n float rC, gC, bC;\r\n Color c = new Color(0F, 0F, 0F);\r\n boolean clipped, tooSmall;\r\n\r\n Graphics2D g2 = (Graphics2D) g;\r\n\r\n clientWidth = getSize().width;\r\n clientHeight = getSize().height;\r\n\r\n\r\n for (int i = 1; i <= 200; i++){\r\n x = (int)(Math.floor(Math.random() * clientWidth));\r\n y = (int)(Math.floor(Math.random() * clientHeight));\r\n\r\n scale = 0.2;\r\n w = (int)(scale * Math.floor(Math.random() * getSize().width));\r\n h = (int)(scale * Math.floor(Math.random() * getSize().height));\r\n\r\n g2.setColor(colors[i % 7]);\r\n\r\n clipped = (x > clientWidth - w) || (y > clientHeight - h);\r\n tooSmall = (w < 0.2 * scale * clientWidth) || (h < 0.2 * scale * clientHeight);\r\n\r\n if (clipped || tooSmall) //prevent clipping\r\n i--; // dangerous hack\r\n else\r\n g2.fillOval(x, y, w, h);\r\n\r\n }\r\n\r\n\r\n\r\n //strokeWidth = (int)(Math.floor(Math.random() * 10));\r\n //g2.setStroke(new BasicStroke(strokeWidth));\r\n\r\n //g2.setColor(new Color(rC, gC, bC));\r\n\r\n //g2.drawLine(sx, sy, ex, ey);\r\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public String getColorString();", "public DrawComponent() {\n if (screen == null) {\n screen = Screen.getScreen();\n }\n\n // generate a random color\n color = screen.color(screen.random(255), screen.random(255), screen.random(255)); //random color\n }", "@Override\n protected int generateSkinColor() {\n ArrayList<Integer> skinColors = new ArrayList<Integer>();\n skinColors.add(EntityPezz.SKIN_COLOR_BEGIN);\n skinColors.add(EntityPezz.SKIN_COLOR_END);\n return Colors.arbiLerp(skinColors);\n }", "static void fillWithRandomColors() {\n\n for ( int row = 0; row < ROWS; row++ ) {\n for ( int column = 0; column < COLUMNS; column++ ) {\n changeToRandomColor( row, column );\n }\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint range = 6;\r\n\t\tint min = 1;\r\n for (int i = 0; i < 6; i++) { \r\n int rand = (int)(Math.random() * range) + min; \r\n \r\n //Output is different everytime this code is executed \r\n System.out.println(rand); \r\n int randomNu = 8;\r\n String color;\r\n switch (color) {\r\n case 1: color = \"o\";\r\n break;\r\n case 2: monthString = \"February\";\r\n break;\r\n case 3: monthString = \"March\";\r\n break;\r\n\r\n\t}\r\n\r\n\t}\r\n}", "public BaileyCrandall() {\n\tsetSeed(System.currentTimeMillis());\n }", "public int getColor();", "public int getColor();", "Boolean getRandomize();", "public abstract BossColor getColor();", "public void randomStyle(DrawTextItem s) {\n\t\tString[] fontFamilies = {\"Monospace\", \"Helvetica\", \"TimesRoman\", \"Courier\", \"Serif\", \"Sans_Serif\"}; \n\t\tint fontType = new Random().nextInt(fontFamilies.length); \n\t\tint fontSize = new Random().nextInt(15); \n\t\tif (fontSize <= 6)\n\t\t\tfontSize = 7;\n\t\tint fontStyle;\n\t\tif (Math.random() > 0.25)\n\t\t\tfontStyle = Font.ITALIC;\n\t\telse if (Math.random() > 0.5)\n\t\t\tfontStyle = Font.BOLD;\n\t\telse\n\t\t\tfontStyle = Font.ITALIC + Font.BOLD;\n\t\ts.setFont( new Font(fontFamilies[fontType], fontStyle, fontSize )); \n\t\tint angle = new Random().nextInt(359);\n\t\ts.setRotationAngle(angle);\n\t\tint scale = new Random().nextInt(5);\n\t\tif (scale == 0)\n\t\t\tscale = 1; \n\t\ts.setMagnification(scale);\n\t\tif (Math.random() < 0.5)\n\t\t\ts.setBorder(true); \n\t\telse\n\t\t\ts.setBorder(false);\n\t\ts.setTextTransparency(0.3);\n\t\tint r = new Random().nextInt(255);\n\t\tint g = new Random().nextInt(255);\n\t\tint b = new Random().nextInt(255);\n\t\ts.setBackground(new Color(r,g,b));\n\t\ts.setBackgroundTransparency(Math.random() * 0.90 + 0.10);\n\t}", "BlueSphere() {\n Random random = new Random();\n value[0] = random.nextInt(16) + 1;\n }", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "public java.lang.String getRnd () {\r\n\t\treturn rnd;\r\n\t}", "public void randomize()\n {\n a = (int)(Math.random()*(1110/15))*15 + 150; \n b = (int)(Math.random()*(480/15))*15 + 150; \n \n if(!specials || difficult.equals(\"GHOST\"))\n {\n dotColor = \"RED\";\n }\n else\n { \n double c = Math.random(); \n if(c < .65 || powerupTimer > 0 || hasItem)\n {\n dotColor = \"RED\";\n }\n else if(c>=.65 && c<.70 )\n \n {\n //dotColor = \"RED SHELL\";\n dotColor = \"RED\";\n }\n else if(c>=.70 && c<.75)\n {\n dotColor = \"TROLL\";\n }\n else if(c>=.75 && c <=.8)\n {\n dotColor = \"DOUBLE\";\n }\n else if(c>.8 && c<=.85 && powerupTimer <= 0)\n {\n dotColor = \"BLUE\"; \n }\n else if(c>.85 && c<=.90 && powerupTimer <= 0)\n {\n if(!difficult.equalsIgnoreCase(\"YOU WILL NOT SURVIVE\"))\n { \n if(modeT)\n dotColor = \"CRYSTAL\";\n else\n dotColor = \"BLACK\";\n }\n else\n dotColor = \"RED\";\n }\n else if(c>.90 && c<=.93 && powerupTimer <= 0)\n {\n dotColor = \"RAINBOW\"; \n }\n else if(c>.93 && c<=.97 && powerupTimer <= 0)\n {\n dotColor = \"YELLOW\"; \n }\n else if(c>.97 && c<=1.0 && powerupTimer <= 0)\n {\n dotColor = \"WHITE\"; \n } \n else if(c>1.0 && c<=1.0 && powerupTimer <= 0)\n {\n dotColor = \"PURPLE\";\n } \n }\n }", "private void generateNether(World world, Random random, int i, int j) {\n\n\t}", "public Color getPitColor(){\n\t\treturn Color.GRAY;\n\t}", "private Color generateColor() {\r\n\t\tint length = nameColor.size();\r\n\t\tif(length == 0) return colorArray[0];\r\n\t\t\r\n\t\tColor lastColor = nameColor.get(length-1);\r\n\t\tint lastColorIndex = 0;\r\n\t\tfor(int i = 0; i<colorArray.length; i++) {\r\n\t\t\tif(lastColor == colorArray[i]) {\r\n\t\t\t\tlastColorIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tColor curColor = colorArray[(lastColorIndex+1)%3];\r\n\t\treturn curColor;\r\n\t}", "public final int getG() {\n\t\treturn green;\n\t}", "private void random() {\n\n\t}", "public Rng() {\n\t\tr = new Random();\n\t}", "private Integer randomBilirrubina(){\n\t\t\tint Min = 0, Max = 14;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "@Test\n @Tag(\"bm1000\")\n public void testBLEND() {\n CuteNetlibCase.doTest(\"BLEND.SIF\", \"-3.0812149846E+01\", null, NumberContext.of(7, 4));\n }", "public GSRandom() {\r\n\t\t\r\n\t}", "Randomizer getRandomizer();", "public int randomGQ() {\n\t\treturn(getRandomInteger(10,100));\n\t}", "public static double randomNum(Random g)\n\t{\n\t\treturn -5+g.nextDouble()*10;\n\t}", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "public void actionPerformed(ActionEvent e) {\n float zufall = (float) Math.random(); \n Color grauton = new Color(zufall,zufall,zufall);\n c.setBackground(grauton); // Zugriff auf c moeglich, da\n }", "private double m9971g() {\n return (new Random().nextDouble() * 0.4d) - 22.4d;\n }", "private void getRandomSprite(String type) {\n\t\tint randInt = new Random().nextInt(3);\n\t\tspriteNum = randInt;\n\t\tswitch(type){\n\t\tcase \"red\":\n\t\t\tspriteCol = 0;\n\t\t\tbreak;\n\t\tcase \"blue\":\n\t\t\tspriteCol = 1;\n\t\t\tbreak;\n\t\tcase \"green\":\n\t\t\tspriteCol = 2;\n\t\t\tbreak;\n\t\tcase \"black\":\n\t\t\tspriteCol = 3;\n\t\t\tbreak;\n\t\tcase \"grey\":\n\t\t\tspriteCol = 4;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tspriteCol =0;\n\t\t\tbreak;\n\t\t}\n\t}", "String getColour();", "public static void sample() {\n\t\tlcd.clear();\n\t\tint counter =0;\n\t\t//run 100 samples\n\t\twhile(counter<100) {\n\t\t\tmyColorSample.fetchSample(sampleColor, 0); \n\t\t\tfloat r = sampleColor[0]*1000; \n\t\t\tfloat g = sampleColor[1]*1000; \n\t\t\tfloat b = sampleColor[2]*1000; \n\t\t\tSystem.out.print(r +\",\");\n\t\t\tSystem.out.print(g+\",\");\n\t\t\tSystem.out.println(b);\n\t\t\tcounter ++;\n\t\t}\t\t\n\t}", "public void generateNether(World world, Random random, int x, int y){\n\t}", "public Image generate() {\n generateStripes(rainbow, 7, vertical);\n return new ImageRGB(data);\n }", "abstract String getColor();", "public int getRenderColor(int p_149741_1_)\n {\n \n \tBlock[] coloredStones = MachineryCraft.blocks.coloredStoneSlab;\n \n \tfor(int i = 0; i<coloredStones.length; i++){\n \t\tif(this == coloredStones[i]) return this.colors[i];\n \t\t\n \t}\n \treturn colors[1];\n \n }", "public Background() {\n\t\ttime = 0;\n\t\tRandom rand = new Random();\n\t\trandomGrid = new Vector2[101][101];\n\t\tfor (int i = 0; i < randomGrid.length; i++) {\n\t\t\tfor (int j = 0; j < randomGrid[0].length; j++) {\n\t\t\t\trandomGrid[i][j] = new Vector2(rand.nextFloat() - 0.5f, rand.nextFloat() - 0.5f).nor();\n\t\t\t}\n\t\t}\n\n\t\tshapeRenderer = new ShapeRenderer();\n\t}", "@Override\n public Color getColor() {\n return Utils.Pion.BLANC.getCouleur();\n }" ]
[ "0.710839", "0.7064626", "0.6895735", "0.68947136", "0.6883271", "0.6848791", "0.67053646", "0.6577921", "0.65321493", "0.6491875", "0.64533764", "0.6434897", "0.6371484", "0.6367272", "0.6254489", "0.6233879", "0.6227292", "0.6223619", "0.6213902", "0.6157467", "0.59779924", "0.5933393", "0.5926318", "0.59195197", "0.5918234", "0.5884997", "0.58742875", "0.586028", "0.58416325", "0.5836608", "0.5825869", "0.58179593", "0.5800088", "0.579398", "0.5760992", "0.5733759", "0.5607364", "0.55948764", "0.559344", "0.5571854", "0.5566885", "0.55536264", "0.5550111", "0.55329055", "0.55284154", "0.5508247", "0.5504104", "0.54997706", "0.54920715", "0.5480566", "0.547953", "0.5476654", "0.5476173", "0.5468471", "0.5462396", "0.54581267", "0.545774", "0.5446904", "0.544155", "0.54330903", "0.5432946", "0.5431923", "0.54249364", "0.5414098", "0.54085416", "0.5398671", "0.5386853", "0.5377899", "0.5377899", "0.53759634", "0.53577137", "0.5357004", "0.53533256", "0.5348552", "0.534511", "0.5343031", "0.532809", "0.53276545", "0.532532", "0.5325311", "0.53222", "0.5313449", "0.53107274", "0.5295393", "0.52947664", "0.5294444", "0.5264191", "0.5249144", "0.52447915", "0.52380145", "0.52358395", "0.52343154", "0.52338684", "0.52261627", "0.52240276", "0.5223961", "0.521721", "0.5207037", "0.52052677", "0.51957697" ]
0.81485134
0
Looks if this block makes four in a row
public static Piece[] findFour(Piece singleBlock){ return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFourOfAKind() {\r\n\r\n return getHighestConsecutive() == 4;\r\n }", "private static boolean TableRow_4(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"TableRow_4\")) return false;\n int c = current_position_(b);\n while (true) {\n if (!TableRow_4_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"TableRow_4\", c)) break;\n c = current_position_(b);\n }\n return true;\n }", "private boolean rowHasFour(int row, int col) {\n boolean four = false;\n int rowCount = 0;\n if (getBoard()[row][col] == null)\n return false;\n rowCount = 0;\n if (row < rows - 1) {\n for (int i = row + 1; i < rows; i++) {\n if (getBoard()[i][col] == null) {\n break;\n }\n if (getBoard()[row][col].equals(getBoard()[i][col])) {\n rowCount++;\n } else {\n break;\n }\n }\n }\n if (row > 0) {\n for (int i = row - 1; i > 0; i--) {\n if (getBoard()[i][col] == null) {\n break;\n }\n if (getBoard()[row][col].equals(getBoard()[i][col])) {\n rowCount++;\n } else {\n break;\n }\n }\n }\n if (rowCount >= (winCount - 1)) {\n four = true;\n }\n return four;\n }", "private int checkLines(){\r\n \tint contRows = 0;\r\n \t\r\n \tfor (float y = height; y >= 0 && contRows < 4; y--) {\r\n \t\tif (isFullRow(y)) {\r\n \t\t\tcontRows++;\r\n \t\t\tdeleteRow(y);\r\n \t\t}\r\n \t}\r\n \treturn contRows;\r\n }", "private boolean isRowFull(int row) {\n int numBlocks = 0;\n\n for (int col = 0; col < 10; col++) {\n if (isCellOccupied(row, col)) {\n numBlocks++;\n }\n }\n\n return numBlocks == 10;\n }", "private static boolean model_block_4(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"model_block_4\")) return false;\n while (true) {\n int c = current_position_(b);\n if (!model_block_4_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"model_block_4\", c)) break;\n }\n return true;\n }", "private boolean fourstonesReached() {\n\t\t\n\t\t\n\t\t//TO-DO: evtl. Abbruch, wenn ein freies Feld entdeckt wird\n\t\t\n\t\tint counter=0;\n\t\t\n\t\t//check horizontal lines\n\t\tfor(int i=0; i<horizontal;i++ ) {\n\t\t\t\n\t\t\tfor(int j=0; j<vertical;j++ ) {\n\t\t\t\t\n\t\t\t\tif(board[i][j] == player.ordinal()) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif(counter == 4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcounter=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcounter=0;\n\t\t}\n\t\t\n\t\t\n\t\t//check vertical lines\n\t\tfor(int i=0; i<vertical;i++ ) {\n\t\t\t\n\t\t\tfor(int j=0; j<horizontal;j++ ) {\n\t\t\t\t\n\t\t\t\tif(board[j][i] == player.ordinal()) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif(counter == 4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcounter=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcounter=0;\n\t\t}\n\t\t\n\t\t//check diagonal \n\t\tint ordinal = player.ordinal();\n\t\t\n\t\tif( //checking lines from up-left to down-right\n\t\t\t(board[3][0] == ordinal && board[2][1] == ordinal && board[1][2] == ordinal && board[0][3] == ordinal) || \n\t\t\t(board[4][0] == ordinal && board[3][1] == ordinal && board[2][2] == ordinal && board[1][3] == ordinal) ||\n\t\t\t(board[3][1] == ordinal && board[2][2] == ordinal && board[1][3] == ordinal && board[0][4] == ordinal) ||\n\t\t\t(board[5][0] == ordinal && board[4][1] == ordinal && board[3][2] == ordinal && board[2][3] == ordinal) ||\n\t\t\t(board[4][1] == ordinal && board[3][2] == ordinal && board[2][3] == ordinal && board[1][4] == ordinal) ||\n\t\t\t(board[3][2] == ordinal && board[2][3] == ordinal && board[1][4] == ordinal && board[0][5] == ordinal) ||\n\t\t\t(board[5][1] == ordinal && board[4][2] == ordinal && board[3][3] == ordinal && board[2][4] == ordinal) ||\n\t\t\t(board[4][2] == ordinal && board[3][3] == ordinal && board[2][4] == ordinal && board[1][5] == ordinal) ||\n\t\t\t(board[3][3] == ordinal && board[2][4] == ordinal && board[1][5] == ordinal && board[0][6] == ordinal) ||\n\t\t\t(board[5][2] == ordinal && board[4][3] == ordinal && board[3][4] == ordinal && board[2][5] == ordinal) ||\n\t\t\t(board[4][3] == ordinal && board[3][4] == ordinal && board[2][5] == ordinal && board[1][6] == ordinal) ||\n\t\t\t(board[5][3] == ordinal && board[4][4] == ordinal && board[3][5] == ordinal && board[2][6] == ordinal) ||\n\t\t\t\n\t\t\t//checking lines from up-right to down-left\n\t\t\t(board[2][0] == ordinal && board[3][1] == ordinal && board[4][2] == ordinal && board[5][3] == ordinal) ||\n\t\t\t(board[1][0] == ordinal && board[2][1] == ordinal && board[3][2] == ordinal && board[4][3] == ordinal) ||\n\t\t\t(board[2][1] == ordinal && board[3][2] == ordinal && board[4][3] == ordinal && board[5][4] == ordinal) ||\n\t\t\t(board[0][0] == ordinal && board[1][1] == ordinal && board[2][2] == ordinal && board[3][3] == ordinal) ||\n\t\t\t(board[1][1] == ordinal && board[2][2] == ordinal && board[3][3] == ordinal && board[4][4] == ordinal) ||\n\t\t\t(board[2][2] == ordinal && board[3][3] == ordinal && board[4][4] == ordinal && board[5][5] == ordinal) ||\n\t\t\t(board[0][1] == ordinal && board[1][2] == ordinal && board[2][3] == ordinal && board[3][4] == ordinal) ||\n\t\t\t(board[1][2] == ordinal && board[2][3] == ordinal && board[3][4] == ordinal && board[4][5] == ordinal) ||\n\t\t\t(board[2][3] == ordinal && board[3][4] == ordinal && board[4][5] == ordinal && board[5][6] == ordinal) ||\n\t\t\t(board[0][2] == ordinal && board[1][3] == ordinal && board[2][4] == ordinal && board[3][5] == ordinal) ||\n\t\t\t(board[1][3] == ordinal && board[2][4] == ordinal && board[3][5] == ordinal && board[4][6] == ordinal) ||\n\t\t\t(board[0][3] == ordinal && board[1][4] == ordinal && board[2][5] == ordinal && board[3][6] == ordinal)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean hasFourSides() { return hasNMarkedSides(4); }", "private Boolean canWinInRow(PentagoBoard b, int row, Color who) {\n \tint amount=0;\n \tfor(int i=0; i<b.getSize(); i++) {\n\t\t\tif(b.getState(i,row) == Color.EMPTY || b.getState(i,row) == who) {\n\t\t\t\tamount++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tamount=0;\n \t}\n \tif(amount>4)\n \t\treturn true;\n \telse\n \t\treturn false;\n }", "public boolean checkForCodek(){\n int size = pile.size();\n if(size >= 4){\n for(int i = size-1; i >= size-3; i--)\n if(pile.get(i).getVal() != pile.get(i-1).getVal())\n return false;\n return true;\n }\n else return false;\n }", "private boolean hasRowWin() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (getBoard()[i][j] != null) {\n boolean rowWin = rowHasFour(i, j);\n if (rowWin) {\n return true;\n }\n\n }\n }\n }\n return false;\n }", "public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean colHasFour(int row, int col) {\n boolean four = false;\n int colCount = 0;\n if (getBoard()[row][col] == null)\n return false;\n if (col < cols - 1) {\n for (int i = col + 1; i < cols; i++) {\n if (getBoard()[row][i] == null) {\n break;\n }\n if (getBoard()[row][col].equals(getBoard()[row][i])) {\n colCount++;\n } else {\n break;\n }\n }\n }\n if (col > 0) {\n for (int i = col - 1; i > 0; i--) {\n if (getBoard()[row][i] == null) {\n break;\n }\n if (getBoard()[row][col].equals(getBoard()[row][i])) {\n colCount++;\n } else {\n break;\n }\n }\n }\n if (colCount >= (winCount - 1)) {\n four = true;\n }\n return four;\n }", "private static boolean TableRow_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"TableRow_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = SpaceStar(b, l + 1);\n r = r && TableRow_4_0_1(b, l + 1);\n r = r && consumeToken(b, JB_TOKEN_PIPE);\n exit_section_(b, m, null, r);\n return r;\n }", "protected boolean checkFourOfAKind(ReturnValue returnValue) {\n\t\tboolean returnBool = true;\n\t\tint localCheck = 0;\n\t\tint localPoints = 0;\n\t\tboolean localBool = false;\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\tif (intList.get(i) == intList.get(j)) {\n\t\t\t\t\tlocalCheck++;\n\t\t\t\t\tif (localCheck == 4) {\n\t\t\t\t\t\tlocalBool = true;\n\t\t\t\t\t\tlocalPoints = intList.get(i) * 4;\n\t\t\t\t\t\treturnValue.setValue(localBool, localPoints, Box.FOUR_OF_A_KIND);\n\t\t\t\t\t\treturnValue.setTheDiceInt(intList.get(i));\n\t\t\t\t\t\treturn returnBool;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocalCheck = 0;\n\t\t}\n\t\treturnValue.setValue(localBool, localPoints, Box.FOUR_OF_A_KIND);\n\t\treturn returnBool;\n\t}", "private boolean diaHasFour(int row, int col) {\n boolean four = false;\n int colCount = 0;\n if (getBoard()[row][col] == null)\n return false;\n if (row < rows - 1 && col < cols - 1)\n for (int i = row + 1, j = col + 1; i < rows && j < cols; i++, j++) {\n if (getBoard()[i][j] == null) {\n break;\n }\n if (getBoard()[row][col].equals(getBoard()[i][j])) {\n colCount++;\n } else {\n break;\n }\n }\n\n if (row > 0 && col > 0)\n for (int i = row - 1, j = col - 1; i > 0 && j > 0; i--, j--) {\n if (getBoard()[i][j] == null) {\n break;\n }\n\n if (getBoard()[row][col].equals(getBoard()[i][j])) {\n colCount++;\n } else {\n break;\n }\n }\n if (colCount >= (winCount - 1)) {\n four = true;\n }\n return four;\n }", "public boolean isFourOfAKind(){\n List<PokerCard> subList;\r\n \r\n //First possibility: first four cards are the same value\r\n subList = cards.subList(0, cards.size()-1);\r\n if(haveSameValue(subList)){\r\n handValue = subList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: last four cards are the same value\r\n subList = cards.subList(1, cards.size());\r\n if(haveSameValue(subList)){\r\n handValue = subList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "private boolean testLinesOf4(long board, int shiftValue) {\n long firstShiftedBoard = shiftAndMergeBoard(board, shiftValue);\n // Second shift (twice of the first) compared each previous results with the next-next element\n // So for in fact, result compare of 1 and 2 is compared with result compare of 3 and 4\n long secondShiftedBoard = shiftAndMergeBoard(firstShiftedBoard, 2 * shiftValue);\n // So if 1 == 2 and 3 == 4 and 1&2 == 3&4 so 1==2==3==4, so you have a four line\n //\n // Binary example with diag \\ (shift value == columnsize == 6)\n //......1 .....1. ....1.. ...1... => board with diag \\ line of 4\n //....... .....1. ....1.. ...1... => first shift, board >> 6\n //....... .....1. ....1.. ...1... => first merge\n //\n //....... .....1. ....1.. ...1... => re-use first merge result\n //....... ....... ....... ...1... => second shift, board >> 12\n //....... ....... ....... ...1... => second merge\n // Result != 0, so we have a line\n if (secondShiftedBoard != 0) {\n return true;\n }\n return false;\n }", "public boolean isThreeFoldRepetition() {\n int repeatNum = 0;\n\n for (Board position : game.getPositionList()) {\n if (game.getCurrentPosition().equals(position)) {\n repeatNum++;\n }\n }\n\n return repeatNum >= 3;\n }", "private boolean isLineFull(int rowNumber) {\n\t\tfor (int i = 0; i < matrixWidth; i++) {\n\t\t\tif (boardTiles[rowNumber][i].equals(backgroundColor)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isFourOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < numbers.size(); j++){\n if(numbers.get(i).equals(numbers.get(j))){\n numSame++;\n }\n }\n if (numSame == 4){\n return true;\n }\n }\n return false;\n }", "private static boolean config_block_4(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"config_block_4\")) return false;\n while (true) {\n int c = current_position_(b);\n if (!config_block_4_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"config_block_4\", c)) break;\n }\n return true;\n }", "private int checkRow() {\n for (int i = 0; i < 3; i++) {\n if ((this.board[0][i] == this.board[1][i]) && (this.board[0][i] == this.board[2][i])) {\n return this.board[0][i];\n }\n }\n return 0;\n }", "@Override\n public boolean moveBlock(Box pos) {\n if (indexPossibleBlock == 1) {\n if (pos.getCounter() == 3)\n completeTowers++;\n pos.build(4);\n } else {\n super.moveBlock(pos);\n if (pos.getCounter() == 4)\n completeTowers++;\n }\n return true;\n }", "public boolean isFourOfAKind() {\n \n \treturn rankSet().size() ==2 && sameSet.size() == 1;\n }", "static boolean isFour(ArrayList<Card> c)\n {\n if(c.size() < 4)\n {\n return false;\n }\n \n for(int x = 0 ; x < c.size() - 3 ; x++)\n {\n if(c.get(x).getRank() == c.get(x+1).getRank() && c.get(x+1).getRank() == c.get(x+2).getRank() && c.get(x+2).getRank() == c.get(x+3).getRank())\n {\n return true;\n }\n } \n return false;\n }", "private boolean isDivisibleBy4(int year) {\n\t\treturn checkDivisibility(year,4);\n\t}", "private static boolean record_1_4(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"record_1_4\")) return false;\n while (true) {\n int c = current_position_(b);\n if (!record_1_4_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"record_1_4\", c)) break;\n }\n return true;\n }", "private boolean dia2HasFour(int row, int col) {\n boolean four = false;\n int colCount = 0;\n if (getBoard()[row][col] == null)\n return false;\n if (row < rows - 1 && col > 0)\n for (int i = row + 1, j = col - 1; i < rows && j > 0; i++, j--) {\n if (getBoard()[i][j] == null) {\n break;\n }\n if (getBoard()[row][col].equals(getBoard()[i][j])) {\n colCount++;\n } else {\n break;\n }\n }\n\n if (row > 0 && col < cols - 1)\n for (int i = row - 1, j = col + 1; i > 0 && j < cols; i--, j++) {\n if (getBoard()[i][j] == null) {\n break;\n }\n\n if (getBoard()[row][col].equals(getBoard()[i][j])) {\n colCount++;\n } else {\n break;\n }\n }\n if (colCount >= (winCount - 1)) {\n four = true;\n }\n return four;\n }", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "public void rowChecked(){\n\t\tint numRows = 0;\n\t\tboolean full;\n\t\tint row = well[0].length - 2;\n\t\twhile(!emptyRow(row)){\n\t\t\tfull = true;\n\t\t\tfor(int i = 0; i < well.length; i++){\n\t\t\t\tif(well[i][row] == Color.WHITE)\n\t\t\t\t\tfull = false;\n\t\t\t}\n\t\t\tif(full){\n\t\t\t\tdeleteRow(row);\n\t\t\t\tnumRows++;\n\t\t\t}\n\t\t\telse row--;\n\t\t}\n\t\tswitch(numRows){\n\t\t\tcase 0: break;\n\t\t\tcase 1: score += 100; break;\n\t\t\tcase 2: score += 200; break;\n\t\t\tcase 3: score += 400; break;\n\t\t\tcase 4: score += 800; break;\n\t\t\tcase 5: score += 1600; break;\n\t\t}\n\t}", "public boolean checkNotDone() {\n boolean notDone = false;\n blocksPut = 0;\n \n for(int y = 0; y < buildHeight+1; y++) {\n for(int z = 0; z < buildSize; z++) {\n for(int x = 0; x < buildSize; x++) {\n if(myIal.lookBlock(x, y, z).equals(\"air\")) {\n notDone = true;\n } else {\n blocksPut++;\n }\n }\n }\n }\n\n return notDone;\n }", "private boolean rowOkay(int row, int column) throws Exception {\n var clue = puzzle.getRowClue(row);\n var filledGroups = searchBoard.getFilledGroups(row, TraversalType.ROW);\n if(filledGroups.size() > clue.size()) {\n return false;\n }\n int availableSquares = puzzle.getColumns()-column-1;\n int tilesRequired;\n if(filledGroups.size() == 0) {\n tilesRequired = clue.size()-1;\n for(int s : clue) {\n tilesRequired += s;\n }\n } else {\n int index = filledGroups.size()-1;\n for(int i = 0; i < index; ++i) {\n if(!filledGroups.get(i).equals(clue.get(i))) {\n return false;\n }\n }\n if(filledGroups.get(index) > clue.get(index)) {\n return false;\n }\n if(searchBoard.getState(row, column) == CellState.EMPTY && !filledGroups.get(index).equals(clue.get(index))) {\n return false;\n }\n tilesRequired = clue.get(index)-filledGroups.get(index);\n tilesRequired += clue.size()-filledGroups.size();\n if(searchBoard.getState(row, column) == CellState.EMPTY) {\n --tilesRequired;\n }\n for(int i = index+1; i < clue.size(); ++i) {\n tilesRequired += clue.get(i);\n }\n }\n return availableSquares >= tilesRequired;\n }", "private boolean isInBlock(int number, int row, int col) {\n\t\trow = row - (row % 3);\n\t\tcol = col - (col % 3);\n\n\t\tfor (int i = row; i < row + 3; i++) {\n\t\t\tfor (int j = col; j < col + 3; j++) {\n\t\t\t\tif (getNumber(i, j) == number) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkRow(int num, int row) {\n for(int col = 0; col < 5; col++){\n if(numberGrid[row][col] == num){\n return false;\n }\n }\n return true;\n }", "private static boolean enum_block_4(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"enum_block_4\")) return false;\n while (true) {\n int c = current_position_(b);\n if (!enum_block_4_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"enum_block_4\", c)) break;\n }\n return true;\n }", "boolean isFourOfAKind();", "public static boolean isFourOfAKind(Hand hand)\n {\n\n List<Long> counted = hand.getCards().stream()\n .collect(Collectors.groupingBy(o -> o.getRank().toString(), Collectors.counting()))\n .values().stream().sorted().collect(Collectors.toList());\n if (counted.size() == 2 && counted.get(1) == 4)\n {\n return true;\n }\n return false;\n /*\n ----------------------------------------------\n Map<Rank, Integer> c = new HashMap<>();\n for (Card card : hand.getCards())\n {\n c.put(card.getRank(), 0);\n }\n for (Card card : hand.getCards())\n {\n c.put(card.getRank(), c.get(card.getRank()) + 1);\n }\n return c.containsValue(4);\n\n */\n /*int counter = 1;\n for (int i = 0; i < hand.getCards().size(); i++)\n {\n for (int j = 0; j <hand.getCards().size(); j++)\n {\n if ((i != j) && ((hand.getCards().get(i).getRank().toString()).compareTo(hand.getCards().get(j).getRank().toString()) == 0))\n {\n counter++;\n }\n\n }\n if (counter == 4) return true;\n else counter = 1;\n }*/\n\n\n\n //return false;\n }", "public static boolean isConsecutiveFour(int[] values) {\r\n\t\tint counter = 0;//brojac\r\n\t\tfor (int i = 0; i < values.length; i++) {\r\n\t\t\tint firstNumber = values[i];//vrijednost elementa niza\r\n\t\t\tcounter = 0;\r\n\t\t\t/*\r\n\t\t\t * petlja prolazi cetri sledece vrijednosti i ispituje da li su jednake toj vrijednosti\r\n\t\t\t * ako su jednake povecava brojac za 1\r\n\t\t\t */\r\n\t\t\tfor (int j = i; j < i + 4 && j < values.length; j++) {\r\n\t\t\t\tif (firstNumber == values[j]) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//ako je brojac 4, znaci da postoje 4 jednake uzastopne vrijednosti i vraca true\r\n\t\t\tif (counter == 4) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasBlockNumber();", "boolean hasBlockNumber();", "public int isConnectFour(){\n if(values.length < 4 && values[0].length < 4)\r\n return 0;\r\n // horizontal check\r\n for(int i = 0; i < values.length; i++){\r\n for(int j = 0; j < values[0].length - 3; j++){ // only check to 4th last column\r\n if(values[i][j] == 0)\r\n continue;\r\n else if(values[i][j] == 1 && values[i][j] == values[i][j + 1] && values[i][j] == values[i][j + 2] && values[i][j] == values[i][j + 3] ){ // check for 4 consecutive 1 matches\r\n tokenArray[i][j].setWinner(true); // set 4 tokens as winners\r\n tokenArray[i][j + 1].setWinner(true);\r\n tokenArray[i][j + 2].setWinner(true);\r\n tokenArray[i][j + 3].setWinner(true);\r\n return 1;\r\n }\r\n else if(values[i][j] == 2 && values[i][j] == values[i][j + 1] && values[i][j] == values[i][j + 2] && values[i][j] == values[i][j + 3] ){ // check for 4 consecutive 2 matches\r\n tokenArray[i][j].setWinner(true);\r\n tokenArray[i][j + 1].setWinner(true);\r\n tokenArray[i][j + 2].setWinner(true);\r\n tokenArray[i][j + 3].setWinner(true);\r\n return 2;\r\n }\r\n }\r\n }\r\n // vertical check\r\n for(int i = 0; i < values.length - 3; i++){ // only check to 4th last row\r\n for(int j = 0; j < values[0].length; j++){\r\n if(values[i][j] == 0)\r\n continue;\r\n else if(values[i][j] == 1 && values[i][j] == values[i + 1][j] && values[i][j] == values[i + 2][j] && values[i][j] == values[i + 3][j] ){ // check for 4 consecutive 1 matches\r\n tokenArray[i][j].setWinner(true);\r\n tokenArray[i + 1][j].setWinner(true);\r\n tokenArray[i + 2][j].setWinner(true);\r\n tokenArray[i + 3][j].setWinner(true);\r\n return 1;\r\n }\r\n else if(values[i][j] == 2 && values[i][j] == values[i + 1][j] && values[i][j] == values[i + 2][j] && values[i][j] == values[i + 3][j] ){ // check for 4 consecutive 2 matches\r\n tokenArray[i][j].setWinner(true);\r\n tokenArray[i + 1][j].setWinner(true);\r\n tokenArray[i + 2][j].setWinner(true);\r\n tokenArray[i + 3][j].setWinner(true);\r\n return 2;\r\n }\r\n }\r\n }\r\n // diagonal check (top-left to bottom-right)\r\n for(int i = 0; i < values.length - 3; i++){ // only check to 4th last row\r\n for(int j = 0; j < values[0].length - 3; j++){ // only check to 4th last column\r\n if(values[i][j] == 0)\r\n continue;\r\n else if(values[i][j] == 1 && values[i][j] == values[i + 1][j + 1] && values[i][j] == values[i + 2][j + 2] && values[i][j] == values[i + 3][j + 3] ){ // check for 4 consecutive 1 matches\r\n tokenArray[i][j].setWinner(true);\r\n tokenArray[i + 1][j + 1].setWinner(true);\r\n tokenArray[i + 2][j + 2].setWinner(true);\r\n tokenArray[i + 3][j + 3].setWinner(true);\r\n return 1;\r\n }\r\n else if(values[i][j] == 2 && values[i][j] == values[i + 1][j + 1] && values[i][j] == values[i + 2][j + 2] && values[i][j] == values[i + 3][j + 3] ){ // check for 4 consecutive 2 matches\r\n tokenArray[i][j].setWinner(true);\r\n tokenArray[i + 1][j + 1].setWinner(true);\r\n tokenArray[i + 2][j + 2].setWinner(true);\r\n tokenArray[i + 3][j + 3].setWinner(true);\r\n return 2;\r\n }\r\n }\r\n }\r\n // diagonal check (top-right to bottom-left)\r\n for(int i = 0; i < values.length - 3; i++){\r\n for(int j = 3; j < values[0].length; j++){\r\n if(values[i][j] == 0)\r\n continue;\r\n else if(values[i][j] == 1 && values[i][j] == values[i + 1][j - 1] && values[i][j] == values[i + 2][j - 2] && values[i][j] == values[i + 3][j - 3] ){ // check for 4 consecutive 1 matches\r\n tokenArray[i][j].setWinner(true);\r\n tokenArray[i + 1][j - 1].setWinner(true);\r\n tokenArray[i + 2][j - 2].setWinner(true);\r\n tokenArray[i + 3][j - 3].setWinner(true);\r\n return 1;\r\n }\r\n else if(values[i][j] == 2 && values[i][j] == values[i + 1][j - 1] && values[i][j] == values[i + 2][j - 2] && values[i][j] == values[i + 3][j - 3] ){ // check for 4 consecutive 2 matches\r\n tokenArray[i][j].setWinner(true);\r\n tokenArray[i + 1][j - 1].setWinner(true);\r\n tokenArray[i + 2][j - 2].setWinner(true);\r\n tokenArray[i + 3][j - 3].setWinner(true);\r\n return 2;\r\n }\r\n }\r\n }\r\n return 0;\r\n }", "private boolean wellFormed() {\n\n\n\t\t\tGroup e = this;\n\n\t\t\tint i = 0;\n\t\t\tif(e.first == null && e.last == null && e.size == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\n\t\t\tCard p = e.first;\n\t\t\tboolean check = false;\n\t\t\tif(e.first != null && e.last != null) {\n\t\t\t\tCard n = null;\n\t\t\t\tif(e.first.prev != null) return report(\"There is a loop\");\n\n\t\t\t\tfor(p = e.first; p.next != null; p = p.next) {\n\n\t\t\t\t\tn = p.next;\n\n\t\t\t\t\tif(n.prev != p) return report(\"p.next is null\");\n\t\t\t\t\tif(this != p.group) {\n\t\t\t\t\t\treturn report(\"this is not set to the group\");\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t\t\t\tif(e.last.next != null) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\n\t\t\t\tfor(Card c = e.first; c.next != null; c = c.next) {\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t\tif(i != this.size-1) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tcheck = true;\n\t\t\t}\n\t\t\tif(check != true) {\n\t\t\t\tif(i != this.size) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tif(e.first == null || e.last == null) {\n\t\t\t\t\treturn report(\"Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "private int fourOfaKind() {\n\t\tif (hand[1].getValueIndex() == hand[2].getValueIndex() && hand[2].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\tif (hand[0].getValueIndex() == hand[1].getValueIndex()\n\t\t\t\t\t|| hand[4].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\t\tresult.setPrimaryValuePos(hand[3].getValueIndex());\n\t\t\t\t\n\t\t\t\tif( result.getPrimaryValuePos() == hand[4].getValueIndex()) {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[0].getValueIndex());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[4].getValueIndex());\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "boolean horizontalWin(){\n\t\tint match_counter=1;\n\t\tboolean flag=false;\n\t\tfor(int row=0;row<9;row++){\n\t\t\tfor(int column=0;column<25;column++){\n\t\t\t\tif(Board[row][column]!='\\u0000'){\n\t\t\t\t\tif(Board[row][column]!='O'){\n\t\t\t\t\t\tif (Board[row][column]==Board[row][column+1]){\n\t\t\t\t\t\t\tmatch_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(match_counter==4){\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn flag;\n\t}", "private boolean rowCheck() {\n\t\tfor(int[] row : puzzle) {\n\t\t\tfor(int i = 0; i < row.length; i++) {\n\t\t\t\tif(row[i] != 0) {\n\t\t\t\t\tfor(int j = i + 1; j < row.length; j++) {\n\t\t\t\t\t\tif(row[i] == row[j])\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isRowFixed(int row) {\n if (row == -1) {\n row += 1;\n } else if (row == nRows) {\n row -= 1;\n }\n for (int x = 0; x < nCols; x++) {\n if (isTileFixed(row, x)) { //Check for frozen etc.\n return true;\n }\n }\n return false; // See bottom for commented out code...\n }", "public boolean percolates(){\n \tif(this.gridLength == 1){\n \t\treturn isOpen(1,1);\n \t}\n \treturn (this.bottom[unionTest.find(0)]);\n }", "public static void isFour(String clue, int local, int clueNum)\r\n {\r\n //If top (1) or bottom (3) input\r\n if(local == 1 || local == 3)\r\n {\r\n //Repeat for size of grid\r\n for(int k=0; k<GRID; k++)\r\n {\r\n //If spot in grid is equal to four\r\n if(clue.charAt(k) == '4')\r\n {\r\n //If clue is for top\r\n if(local == 1)\r\n {\r\n int num = 1;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[d][k] = num;\r\n num++;\r\n } \r\n }\r\n //If clue is for bottom\r\n if (local == 3)\r\n {\r\n int num = 4;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[d][k] = num;\r\n num--;\r\n } \r\n }\r\n }\r\n }\r\n }\r\n else if (local == 2)\r\n {\r\n \r\n if(clue.charAt(0) == '4')\r\n {\r\n int num = 1;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[clueNum][d] = num;\r\n num++;\r\n } \r\n }\r\n if(clue.charAt(1) == '4')\r\n {\r\n int num = 4;\r\n for(int d=0; d<GRID; d++)\r\n {\r\n puzzle[clueNum][d] = num;\r\n num--;\r\n }\r\n } \r\n }\r\n }", "public boolean isWin() {\n int counter = 0;\n\n for (int num : maskResultArray) {\n if (num == 1) counter++;\n }\n\n if (counter == 4) return true;\n return false;\n }", "private boolean checkRows(char playerSymbol) {\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (grid[j][i].getSymbol() == playerSymbol)\n count++;\n }\n if (count == N)\n return true;\n count = 0;\n }\n return false;\n }", "private boolean rowWin (){ \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tif (checkValue (board[i][0], board[i][1], board[i][2])){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false; \r\n\t}", "private boolean isChoseFine(){\n if(freeSpaces.size()!=2 & freeSpaces.size()!=3){ //if the number of chosen spaces is not 3 or 2, that means it can't be good.\n return false;\n }\n else if(freeSpaces.size()==2){ //if there are 2.\n if(freeSpaces.elementAt(0).place.distance(freeSpaces.elementAt(1).place)==1)\n return true;\n else //if the distance between the spaces isn't 1, that means it can't be two suite spaces.\n return false;\n }\n else{ //if there are 3.\n //get the all 3 elements.\n int aX = freeSpaces.elementAt(0).place.x;\n int aY = freeSpaces.elementAt(0).place.y;\n int bX = freeSpaces.elementAt(1).place.x;\n int bY = freeSpaces.elementAt(1).place.y;\n int cX = freeSpaces.elementAt(2).place.x;\n int cY = freeSpaces.elementAt(2).place.y;\n if(aX==bX && bX==cX){ //if they are in the same column.\n int min = Math.min(aY, Math.min(bY, cY));\n int max = Math.max(aY, Math.max(bY, cY));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else if(aY==bY && bY==cY){ //if they are in the same row.\n int min = Math.min(aX, Math.min(bX, cX));\n int max = Math.max(aX, Math.max(bX, cX));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else //if they are in different rows and columns, so it isn't good.\n return false;\n }\n }", "private boolean blockCheck(int r, int c, int n)\r\n {\r\n int row = (r/3)*3, col = (c/3)*3; //The corner position of the block where (r,c) is\r\n for(int i = row; i < row+3; i++)\r\n for(int j = col; j < col+3; j++)\r\n if(game[i][j] == n)\r\n return false;\r\n return true;\r\n }", "public boolean work() {\n // get the next block so the cart knows where to mine\n Vec3 next = getNextblock();\n // save thee coordinates for easy access\n int x = (int) next.xCoord;\n int y = (int) next.yCoord;\n int z = (int) next.zCoord;\n\n // loop through the blocks in the \"hole\" in front of the cart\n\n for (int i = -getRange(); i <= getRange(); i++) {\n for (int j = -getRange(); j <= getRange(); j++) {\n // calculate the coordinates of this \"hole\"\n int coordX = x + i;\n int coordY = y - 1;\n int coordZ = z + j;\n\n if (farm(coordX, coordY, coordZ)) {\n return true;\n } else if (till(coordX, coordY, coordZ)) {\n return true;\n } else if (plant(coordX, coordY, coordZ)) {\n return true;\n }\n }\n }\n\n return false;\n }", "public boolean isFull() {\n\t\tfor (int r = 0; r < 3; r++) {\n\t\t\tif (!isRowFull(r)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tover = true;\n\t\treturn true;\n\t}", "public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) {\n\t\tint l = 0;\n\n\t\tif (par1World.getBlock(par2 - 1, par3, par4) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\tif (par1World.getBlock(par2 + 1, par3, par4) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\tif (par1World.getBlock(par2, par3, par4 - 1) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\tif (par1World.getBlock(par2, par3, par4 + 1) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\treturn l > 1 ? false : (this.isThereANeighborChest(par1World, par2 - 1, par3, par4) ? false : (this.isThereANeighborChest(par1World, par2 + 1, par3,\n\t\t\t\tpar4) ? false : (this.isThereANeighborChest(par1World, par2, par3, par4 - 1) ? false : !this.isThereANeighborChest(par1World, par2, par3,\n\t\t\t\tpar4 + 1))));\n\t}", "protected boolean fullLine(int row) {\n\t\t// goes through columns in that row specified\n\t\tfor(int j = 0; j < blockMatrix[row].length; j++) { \n\t\t\t// returns false when there's an empty position\n\t\t\tif(!hasBlock(row, j)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "public boolean percolates() {\n // bottom row (grid[n - 1][0] ... grid[n - 1][n - 1])\n for (int j = 1; j <= size; j++) {\n // StdOut.println(\"j: \"+j+\" isOpen: \"+ isOpen(size, j) +\n // \" isFull: \" + isFull(size, j));\n if (isFull(size, j)) {\n return true;\n }\n }\n return false;\n }", "public boolean row(){\n\t\t\r\n\t\tfor (int j = 1; j < Board.length; j++){\r\n\t\t\tfor (int k = 0; k < Board.length-2; k++){\r\n\t\t\t\tif (Board[j][k].charAt(2) != Board[j][k+1].charAt(2))\r\n\t\t\t\t\tbreak;\r\n\t\t\t\telse if (Board[j][k].charAt(2) == '_')\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif (k == Board.length-3){\r\n\t\t\t\t\tthis.winner = Board[j][k].charAt(2);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean rowFilled(int row){\n\t\tfor(int x = 0; x < this.tile[row].length; x++){\n\t\t if(!this.isFilled(row, x)){\n\t\t return false;\n\t\t }\n\t\t}\n\t\treturn true;\n\t}", "public boolean percolates() {\n if (grid.length == 1) {\n return isOpen(1, 1);\n }\n return uf.find(grid.length * grid.length) == uf.find(grid.length * grid.length + 1);\n }", "private Boolean canWinInColumn(PentagoBoard b, int column, Color who) {\n\t\tint amount=0;\n \tfor(int i=0; i<b.getSize(); i++) {\n\t\t\tif(b.getState(column,i) == Color.EMPTY || b.getState(column,i) == who) {\n\t\t\t\tamount++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tamount=0;\n \t}\n \tif(amount>4)\n \t\treturn true;\n \telse\n \t\treturn false;\n }", "public boolean isThreeOfAKind() {\r\n\r\n return getHighestConsecutive() == 3;\r\n }", "private boolean correctRowNumber()\n {\n \n extraRows = 0;\n final int oldSize = gradeAndSemesterList.size()-1+extraRows;\n \n \n if(gradeAndSemesterList.get(gradeAndSemesterList.size()-1).type2.ordinal()< 2)\n extraRows += 2 - gradeAndSemesterList.get(gradeAndSemesterList.size()-1).type2.ordinal();\n \n extraRows += 3*(this.extraGradeLevel-gradeAndSemesterList.get(gradeAndSemesterList.size()-1).type1.intValue());\n //Debug.line(\"extra rows post correction:\"+extraRows);\n \n \n this.fireTableRowsDeleted(gradeAndSemesterList.size()-1+extraRows, oldSize);\n return true; \n }", "private boolean isThereANeighborChest(World par1World, int par2, int par3, int par4) {\n\t\treturn par1World.getBlock(par2, par3, par4) != this ? false : (par1World.getBlock(par2 - 1, par3, par4) == this ? true : (par1World.getBlock(par2 + 1,\n\t\t\t\tpar3, par4) == this ? true : (par1World.getBlock(par2, par3, par4 - 1) == this ? true : par1World.getBlock(par2, par3, par4 + 1) == this)));\n\t}", "public static boolean hasFourOfAKind(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter==6){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isPair() {\n \t\n return (rankSet().size() ==4);\n }", "public static boolean isPowerof4(int num){\n\t\tif (Math.pow(4,16) % num == 0 && (num-1) % 3 == 0){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean percolates() {\n\t\tint top = uf.find(0);\n\t\tint bottom = uf.find(size * size + 1);\n\t\treturn top == bottom;\n\t}", "private boolean checkMatch(InventoryCrafting inventoryCrafting,IInventory schematic, int par2, int par3, boolean par4) {\r\n\t\tfor (int k = 0; k < 5; ++k) {\r\n\t\t\tfor (int l = 0; l < 5; ++l) {\r\n\t\t\t\tint i1 = k - par2;\r\n\t\t\t\tint j1 = l - par3;\r\n\t\t\t\tItemStack itemstack = null;\r\n\r\n\t\t\t\tif (i1 >= 0 && j1 >= 0 && i1 < this.recipeWidth && j1 < this.recipeHeight) {\r\n\t\t\t\t\tif (par4) {\r\n\t\t\t\t\t\titemstack = this.recipeItems[this.recipeWidth - i1 - 1 + j1 * this.recipeWidth];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\titemstack = this.recipeItems[i1 + j1 * this.recipeWidth];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tItemStack itemstack1 = inventoryCrafting.getStackInRowAndColumn(k, l);\r\n\r\n\t\t\t\tif (itemstack1 != null || itemstack != null) {\r\n\t\t\t\t\tif (itemstack1 == null && itemstack != null || itemstack1 != null && itemstack == null) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (itemstack.getItem() != itemstack1.getItem()) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (itemstack.getItemDamage() != 32767 && itemstack.getItemDamage() != itemstack1.getItemDamage()) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// for debugging\r\n\t\t/* if(schematicTypeNeeded != null)\r\n\t\t * System.out.println(schematicTypeNeeded.getUnlocalizedName());\r\n\t\t * else System.out.println(\"null type needed\"); */\r\n\r\n\t\t// if there is no specilness needed, just return true\r\n\t\tif (schematicTypeNeeded == null) return true;\r\n\r\n\t\tItemStack schematicStack = schematic.getStackInSlot(0);\r\n\t\t\r\n\t\tif (schematicStack == null) return false;\r\n\r\n\t\tSystem.out.println(schematicStack.getUnlocalizedName());\r\n\r\n\t\tSystem.out.println(\"[NausicaaMod] block that needs schematic\");\r\n\r\n\t\tif (!schematicStack.hasTagCompound()) {\r\n\t\t\tSystem.out.println(\"[NausicaaMod] crafting canceled: no tags\");\r\n\t\t\treturn false;\r\n\r\n\t\t} else if (!SchematicHolder.getCanCraft(schematicStack, schematicTypeNeeded)) {\r\n\t\t\tSystem.out.println(\"[NausicaaMod] crafting canceled\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}", "private static boolean model_block_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"model_block_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = model_block_4_0_0(b, l + 1);\n if (!r) r = comment(b, l + 1);\n if (!r) r = consumeToken(b, EOL);\n exit_section_(b, m, null, r);\n return r;\n }", "public boolean IsDisappearing(){\r\n for (int i = 2; i < 10; i++) {\r\n ArrayList<Block> blocks = blockList.GetBlockList(i);//get all blocks\r\n int[] indexI = new int[blocks.size()], indexJ = new int[blocks.size()];\r\n //put i and j of All blocks with same color on i&j arrays\r\n for (int j = 0; j < indexI.length; j++) {\r\n indexI[j] = blocks.get(j).getI();\r\n indexJ[j] = blocks.get(j).getJ();\r\n }\r\n //check if 2 block beside each other if yes return true\r\n if (CheckBoom(indexI, indexJ))\r\n return true;\r\n else if (blocks.size() == 3) {//else check if there is another block have same color if yes swap on i,j array\r\n int temp = indexI[2];\r\n indexI[2] = indexI[1];\r\n indexI[1] = temp;\r\n temp = indexJ[2];\r\n indexJ[2] = indexJ[1];\r\n indexJ[1] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n else {//else check from another side\r\n temp = indexI[0];\r\n indexI[0] = indexI[2];\r\n indexI[2] = temp;\r\n temp = indexJ[0];\r\n indexJ[0] = indexJ[2];\r\n indexJ[2] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n }\r\n }\r\n }\r\n //if not return true so its false\r\n return false;\r\n }", "public boolean isTotallyOnGrid() {\n\t\t\tfor(int i=0; i<4; i++) {\n\t\t\t\tif(position.y + i >= 0)\n\t\t\t\t\treturn true; //everything from here down is on grid\n\t\t\t\t// this row is above grid so look for non-empty squares\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tif(squares[i][j])\n\t\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tSystem.err.println(\"TetrisPiece.isTotallyOnGrid internal error\");\n\t\t\treturn false;\n\t\t}", "public boolean ident() {\n clear();\n for (int i = 0; i < 4; i++) {\n double[] toAdd = new double[4];\n for (int j = 0; j < 4; j++) {\n if (j == i) {\n toAdd[j] = 1;\n } else {\n toAdd[j] = 0;\n }\n }\n mat.add(toAdd);\n }\n maxCols = mat.size();\n return true;\n }", "private boolean columnOkay(int row, int column) throws Exception {\n ArrayList<Integer> clue = puzzle.getColumnClue(column);\n var filledGroups = searchBoard.getFilledGroups(column, TraversalType.COLUMN);\n if(filledGroups.size() > clue.size()) {\n return false;\n }\n int availableSquares = puzzle.getRows()-row-1;\n int tilesRequired;\n if(filledGroups.size() == 0) {\n tilesRequired = clue.size()-1;\n for(int s : clue) {\n tilesRequired += s;\n }\n } else {\n int index = filledGroups.size()-1;\n if(filledGroups.get(index) > clue.get(index)) {\n return false;\n }\n if(searchBoard.getState(row, column) == CellState.EMPTY && !filledGroups.get(index).equals(clue.get(index))) {\n return false;\n }\n tilesRequired = clue.get(index)-filledGroups.get(index);\n tilesRequired += clue.size()-filledGroups.size();\n if(searchBoard.getState(row, column) == CellState.EMPTY) {\n --tilesRequired;\n }\n for(int i = index+1; i < clue.size(); ++i) {\n tilesRequired += clue.get(i);\n }\n }\n return availableSquares >= tilesRequired;\n }", "public boolean percolates() {\n return (uf.find(count * count) == uf.find(count * count + 1));\n }", "private void check4(){\n \n if (errorCode == 0){\n int sum = 0;\n \n for(int i = 0; i < number.length();){\n sum += Integer.parseInt(number.substring(i, ++i));\n }\n \n if (sum % 4 != 0){\n valid = false;\n errorCode = 4;\n }\n }\n\t}", "private boolean done() {\n\n // If there is a false, then there are still gaps\n for (boolean[] row : board) {\n for (boolean item : row) {\n if (!item) return false;\n }\n }\n return true;\n }", "static boolean ifSafe(int[] placement, int row) {\n\t\tfor(int j = 0; j < row; j++) {\n\t\t\tif(placement[j] == placement[row]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tint columnDiff = placement[row] - placement[j];\n\t\t\tint rowDiff = row - j;\n\t\t\tif(columnDiff == rowDiff) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\t\n\t}", "public boolean hasQuads(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 4);\r\n\t\t\r\n\t\t\r\n\t}", "public static boolean hcheck() {\n for (int j = 0; j < card.length; j++) {\n int sum = 0;\n for (int i = 0; i < card.length; i++) { // rows\n sum = sum + card[j][i]; // last sum plus the number in the cordinate\n }\n if (sum == 0) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n }\n\n }\n return false;\n\n }", "boolean hasRowLayout();", "public boolean isWin_DragonKingOfArms(){\r\n // player got LordSelachii card\r\n /*Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 5) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }*/\r\n int count = 0;\r\n for(TroubleMarker troubleMarker : discWorld.getTroubleMarker_HASH().values()){\r\n if(troubleMarker.getAreaNumber() != ConstantField.DEFAULT_PIECE_AREA_NUMBER){\r\n count++;\r\n }\r\n }\r\n \r\n if(count >= 8){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n \r\n }", "public boolean formatCheck()\n\t{\n\t\t// The freeList has to be 2 or greater since the first block (index 0)\n\t\t// is the SuperBlock, and the the second block (index 1) contains\n\t\t// information about Inodes.\n\t\tif (totalBlocks != Kernel.NUM_BLOCKS || totalInodes <= 0 || \n\t\t\tfreeList < 2 || freeList >= totalBlocks && \n\t\t\tlastFreeBlock < 2 || lastFreeBlock >= totalBlocks)\n\t\t{\n\t\t\ttotalBlocks = Kernel.NUM_BLOCKS;\n\t\t\tlastFreeBlock = totalBlocks - 1;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isFourConnected(Utils.Player player, int x, int y, int row, int col, int count) {\n if (count >= COUNT_CELLS_FOR_WIN) {\n return true;\n }\n\n if (col < 0 || col >= mColsCount || row < 0 || row >= mRowsCount) {\n return false;\n }\n\n int result = 0;\n if (mCells[row][col].getPlayer() == player) {\n result = count + 1;\n }\n\n return isFourConnected(player, x, y, row + y, col + x, result);\n }", "private boolean check3Horizontal(int i, int j) {\n if(stateArray[i][j] == stateArray[i][j+1] && stateArray[i][j] == stateArray[i][j+2]) {\n return true;\n }\n return false;\n }", "public boolean canBlockStay(World var1, int var2, int var3, int var4)\n {\n boolean var5 = true;\n\n if (this.CheckLevel(var1.getBlockMetadata(var2, var3, var4)))\n {\n return var1.getBlock(var2, var3 - 1, var4) == FABlockRegistry.ferns; //fernblock below\n }\n else\n {\n var5 = var1.getBlock(var2, var3 - 1, var4) == Blocks.grass && CheckUnderTree(var1, var2, var3, var4);//on grass, under tree\n\n if (this.HasLv2(var1.getBlockMetadata(var2, var3, var4)))\n {\n var5 &= var1.getBlock(var2, var3 + 1, var4) == FABlockRegistry.ferns; //and has the upper block it needs//fernUpper\n }\n\n return var5;\n }\n }", "private boolean isSquareQuantityValid() {\n int blueSquares = 0;\n int yellowSquares = 0;\n int greenSquares = 0;\n int whiteSquares = 0;\n int orangeSquares = 0;\n int redSquares = 0;\n\n for (RubiksFace face : rubiksFaceList) {\n for (RubiksColor color : face.getRubiksColors()) {\n switch(color) {\n case RED:\n redSquares++;\n break;\n case GREEN:\n greenSquares++;\n break;\n case BLUE:\n blueSquares++;\n break;\n case YELLOW:\n yellowSquares++;\n break;\n case ORANGE:\n orangeSquares++;\n break;\n case WHITE:\n whiteSquares++;\n break;\n }\n }\n }\n\n System.out.println(\"BLUE: \" + blueSquares);\n System.out.println(\"YELLOW: \" + yellowSquares);\n System.out.println(\"GREEN: \" + greenSquares);\n System.out.println(\"WHITE: \" + whiteSquares);\n System.out.println(\"ORANGE: \" + orangeSquares);\n System.out.println(\"RED: \" + redSquares);\n\n return (blueSquares == 9 && yellowSquares == 9 && greenSquares == 9 && whiteSquares == 9 && orangeSquares == 9 && redSquares == 9);\n }", "public Chip checkFour(int row, int col, int ord) {\n Chip checker = (ord == 1) ? Chip.RED : Chip.BLUE;\n // check vertically\n if (row <= (this.getRows() - 4)) {\n if (this.getBoard()[row+1][col].equals(checker) && this.getBoard()[row+2][col].equals(checker) &&\n this.getBoard()[row+3][col].equals(checker)) {\n return checker;\n }\n }\n // check horizontally\n if (col <= (this.getColumns() - 4)) {\n if (this.getBoard()[row][col+1].equals(checker) && this.getBoard()[row][col+2].equals(checker) &&\n this.getBoard()[row][col+3].equals(checker)) {\n return checker;\n }\n }\n // check diagonally: top left to bottom right\n if (row <= (this.getRows() - 4) && col <= (this.getColumns() - 4)) {\n if (this.getBoard()[row+1][col+1].equals(checker) && this.getBoard()[row+2][col+2].equals(checker) &&\n this.getBoard()[row+3][col+3].equals(checker)) {\n return checker;\n }\n }\n // check diagonally: top right to bottom left\n if (row <= (this.getRows() - 4) && col >= 3) {\n if (this.getBoard()[row+1][col-1].equals(checker) && this.getBoard()[row+2][col-2].equals(checker) &&\n this.getBoard()[row+3][col-3].equals(checker)) {\n return checker;\n }\n }\n\n // if none of the checks is satisfied, return EMPTY;\n return Chip.EMPTY;\n }", "@Override\n public boolean isFull() {\n return this.count() == 5;\n }", "public boolean isBlockSolved(Block block) {\n ArrayList<Integer> numbers = new ArrayList<Integer>();\n for (int i = 1; i < 10; i++) {\n numbers.add(i);\n }\n\n for (int i = 0; i < 9; i++) {\n \t\tif(block.getUserNum(i).size() != 1 && block.getNum(i) < 0) {\n \t\t\treturn false;\n \t\t}\n \t\tif (block.getNum(i) < 0) {\n\t \t\tif (numbers.indexOf(block.getUserNum(i).get(0)) < 0) {\n\t \t\t\treturn false;\n\t \t\t}else {\n\t \t\t\tnumbers.remove(block.getUserNum(i).get(0));\n\t \t\t}\n \t\t}else {\n \t\t\tif (numbers.indexOf(block.getNum(i)) < 0) {\n\t \t\t\treturn false;\n\t \t\t}else {\n\t \t\t\tnumbers.remove((Integer)block.getNum(i));\n\t \t\t}\n \t\t}\n }\n\n if (!numbers.isEmpty()) {\n return false;\n }\n\n return true;\n }", "boolean nextLevel() {\r\n\t\treturn this.ship.getRow() == 0 && this.ship.getCol() == this.board.getDimCol() - 1;\r\n\t}", "boolean complete() {\n\t\tint sizes = 1;\n\n\t\tfor (int i = 0; i <= matrix.length - 1; i++) {\n\t\t\tfor (int j = 4; j >= sizes; j--) {\n\t\t\t\tint cost = getCost(i,j);\n\t\t\t\tif (cost == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsizes = sizes + 1;\n\t\t}\n\t\treturn true;\n\t}", "public boolean check3DRowDiagnol(Cell play) {\n\t\tfor(int row = 0; row < board.length; row++) { // for row\n\t\t\tif(board[0][row][0] == board[1][row][1] && board[1][row][1] == board[2][row][2] && board[2][row][2] == board[3][row][3] && board[3][row][3].equals(play) ||\n\t\t\t\t\tboard[0][row][3] == board[1][row][2] && board[1][row][2] == board[2][row][1] && board[2][row][1] == board[3][row][0] && board[3][row][0].equals(play)){ //for dim & col || dim & #-col\n\t\t\t\t//\t\t\t\tSystem.out.println(\"3D diagnol row win by \"+play.toString()+ \" at row=\" + row);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public static boolean isWrongUserRow()\n {\n boolean isWrong=false;\n int aux; // Guarda la suma de la fila.\n \n for (int i = 0; i < BOARD_HEIGHT; i++)\n {\n aux = 0; // Lo inicializamos para cada fila.\n for (int j = 0; j < BOARD_WIDTH; j++)\n {\n aux = aux + playerBoardPos[i][j]; // Sumamos el valor de la casilla al aux.\n }\n if (!(aux == 10)) // Si el aux no tiene un 10 significa que hay un numero repetido.\n {\n isWrong = true; // Activamos el boolean de numero repetido.\n }\n }\n return isWrong;\n }", "private boolean nextPermutation(int row) {\n \tint rightMostBlockSize = rowHints.get(row).get(rowHints.get(row).size() - 1);\n \tif (rightMostBlockSize == 0) return false;\n \tint[] vector = matrix[row];\n \tif (vector[0] == UNKNOWN) {\n \t\tfirstPermutationWithPredictions(row); // could be changed to firstPermutation(row) if no predictions shall be made.\n \t\treturn true;\n \t}\n \t// First step: find the starting position of the rightmost block\n \tint rightMostBlockPosition = vector.length - 1;\n \twhile (vector[rightMostBlockPosition] == EMPTY && rightMostBlockPosition > 0) {\n \t\trightMostBlockPosition--;\n \t}\n \trightMostBlockPosition -= rightMostBlockSize - 1;\n \t// if there is empty space after rightmost block\n \tif (rightMostBlockPosition + rightMostBlockSize < vector.length) { \n \t\t// move the last block to the right by 1 unit --> this is the next permutation\n \t\tvector[rightMostBlockPosition] = EMPTY;\n \t\tvector[rightMostBlockPosition + rightMostBlockSize] = FILLED;\n \t\treturn true;\n \t}\n \t// If there is no space after the rightmost block: \n \t// try to find the next block from the right that can be moved to the right\n \tint i = rightMostBlockPosition - 2; // it is at least 2 units further away (there is always a space between blocks)\n \tif (i < 0) return false; // if there is no such block: no more permutations possible\n \tint emptyCells = 1; // count the empty cells between blocks\n \t// do until we found a block and there are at least 2 spaces right to it\n \twhile(vector[i] == EMPTY || vector[i+1] != EMPTY || vector[i+2] != EMPTY) {\n \t\tif (vector[i] == EMPTY) emptyCells++;\n \t\telse emptyCells = 0;\n \t\ti--;\n \t\tif (i < 0) return false;\n \t}\n \tif (emptyCells < 1) return false; // if there is not at least 1 space: no more permutations\n \tint filledCells = 1; // now count the size of the block we found (it's at least 1 unit long)\n \twhile (i > 0 && vector[i-1] == FILLED) {\n \t\tfilledCells++;\n \t\ti--;\n \t}\n \tvector[i] = EMPTY; // \"move\" the found block 1 unit to right\n \tvector[i + filledCells] = FILLED;\n \t// move all the other blocks as far to the left as possible (zeros is used as offset basically)\n \t// the +2 / -2 is there because starting from the rightmost side of the found block (i + ones), \n \t// we don't just need to go 1 unit to the right, but 2, since there is a space between each block.\n \tfor (int j = i + filledCells + 2; j < vector.length - emptyCells + 2; j++) {\n \t\tif (j != j + emptyCells - 2) {\n\t \t\tvector[j] = vector[j + emptyCells - 2];\n\t \t\tvector[j + emptyCells - 2] = EMPTY;\n \t\t}\n \t}\n \treturn true;\n }", "public static boolean isLegal(int[][] board) {\nif (!isRectangleLegal(board, 0, 2, 0, 2, \"Block 1\")) return false;\nif (!isRectangleLegal(board, 3, 5, 0, 2, \"Block 2\")) return false;\nif (!isRectangleLegal(board, 6, 8, 0, 2, \"Block 3\")) return false;\nif (!isRectangleLegal(board, 0, 2, 3, 5, \"Block 4\")) return false;\nif (!isRectangleLegal(board, 3, 5, 3, 5, \"Block 5\")) return false;\nif (!isRectangleLegal(board, 6, 8, 3, 5, \"Block 6\")) return false;\nif (!isRectangleLegal(board, 0, 2, 6, 8, \"Block 7\")) return false;\nif (!isRectangleLegal(board, 3, 5, 6, 8, \"Block 8\")) return false;\nif (!isRectangleLegal(board, 6, 8, 6, 8, \"Block 9\")) return false;\n \n// check the nine columns\nif (!isRectangleLegal(board, 0, 0, 0, 8, \"Column 0\")) return false;\nif (!isRectangleLegal(board, 1, 1, 0, 8, \"Column 1\")) return false;\nif (!isRectangleLegal(board, 2, 2, 0, 8, \"Column 2\")) return false;\nif (!isRectangleLegal(board, 3, 3, 0, 8, \"Column 3\")) return false;\nif (!isRectangleLegal(board, 4, 4, 0, 8, \"Column 4\")) return false;\nif (!isRectangleLegal(board, 5, 5, 0, 8, \"Column 5\")) return false;\nif (!isRectangleLegal(board, 6, 6, 0, 8, \"Column 6\")) return false;\nif (!isRectangleLegal(board, 7, 7, 0, 8, \"Column 7\")) return false;\nif (!isRectangleLegal(board, 8, 8, 0, 8, \"Column 8\")) return false;\n \n// check the nine rows\nif (!isRectangleLegal(board, 0, 8, 0, 0, \"Row 0\")) return false;\nif (!isRectangleLegal(board, 0, 8, 1, 1, \"Row 1\")) return false;\nif (!isRectangleLegal(board, 0, 8, 2, 2, \"Row 2\")) return false;\nif (!isRectangleLegal(board, 0, 8, 3, 3, \"Row 3\")) return false;\nif (!isRectangleLegal(board, 0, 8, 4, 4, \"Row 4\")) return false;\nif (!isRectangleLegal(board, 0, 8, 5, 5, \"Row 5\")) return false;\nif (!isRectangleLegal(board, 0, 8, 6, 6, \"Row 6\")) return false;\nif (!isRectangleLegal(board, 0, 8, 7, 7, \"Row 7\")) return false;\nif (!isRectangleLegal(board, 0, 8, 8, 8, \"Row 8\")) return false;\nreturn true;\n }", "public static boolean is3InRow(char mark) {\n\t\treturn (board[0][0] == mark && board[1][0] == mark && board[2][0] == mark)\n\t\t\t\t|| (board[0][1] == mark && board[1][1] == mark && board[2][1] == mark)\n\t\t\t\t|| (board[0][2] == mark && board[1][2] == mark && board[2][2] == mark)\n\t\t\t\t|| (board[0][0] == mark && board[0][1] == mark && board[0][2] == mark)\n\t\t\t\t|| (board[1][0] == mark && board[1][1] == mark && board[1][2] == mark)\n\t\t\t\t|| (board[2][0] == mark && board[2][1] == mark && board[2][2] == mark)\n\t\t\t\t|| (board[0][0] == mark && board[1][1] == mark && board[2][2] == mark)\n\t\t\t\t|| (board[2][0] == mark && board[1][1] == mark && board[0][2] == mark);\n\t}", "private boolean checkLines(){\n\n for (int[] line : TwoPlayersActivity.lines) {\n\n if (field.get(line[0]).equals(field.get(line[1])) &&\n field.get(line[0]).equals(field.get(line[2])) &&\n !field.get(line[0]).getValue().equals(Cell.Value.NONE)){\n for (int index: line) {\n imageList.get(index).setBackgroundColor(Color\n .parseColor(TwoPlayersActivity.CELL_WIN_COLOR));\n }\n return true;\n }\n }\n return false;\n }", "private boolean isCompletedRow(int row)\n {\n for(int col = 0; col < grid.getNumCols(); col++)\n {\n if(grid.get(new Location(row, col)) == null)\n {\n return false;\n }\n }\n return true;\n }" ]
[ "0.7052126", "0.69862294", "0.6910216", "0.6761043", "0.6717233", "0.66906327", "0.64782345", "0.64753574", "0.64529455", "0.64507186", "0.6403053", "0.63344795", "0.63062155", "0.6305227", "0.62460196", "0.6243573", "0.62032586", "0.6192846", "0.61505514", "0.6145075", "0.6142281", "0.6124406", "0.61115646", "0.6109237", "0.6069852", "0.60680425", "0.60328436", "0.60204124", "0.60040903", "0.5993783", "0.59838676", "0.5981151", "0.59742785", "0.5958844", "0.595752", "0.5949288", "0.594771", "0.5941206", "0.5940721", "0.59395194", "0.59395194", "0.59363174", "0.59350395", "0.5923235", "0.5906623", "0.58599126", "0.5817702", "0.581633", "0.5813825", "0.58074445", "0.5803444", "0.5798141", "0.5789576", "0.5753499", "0.5753469", "0.5745319", "0.57400364", "0.5739342", "0.57304597", "0.5726526", "0.5725916", "0.57258964", "0.5717173", "0.5702962", "0.5679837", "0.567549", "0.56547874", "0.5649298", "0.56439537", "0.56285363", "0.56282485", "0.5623391", "0.5615608", "0.5614387", "0.55977505", "0.5591338", "0.5586804", "0.55807376", "0.5571874", "0.55681884", "0.55613405", "0.5560456", "0.55588984", "0.55577296", "0.55538493", "0.5550018", "0.5548291", "0.55464566", "0.55458194", "0.5544164", "0.554181", "0.55397063", "0.55390435", "0.5533996", "0.5530458", "0.5527885", "0.5518232", "0.5518076", "0.55157495", "0.55106956", "0.55064255" ]
0.0
-1
If I delete p, each piece in Piece[] must be dropped
public static Piece[] afterMath(Piece p){ return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllPieces()\n\t{\n\t\t/* iterate over the rows and columns */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tremovePiece(i, j);\n\t\t\t}\n\t\t}\n\t}", "private void removePiece(Piece piece) {\n addPiece(piece, piece.rowPosition, piece.columnPosition);\n }", "private void Drop(String[]p){\n List<DeputyTableItem> dti;\n dti = Drop1(p);\n for(DeputyTableItem item:dti){\n deputyt.deputyTable.remove(item);\n }\n }", "private void killPiece(Piece piece) {\r\n\t\tif (piece.getPlayer().color == Color.BLACK) {\r\n\t\t\tblack.removeElement(piece);\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhite.removeElement(piece);\r\n\t\t}\r\n\t\t\r\n\t}", "public static void removePieceList(String piece)\n\t{\n\t\tfor(int loop = 0; loop < 32; loop++)\n\t\t{\n\t\t\tif(pieceList[loop] == piece)\n\t\t\t{\n\t\t\t\tpieceList[loop] = \"\";\n\t\t\t}\n\t\t}\n\t}", "public void clearPieces(){\n for(int i =0; i<WIDTH;i++){\n for(int j = 0 ; j<HEIGHT;j++){\n piecesToSwap[i][j]=null;\n }\n }\n }", "@Test public void deletePentagonalPyramid()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n Assert.assertEquals(p1, pList.deletePentagonalPyramid(\"PP1\"));\n }", "void removePizza(Pizza p) {\n pizzas.remove(p);\n }", "public void DoRemoveFromNest(Holdable p);", "public void remove(Point p)\n {\n pellets.remove(p);\n }", "private void pieceDropped() {\n for (int i = 0; i < 4; ++i) {\n\n int x = curX + curPiece.x(i);\n int y = curY - curPiece.y(i);\n board[(y * BOARD_WIDTH) + x] = curPiece.getShape();\n }\n//check if any lines can be removed\n removeFullLines();\n//creates a new piece when a piece finished falling\n if (!isFallingFinished) {\n newPiece();\n }\n }", "public void removePowerUp(PowerUp p) {\n for (Location loc : p.getLocations()) {\n Location replacement = new Location(loc.getX(), loc.getY());\n gridCache.add(replacement);\n }\n\n powerUps.remove(p);\n render();\n}", "private void Delete(String[] p) {\n String classname = p[1];\n String attrname = p[2];\n int classid = 0;\n int attrid=0;\n String attrtype=null;\n for (ClassTableItem item:classt.classTable) {\n if (item.classname.equals(classname) && item.attrname.equals(attrname)) {\n classid = item.classid;\n attrid = item.attrid;\n attrtype = item.attrtype;\n break;\n }\n }\n //寻找需要删除的\n OandB ob2 = new OandB();\n for (Iterator it1 = topt.objectTable.iterator(); it1.hasNext();){\n ObjectTableItem item = (ObjectTableItem)it1.next();\n if(item.classid == classid){\n Tuple tuple = GetTuple(item.blockid,item.offset);\n if(Condition(attrtype,tuple,attrid,p[4])){\n //需要删除的元组\n OandB ob =new OandB(DeletebyID(item.tupleid));\n for(ObjectTableItem obj:ob.o){\n ob2.o.add(obj);\n }\n for(BiPointerTableItem bip:ob.b){\n ob2.b.add(bip);\n }\n\n }\n }\n }\n for(ObjectTableItem obj:ob2.o){\n topt.objectTable.remove(obj);\n }\n for(BiPointerTableItem bip:ob2.b) {\n biPointerT.biPointerTable.remove(bip);\n }\n\n }", "void clean(Player p);", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "public void removeTakenPiece(int xPiece, int yPiece) {\n\t\tSystem.out.println(\"Removing Piece\");\n\t\tChecker checker = model.findChecker(xPiece, yPiece);\n\t\tif((checker.getType() == 1) || (checker.getType() == 3)) {\n\t\t\tmodel.blackPieces.remove(checker);\n\t\t\tblackPieces -= 1;\n\t\t} else {\n\t\t\tmodel.whitePieces.remove(checker);\n\t\t\twhitePieces -= 1;\n\t\t}\n\t\tboard.getBoard()[yPiece][xPiece] = 0;\n\t\t\n\t}", "private void removePosition(Point p) {\n\t\tfor(Point point : occupiedPositions) {\n\t\t\tif(p.x == point.x && p.y == point.y) {\n\t\t\t\toccupiedPositions.remove(point);\n\t\t\t}\n\t\t}\n\t}", "public void removeParade(){\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tthis.getChildren().remove(paradeCards[i]);\n\t\t}\n\t}", "@Test\r\n\tpublic void fieldToDeleteTest() {\n\t\tArrayList<Point> fieldToDelete = boardService.getGameRules().fieldToDelete(board.field[11][10]); //we invoke this on the one of the black stones\r\n\t\t//should return arraylist of a size that is same as whites amount\r\n\t\tint counter = 0;\r\n\t\t\r\n\t\tfor(Point point : fieldToDelete)\r\n\t\t\tfor(int i = 11; i <= 15; i++)\r\n\t\t\t\tfor(int j = 11; j <= 15; j++) {\r\n\t\t\t\t\tif(point.getX() == i && point.getY() == j)\r\n\t\t\t\t\t\tcounter++; \r\n//we increase counter, only when we meet point with the same coordiantes, then when counter == size of returned array, then test is passed\r\n\t\t\t\t}\r\n\t\tassertEquals(counter, fieldToDelete.size());\r\n\t}", "public Piece remove (int x, int y){\n\t\tif (x < 0 || x > N || y < 0 || y > N){\n\t\t\tSystem.out.println(\"Off the board! (Out of Bounds)\");\n\t\t\treturn null;\n\t\t}\n\t\telse if (pieceAt(x,y) == null) {\n\t\t\tSystem.out.println(\"There isn't a piece here! (Null)\");\n\t\t\treturn null;\n\t\t}\t\n\t\telse{\n\t\t\tPiece temp = pieceArray[x][y];\n\t\t\tpieceArray[x][y] = null;\n\t\t\t\n\t\t\treturn temp;\n\t\t}\n\t}", "public Piece remove(int x, int y) {\n\t\tif (x >= 8 || y >= 8 || x < 0 || y < 0) {\n\t\t\tSystem.out.println(\"(\" + x + \", \" + y + \") is out of bounds.\");\n\t\t\treturn null;\n\t\t} else if (pieceAt(x, y) == null) {\n\t\t\tSystem.out.println(\"There is no piece at (\" + x + \", \" + y + \").\");\n\t\t\treturn null;\n\t\t} else {\n\t\t\tprevSelected = pieceAt(x, y);\n\t\t\tb[x][y] = null;\n\t\t\tif (prevSelected.isFire()) {\n\t\t\t\tnumFire -= 1;\n\t\t\t} else {\n\t\t\t\tnumWater -= 1;\n\t\t\t}\n\t\t\treturn prevSelected;\n\t\t}\n\t}", "public void removePiece(int x, int y)\r\n {\r\n if(isValidSqr(x, y)) board[x][y] = null;\r\n }", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.remove(piece);\n\n assertFalse(instance.getBagContent().contains(piece));\n\n }", "@Override\n\tpublic void delete(Iterable<? extends Pessoa> arg0) {\n\t\t\n\t}", "public void makesNotHere(){this.piece.unAffect();}", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "@Test public void deletePentagonalPyramid2Test() {\n PentagonalPyramid[] pArray = new PentagonalPyramid[20];\n pArray[0] = new PentagonalPyramid(\"PP1\", 1, 2);\n pArray[1] = new PentagonalPyramid(\"PP1\", 2, 3);\n pArray[2] = new PentagonalPyramid(\"PP1\", 3, 4);\n PentagonalPyramidList2 pList2 = new PentagonalPyramidList2(\"Test List\", \n pArray, 3);\n pList2.deletePentagonalPyramid(\"ss\");\n Assert.assertEquals(\"Test\", pArray[2], pArray[2]);\n }", "public static void finPartie(Partie p){\n\t\tgames.remove(p);\n\t\tnbPartie--;\n\t}", "public Piece removePiece(Position position) {\n return positionToPieceMap.remove(position);\n }", "private void eliminatePiece(BoardPiece boardPiece) {\n\t\tPlayer playerOwner = PlayerObserver.getInstance().getPlayerOwner(boardPiece);\n\t\tplayerOwner.killPiece(boardPiece);\n\t\tboardPiece.destroy();\n\t}", "public void remove(String piece) {\n\tpieces.remove(piece);\n\tupdate();\n }", "private boolean removePieceFromBoardTile(Piece piece) {\n\n\t\tif(piece == null) return false; \n\t\tLocation pieceLoc = piece.getLocation();\n\n\t\tTile tile=null;\n\t\ttry {\n\t\t\ttile = getTileInLocation(pieceLoc);\n\t\t\ttile.setPiece(null);\n\t\t\tthis.replaceTileInSameTileLocation(tile);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "void removeRoadside(int i);", "public void deleteTour(Tour t) {\r\n\t\t int i=Arrays.asList(tours).indexOf(t);\r\n\t\t\r\n\t\t tours[i]=null;\r\n\t\t }", "private Piece removePiece(Location loc)\n {\n Square s = getSquare(loc);\n return s.removePiece();\n }", "public void delete(Pizza pizza){\n for(Pizza p : pizzas){\n if(pizza.getID() == p.getID()){\n pizzas.remove(p);\n break;\n }\n }\n }", "public void removePieceFromPlay(Piece piece) {\n\t\tpiece.removeFromPlay();\n\t\tpieces.get(piece.getColor()).remove(piece);\n\t}", "public ArrayList<E> removeAt(Point p) {\n\t\tArrayList<E> result = new ArrayList<E>();\n\t\tfor (E e : entities)\n\t\t\tif (e.getBounds().contains(p))\n\t\t\t\tresult.add(e);\n\t\tentities.removeAll(result);\n\t\treturn result;\n\t}", "public abstract Piece clone();", "public abstract Piece clone();", "public void removePiece(PEPiece pePiece, int pieceNumber) {\n\t\tif ( pePiece != null ){\n\t\tadapter.removePiece(pePiece);\n\t\t}\n\t\tpePieces[pieceNumber] =null;\n\t\tnbPiecesActive--;\n\t}", "public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}", "public void clearOld(int p_turn)\n {\n HashSet<Integer> toR = new HashSet<>();\n for (Integer i : this.e.keySet())\n if (this.e.get(i).turn < p_turn)\n toR.add(i);\n this.e.keySet().removeAll(toR);\n\n toR.clear();\n // Clear captured data (unupdated)\n for (Integer i : this.d.keySet())\n if (this.d.get(i).turn < p_turn)\n toR.add(i);\n this.d.keySet().removeAll(toR);\n\n this.moveToData = State.clustering(this.d, CLUSTER_DIST);\n // this.moveToEnnemies = WizState.clustering(this.e, CLUSTER_DIST);\n }", "Set<Card> remove();", "private void discardPlayer(Player p)\n {\n locations.remove(p);\n plugin.getAM().arenaMap.remove(p);\n clearPlayer(p);\n }", "public void removeTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getRight() == a_tile.getRight() && playerHand.get(i).getLeft() == a_tile.getLeft()){\n playerHand.remove(i);\n break;\n }\n }\n }", "public void removePoint(Point2D p);", "private void deleteAttacks(){\n while(!attacksToDelete.isEmpty()){\n attacks.remove(attacksToDelete.remove());\n }\n }", "void dropcard()\n{\nfor (int i=0;i<hc.size()-1;i++)\n\t{\n\tif(hc.get(i)==1||hc.get(i)==2)\n\t\tcontinue;\n\telse if((((hc.get(i))-3)/4)==(((hc.get(i+1))-3)/4))\n\t\t{hc.remove(i);\n\t\thc.remove(i);\n\t\ti--;}\t\n\t}\n}", "public void removeNoCollisionElement(Particle p)\n {\n noCollisionElements.remove(p);\n p.removeNoCollisionElementFree(this);\n }", "public void dropPiece(Piece piece, Square square) {\n square.placePiece(piece);\n this.piecesInHand.remove(piece);\n }", "public boolean removePoint(Point p);", "private void removePiece(int row, int col, int storedRow, int storedCol){\r\n int pieceRow = -1;\r\n int pieceCol = -1;\r\n if(col > storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col-1;\r\n }\r\n if(col > storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col-1;\r\n }\r\n if(col < storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col+1;\r\n }\r\n if(col < storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col+1;\r\n }\r\n checks[pieceRow][pieceCol] = 0;\r\n if(isGame) nextPlayer.subCheck();\r\n }", "private void removeALakeTile(Game game) {\n\t\tLakeTile[][] board = game.getPlayArea().getLakeTilesOnBoard();\n\t\tArrayList<Position> positions = new ArrayList<Position>();\n\t\tfor (int y = 0; y < board.length; y++) {\n\t\t\tfor (int x = 0; x < board[y].length; x++) {\n\t\t\t\tLakeTile laketile = board[x][y];\n\t\t\t\tif (laketile != null) {\n\t\t\t\t\tint connect_laketile = 4;\n\t\t\t\t\tif (x + 1 < board.length && board[x + 1][y] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (y + 1 < board.length && board[x][y + 1] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (x - 1 >= 0 && board[x - 1][y] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (y - 1 >= 0 && board[x][y - 1] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (connect_laketile == 1) {\n\t\t\t\t\t\tPosition p = new Position(x, y);\n\t\t\t\t\t\tpositions.add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (countLakeTileOnBoard(board) != 0 && positions.size() == 0) {\n\t\t\tpositions = getAllLakeTilePositionOnBoard(board);\n\t\t}\n\t\tCollections.shuffle(positions);\n\t\tPosition pos = positions.get(0);\n\t\tint x = pos.getX();\n\t\tint y = pos.getY();\n\t\tremoved_laketile.add(board[x][y]);\n\t\tremoved_position.add(pos);\n\t\tboard[x][y] = null;\n\t}", "int delete(Subdivision subdivision);", "public boolean removePiece(Piece piece) {\n\t\tboolean result =false;\n\t\t//remove from list of pieces\n\t\tresult= this.pieces.remove(piece);\n\n\t\t//remove from board tile\n\t\tresult = result && removePieceFromBoardTile(piece);\n\t\treturn result;\n\t}", "public Point2D removePoint(int i);", "private void deletePlayer(Player p) \r\n\t{\n\t\tlogger.info(\"Deleting player ; '\" + p.getName() +\"'\");\r\n\t\tplayerDao.remove(p);\r\n\t}", "@Override\n public void remove(Shape[] shapes) {\n\n }", "public void remove(){\n\t\tqueueArray[1][0] = null;\n\t\tqueueArray[1][1] = null;\n\t}", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "public void discardToDeck() {\n\t\tfor(int i=discardPile.size(); i>0; i--) {\n\t\t deck.add(discardPile.remove(0));\n\t\t}\n\t\tCollections.shuffle(deck);\n\t}", "@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}", "public synchronized void deQueue(Process p){\n if(p.getId() == queue[0].getId()){\n for(int i =0; i<(queue.length-1);i++){\n queue[i] = queue[i+1];\n }\n queue[queue.length-1] = p;\n }else if(p.getId() == queue[1].getId()){\n for(int i = 1; i<(queue.length-1);i++){\n queue[i] = queue[i+1];\n }\n queue[queue.length-1] = p;\n }else return;\n }", "public void decPieceCount () {\n\t\tm_PieceCount --;\n\t}", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "Object remove();", "void removePiece(int c, int r) {\n _forwardDiag[forward(c, r)] += -1;\n _backwardDiag[backward(c, r)] += -1;\n _col[c - 1] += -1;\n _row[r - 1] += -1;\n }", "public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}", "void deleteMulti(String[] pids);", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "private void removeFigureFromPlayerCollection(Figure figure, Player player) {\n player.removeFigure(figure);\n }", "@Override\r\n\tpublic void delete(Player t) {\n\r\n\t}", "public void deleteFurniture(List<HomePieceOfFurniture> deletedFurniture) {\n final boolean basePlanLocked = this.home.isBasePlanLocked();\n final boolean allLevelsSelection = this.home.isAllLevelsSelection();\n final List<Selectable> oldSelection = this.home.getSelectedItems(); \n List<HomePieceOfFurniture> homeFurniture = this.home.getFurniture(); \n\n // Replace pieces by their group when they have to be all deleted\n deletedFurniture = new ArrayList<HomePieceOfFurniture>(deletedFurniture);\n List<HomeFurnitureGroup> homeGroups = new ArrayList<HomeFurnitureGroup>(); \n searchGroups(homeFurniture, homeGroups);\n boolean updated;\n do {\n updated = false;\n for (HomeFurnitureGroup group : homeGroups) {\n List<HomePieceOfFurniture> groupFurniture = group.getFurniture();\n if (deletedFurniture.containsAll(groupFurniture)) {\n deletedFurniture.removeAll(groupFurniture);\n deletedFurniture.add(group);\n updated = true;\n }\n }\n } while (updated);\n \n // Sort the deletable furniture in the ascending order of their index in home or their group\n Map<HomeFurnitureGroup, Map<Integer, HomePieceOfFurniture>> deletedFurnitureMap =\n new HashMap<HomeFurnitureGroup, Map<Integer, HomePieceOfFurniture>>();\n int deletedFurnitureCount = 0;\n for (HomePieceOfFurniture piece : deletedFurniture) {\n // Check piece is deletable and doesn't belong to a group\n if (isPieceOfFurnitureDeletable(piece)) {\n HomeFurnitureGroup group = getPieceOfFurnitureGroup(piece, null, homeFurniture);\n Map<Integer, HomePieceOfFurniture> sortedMap = deletedFurnitureMap.get(group);\n if (sortedMap == null) {\n sortedMap = new TreeMap<Integer, HomePieceOfFurniture>();\n deletedFurnitureMap.put(group, sortedMap);\n }\n if (group == null) {\n sortedMap.put(homeFurniture.indexOf(piece), piece);\n } else {\n sortedMap.put(group.getFurniture().indexOf(piece), piece);\n }\n deletedFurnitureCount++;\n }\n }\n final HomePieceOfFurniture [] furniture = new HomePieceOfFurniture [deletedFurnitureCount]; \n final int [] furnitureIndex = new int [furniture.length];\n final Level [] furnitureLevels = new Level [furniture.length];\n final HomeFurnitureGroup [] furnitureGroups = new HomeFurnitureGroup [furniture.length];\n int i = 0;\n for (Map.Entry<HomeFurnitureGroup, Map<Integer, HomePieceOfFurniture>> sortedMapEntry : deletedFurnitureMap.entrySet()) {\n for (Map.Entry<Integer, HomePieceOfFurniture> pieceEntry : sortedMapEntry.getValue().entrySet()) {\n furniture [i] = pieceEntry.getValue();\n furnitureIndex [i] = pieceEntry.getKey(); \n furnitureLevels [i] = furniture [i].getLevel();\n furnitureGroups [i++] = sortedMapEntry.getKey();\n }\n } \n doDeleteFurniture(furniture, basePlanLocked, false); \n if (this.undoSupport != null) {\n UndoableEdit undoableEdit = new AbstractUndoableEdit() {\n @Override\n public void undo() throws CannotUndoException {\n super.undo();\n doAddFurniture(furniture, furnitureGroups, furnitureIndex, null, furnitureLevels, basePlanLocked, allLevelsSelection); \n home.setSelectedItems(oldSelection);\n }\n \n @Override\n public void redo() throws CannotRedoException {\n super.redo();\n home.setSelectedItems(Arrays.asList(furniture));\n doDeleteFurniture(furniture, basePlanLocked, false); \n }\n \n @Override\n public String getPresentationName() {\n return preferences.getLocalizedString(FurnitureController.class, \"undoDeleteSelectionName\");\n }\n };\n this.undoSupport.postEdit(undoableEdit);\n }\n }", "void removeGuide(int i);", "public abstract void removeCreature(Point p);", "public void cleanPile() {\n while (!emptyPile()) {\n eraseNode();\n }\n }", "@Override\n\tpublic void eliminar() {\n\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tOptional<Piece> p = null;\n\t\t\n\t\tp = sq.processMousePress(e);\n\t\tp.ifPresent(item->{\n\t\t\titem.setScale(AnimalQueue.PieceScale);\n\t\t\titem.getMyQueue().addPiece(item, 0);\n\t\t\titem.draw();\n\t\t//\tsq.draw();\n\t\t\t});\n\t\tfor(int i=0; i<this.BOARD_SIZE; i++)\n\t\t{\n\t\t\tAnimalQueue aq = this.TheBoard[i];\n\t\t\tif(aq.contains(e.getPoint()))\n\t\t\t{\n\t\t\t\taq.getTop().ifPresent(item->{\n\t\t\t\t\tif(sq.isValidMove(item))\n\t\t\t\t\t{\n\t\t\t\t\t\taq.removePiece()\n\t\t\t\t\t\t.ifPresent(item2->{\n\t\t\t\t\t\t\tSystem.out.println(item2);\n\t\t\t\t\t\t\titem2.setScale(SolutionQueue.PieceScale);\n\t\t\t\t\t\t\tsq.addPiece(item2);\n\t\t\t\t\t\t\titem2.draw();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\tSystem.out.println(\"Not a valie move\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t/*\n\t\t\t\tp = aq.processMousePress(e);\n\t\t\t\tp.ifPresent(item->{\n\t\t//\t\t\tSystem.out.println(\"\\t aq contents =\"+ aq.myQueue);\n\t\t\t\t\tPiece tempP = aq.removePiece();\n\t\t\t\t\ttempP.setScale(SolutionQueue.PieceScale);\n\t\t\t\t\tsq.addPiece(tempP);\n\t\t//\t\t\tSystem.out.println(\"\\t Peek =\"+ aq.removePiece());\n\t\t//\t\t\tSystem.out.println(\"\\t PieceCode removed =\"+ tempP);\n\t\t//\t\t\tSystem.out.println(\"\\t aq contents =\"+ aq.myQueue);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t*/\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdraw();\n\t\trepaint();\n\t}", "void retract()\n\t\t{\n\t\t\tsides = sides-1;\n\t\t\t\n\t\t\tDimension[] dime2 = new Dimension[d.length - 1];\n\t\t\t\n\t\t\tfor (int i=0; i< d.length-1; i++)\n\t\t\t{\n\t\t\t\tdime2[i]= d[i];\n\t\t\t}\n\t\t\t\n\t\t\td = new Dimension[d.length - 1];\n\t\t\tfor(int i = 0; i< dime2.length; i++)\n\t\t\t{\n\t\t\t\td[i] = dime2[i];\n\t\t\t}\n\t\t\t\t\n\t\t}", "synchronized protected void removePoint(final int index) {\n \t\t// check preconditions:\n \t\tif (index < 0) {\n \t\t\treturn;\n \t\t} else if (n_points - 1 == index) {\n \t\t\t//last point out\n \t\t\tn_points--;\n \t\t} else {\n \t\t\t//one point out (but not the last)\n \t\t\t--n_points;\n \n \t\t\t// shift all points after 'index' one position to the left:\n \t\t\tfor (int i=index; i<n_points; i++) {\n \t\t\t\tp[0][i] = p[0][i+1];\t\t//the +1 doesn't fail ever because the n_points has been adjusted above, but the arrays are still the same size. The case of deleting the last point is taken care above.\n \t\t\t\tp[1][i] = p[1][i+1];\n \t\t\t\tp_layer[i] = p_layer[i+1];\n \t\t\t}\n \t\t}\n \n \t\t// Reset or fix autotracing records\n \t\tif (index < last_autotrace_start && n_points > 0) {\n \t\t\tlast_autotrace_start--;\n \t\t} else last_autotrace_start = -1;\n \n \t\t//update in database\n \t\tupdateInDatabase(\"points\");\n \t}", "@Override\n public boolean delete(T o) {\n if(o == null) return false;\n if(!contains(o)){\n return false;\n }else {\n int hcode = hash(o);\n hcode %= array.length;\n array[hcode].reset();\n while (!eqals(o, array[hcode].elem())) {\n array[hcode].advance();\n }\n array[hcode].delete();\n return true;\n }\n }", "void remover(Professor p)throws ProfessorNExisteException;", "public List<Piece> whitePieces();", "void retract() {\n assert movesMade() > 0;\n Move move = _moves.remove(_moves.size() - 1);\n Piece replaced = move.replacedPiece();\n int c0 = move.getCol0(), c1 = move.getCol1();\n int r0 = move.getRow0(), r1 = move.getRow1();\n Piece movedPiece = move.movedPiece();\n set(c1, r1, replaced);\n set(c0, r0, movedPiece);\n _turn = _turn.opposite();\n }", "public void remove () {}", "void removeAllSpawn();", "ISlot remove(IStrongSlot target);", "public void remove(ComplexCar[] cars) throws DatabaseTestException;", "public void cleanProposition();", "@Test\n public void testRemoveAndClearOnNonEmpty() {\n \n this.iPQ.insert(1);\n this.iPQ.insert(2);\n this.iPQ.insert(3);\n this.iPQ.insert(4);\n this.iPQ.insert(5);\n \n assertEquals(5, this.iPQ.size());\n assertEquals(this.iArray[0], this.iPQ.peek());\n assertEquals(this.iArray[0], this.iPQ.remove());\n assertEquals(4, this.iPQ.size());\n assertEquals(this.iArray[1], this.iPQ.remove());\n assertTrue(this.iPQ.size() == 3);\n this.iPQ.clear();\n assertEquals(0, this.iPQ.size());\n \n this.sPQ.insert(\"a\");\n this.sPQ.insert(\"b\");\n this.sPQ.insert(\"c\");\n this.sPQ.insert(\"d\");\n this.sPQ.insert(\"e\");\n \n assertEquals(sArray.length, this.sPQ.size());\n assertEquals(sArray[0], this.sPQ.peek());\n assertEquals(sArray[0], this.sPQ.remove());\n assertEquals(sArray.length - 1, this.sPQ.size());\n assertEquals(sArray[1], this.sPQ.remove());\n assertEquals(sArray.length - 2, this.sPQ.size());\n \n }", "public ChessPiece removePiece(int row, int col)\n\t{\n\t\tChessPiece piece = m_pieces[row][col];\n\t\t\n\t\tm_pieces[row][col] = null;\n\t\tm_display.displayEmptySquare(m_buttons[row][col], row, col);\n\t\t\n\t\treturn piece;\n\t}", "public Piece modifyPiece(Board b, Piece p)\n\t{\n\t\tif (SquarePiece.class.equals(p.getClass()))\n\t\t{\n\t\t\treturn new battletris.piece.FourByFourPiece(b);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn p;\n\t\t}\n\t}", "@Override\n protected void rebalanceDelete(Position<Entry<K, V>> p) {\n if (isRed(p)) {\n makeBlack(p);\n } else if (!isRoot(p)) {\n Position<Entry<K, V>> sib = sibling(p);\n if (isInternal(sib) & (isBlack(sib) || isInternal(left(sib)))) {\n remedyDoubleBlack(p);\n }\n }\n }", "public Object remove();", "private void deletion(String pids) {\n\t\tDeletions(pids);\n\t\t\n\t}" ]
[ "0.6767538", "0.6601909", "0.64839566", "0.6394899", "0.6357578", "0.6242119", "0.6227181", "0.61490226", "0.6147247", "0.61042047", "0.6102118", "0.6027155", "0.6017085", "0.6009328", "0.5996278", "0.5994394", "0.59919935", "0.59918344", "0.5986989", "0.59753174", "0.5949989", "0.5949013", "0.5947483", "0.5940293", "0.5901412", "0.5896541", "0.589463", "0.5887764", "0.5845541", "0.58421797", "0.5821029", "0.58064955", "0.58052576", "0.5792925", "0.57705295", "0.5767782", "0.57661647", "0.576002", "0.57419544", "0.57419544", "0.5729602", "0.5716219", "0.5702004", "0.5691561", "0.5691445", "0.56680125", "0.5667984", "0.5659571", "0.5650947", "0.56404716", "0.5638294", "0.5632371", "0.5607565", "0.5599599", "0.5580031", "0.55545026", "0.5546217", "0.5545697", "0.55410784", "0.5537993", "0.5536135", "0.552254", "0.55126375", "0.5497723", "0.5497601", "0.549686", "0.5493564", "0.5493564", "0.5493564", "0.5493564", "0.5493564", "0.5486069", "0.5478081", "0.54746693", "0.5473515", "0.5472631", "0.5468374", "0.54677993", "0.5457723", "0.5447048", "0.5446051", "0.54416573", "0.54274493", "0.542653", "0.5424417", "0.54243207", "0.54151297", "0.5414345", "0.5404267", "0.54030734", "0.5396309", "0.5383085", "0.53758144", "0.5372484", "0.53692204", "0.53677565", "0.5364231", "0.53532755", "0.53518873", "0.5351391", "0.5348434" ]
0.0
-1
Create a shallow copy of this object.
public OnsetCondition clone() { OnsetCondition data = new OnsetCondition(this.name); data.timeInfos.addAll(this.timeInfos); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "public Object clone() {\n return this.copy();\n }", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "Prototype makeCopy();", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "protected Shingle copy() {\n return new Shingle(this);\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }", "Object clone();", "Object clone();", "public Table shallowCopy() {\n\t\tSubsetTableImpl vt =\n\t\t\tnew SubsetTableImpl(this.getColumns(), this.subset);\n\t\tvt.setLabel(getLabel());\n\t\tvt.setComment(getComment());\n\t\treturn vt;\n\t}", "public StateInfo copy() {\n return new StateInfo(this);\n }", "public JsonMember copy() {\n return new JsonMember(name, value.copy());\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Update cloneShallow() {\n return (Update)cloneShallowContent(new Update());\n }", "public Dispatchable copy() {\n return this;\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "@Override\n public TopicObject copy() {\n return new TopicObject(this);\n }", "public DessertVO clone() {\r\n return (DessertVO) super.clone();\r\n }", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "@Override\n public LocalStore<V> copy() {\n return this;\n }", "public Function clone();", "public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }", "public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }", "public Address copy() {\n\t\tAddress copy = new Address(this.street, this.city, this.state, this.zipCode);\n\t\treturn copy;\n\t}", "public Client copy() {\n\t\tClient clone = new Client(ID, Email, PostalAddress);\n\t\treturn(clone);\n\t}", "Model copy();", "public Clone() {}", "public Ping dup (Ping self)\n {\n if (self == null)\n return null;\n\n Ping copy = new Ping ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.digest = new ArrayList <State> (self.digest);\n return copy;\n }", "public Position copy() {\n return new Position(values.clone());\n }", "public AgwCslOper cloneShallow() {\n return (AgwCslOper)cloneShallowContent(new AgwCslOper());\n }", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "public Object clone() {\n return new PointImpl( this );\n }", "public Srv cloneShallow() {\n return (Srv)cloneShallowContent(new Srv());\n }", "@Override\r\n public InsertStatementBuilder shallowCopy() {\r\n return new InsertStatementBuilder(this);\r\n }", "Component deepClone();", "@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}", "public T cloneDeep();", "@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "public Sudoku copy(){\n\t\treturn (Sudoku) this.clone();\n\t}", "public EnbOper cloneShallow() {\n return (EnbOper)cloneShallowContent(new EnbOper());\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Square copy() {\n\t\tSquare s = new Square(x,y);\n\t\ts.z = z;\n\t\ts.c = new Color(c.getRGB());\n\t\treturn s;\n\t}", "public Tree copy() {\n Tree cpTree = new Tree();\n if(!empty()) {\n Node cpNode = copyNodes(root);\n cpTree.setRoot(cpNode);\n }\n return cpTree;\n }", "public CFExp deepCopy(){\r\n return this;\r\n }", "public AST copy()\n {\n return new Implicate(left, right);\n }", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public Record copy() {\n\t\treturn new Record(video, numOwned, numOut, numRentals);\n\t}", "public abstract Object clone();", "public JsonFactory copy()\n/* */ {\n/* 324 */ _checkInvalidCopy(JsonFactory.class);\n/* */ \n/* 326 */ return new JsonFactory(this, null);\n/* */ }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }", "public static void copyConstructor(){\n\t}", "public Encoding copy() {\n\t\treturn new Encoding(this);\n\t}", "public CMObject copyOf();", "public ComplexNum copy() {\n /*\n * returns a deep copy of this complex number\n * */\n\n return new ComplexNum(realPart, imaginaryPart);\n }", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "public Board deepCopy() {\n Board copy = new Board();\n for (int i = 0; i < DIMENSION; i++) {\n System.arraycopy(this.fields[i], 0, copy.fields[i], 0, DIMENSION);\n }\n return copy;\n }", "public SimpleStyle copy() {\n\t\tSimpleStyle simpleStyle = new SimpleStyle();\n\t\tcopyIn(simpleStyle);\n\t\treturn simpleStyle;\n\t}", "public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }", "public void copy() {\n\n\t}", "public TurtleState copy() {\n\t\treturn new TurtleState(position.copy(), direction.copy(), color, shift);\n\t}", "public final Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "Nda<V> shallowCopy();", "public Tree<T> clone() {\n Node<T> clonedRoot = this.root.clone();\n clone(this.root, this.root.clone());\n return new Tree<T>(clonedRoot);\n }", "public Expression deepCopy()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}", "final public Attr clone() {\r\n\t\t\tif(Vector == null)\r\n\t\t\t\treturn new Attr(Name, Value, null);\r\n\t\t\telse if(Object == null)\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone());\r\n\t\t\telse\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone(), Object);\r\n\t\t}", "public abstract Object clone() ;", "public Animal deepCopy() {\n return new Eagle(this);\n }", "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "public SceneLabelObjectState copy(){\n\n\t\t//get a copy of the generic data from the supertype\n\t\tSceneDivObjectState genericCopy = super.copy(); \n\n\t\t//then generate a copy of this specific data using it (which is easier then specifying all the fields\n\t\t//Separately like we used too)\n\t\tSceneLabelObjectState newObject = new SceneLabelObjectState(\n\t\t\t\tgenericCopy,\n\t\t\t\tObjectsCurrentText,\t\t\n\t\t\t\tCSSname,\n\t\t\t\tcursorVisible,\n\t\t\t\tTypedText,\n\t\t\t\tCustom_Key_Beep,\n\t\t\t\tCustom_Space_Beep);\n\n\t\treturn newObject;\n\n\n\t}", "public O copy() {\n return value();\n }", "@Override\n public GraphicsState clone(\n )\n {\n GraphicsState clone;\n {\n // Shallow copy.\n try\n {clone = (GraphicsState)super.clone();}\n catch(CloneNotSupportedException e)\n {throw new RuntimeException(e);} // NOTE: It should never happen.\n\n // Deep copy.\n /* NOTE: Mutable objects are to be cloned. */\n clone.ctm = (AffineTransform)ctm.clone();\n clone.tlm = (AffineTransform)tlm.clone();\n clone.tm = (AffineTransform)tm.clone();\n }\n return clone;\n }", "public Card copy(){\n return new Card(Suits, Value);\n }", "public Field copy()\n {\n return new Field(name, type, vis);\n }", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }" ]
[ "0.75865734", "0.74664617", "0.7455549", "0.7428234", "0.7415843", "0.73347086", "0.73021287", "0.7263904", "0.7245519", "0.71537113", "0.71520674", "0.7148968", "0.7126731", "0.7097638", "0.7038463", "0.7038463", "0.6985928", "0.6960899", "0.69598573", "0.6944968", "0.68861055", "0.68861055", "0.68861055", "0.68861055", "0.68533784", "0.6841076", "0.68397224", "0.6837509", "0.67990845", "0.6789512", "0.6788316", "0.6782656", "0.67539245", "0.6753288", "0.6746618", "0.67401475", "0.67389965", "0.67368704", "0.67177385", "0.66980183", "0.6697353", "0.6693244", "0.6674413", "0.66664225", "0.6653767", "0.6641976", "0.6632957", "0.6602295", "0.66016364", "0.66014636", "0.6594578", "0.65830576", "0.658224", "0.6580889", "0.6577875", "0.6560755", "0.65604025", "0.6557142", "0.6556085", "0.6553224", "0.65476775", "0.6546461", "0.6538303", "0.6524993", "0.6518638", "0.65120095", "0.65104663", "0.6508226", "0.6505676", "0.65015227", "0.64981335", "0.64978534", "0.6497378", "0.6484244", "0.64835835", "0.6482469", "0.64800453", "0.64729756", "0.64678943", "0.64654446", "0.6457189", "0.6450085", "0.6445373", "0.6440267", "0.64265543", "0.6422901", "0.64226514", "0.63957", "0.63954747", "0.63945436", "0.63841265", "0.6381806", "0.6373705", "0.63737", "0.6368101", "0.6367845", "0.636573", "0.6362483", "0.63604534", "0.6354218", "0.6340249" ]
0.0
-1
Get the last recorded onset time.
public Long getLastOnsetTime() { if (timeInfos.isEmpty()) { return null; } else { int size = timeInfos.size(); return timeInfos.get(size - 1).getOnsetTime(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getLastTime() {\n return lastTime;\n }", "Date getLastTime();", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public Integer getOnTime() {\n return onTime;\n }", "public IUTCTime getLastTime() {\n if (null == lastTime) {\n return new UTCTime(0);\n }\n return lastTime;\n }", "public Date getLastlogintime() {\n return lastlogintime;\n }", "long getLastAccessedTime();", "long getLastPersistenceTime();", "public int getLastTimetable() {\n return lastTimetable;\n }", "public long getLastTouchMillis()\n {\n return m_dtLastUse;\n }", "public Date getEventTime() {\n\t\treturn time;\n\t}", "public long getEventTime();", "public static long getLastResetTime() {\n return p().lastReset;\n }", "public String getLastUpdTime() {\n return lastUpdTime;\n }", "long getRetrievedTime();", "private long getNow()\n {\n // no need to convert to collection if had an Iterables.max(), but not present in standard toolkit, and not worth adding\n List<SSTableReader> list = new ArrayList<>();\n Iterables.addAll(list, cfs.getSSTables(SSTableSet.LIVE));\n if (list.isEmpty())\n return 0;\n return Collections.max(list, (o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp()))\n .getMaxTimestamp();\n }", "public LocalDateTime getLastUpdTime() {\n return (LocalDateTime) get(7);\n }", "public DateTime getLastSynced() {\n\t\treturn mLastSynced;\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public Date getJlastTime() {\n return jlastTime;\n }", "public Date takeOff() {\n \t\r\n \tthis.lastTimeTookOf = new Date();\r\n \treturn lastTimeTookOf;\r\n }", "public double getTimeOffset() {\r\n return lastTimeOutput;\r\n }", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\r\n \treturn time;\r\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public Date getLastUpdTime() {\n return lastUpdTime;\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public long getLastAttackTime() {\r\n\t\treturn lastAttackTime;\r\n\t}", "public Date getLastSaved()\r\n {\r\n return (m_lastSaved);\r\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time;\n }", "public long getTimeOfLastValuesChanged();", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public OffsetDateTime lastUpdateTime() {\n return this.lastUpdateTime;\n }", "public long getTime() {\n return timeMillis;\n }", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public Timestamp getLastModifiedOn() {\r\n\t\treturn lastModifiedOn;\r\n\t}", "public Date getLastSendRequestTime()\r\n {\r\n return lastSendRequestTime;\r\n }", "public long getLastUpdateTs() {\n return lastUpdateTs;\n }", "public Long getSunsetTime(){\n return sunsetTime;\n }", "@java.lang.Override\n public long getTime() {\n return time_;\n }", "public Date getLastAccessTime() {\n return lastAccessTime;\n }", "public int getLastEventTimestamp() {\n return lastTimestamp;\n }", "public long getLastAccessTime();", "public Date getTime() {\n\t\treturn time;\n\t}", "public Date getLastUpdateTime() {\r\n return lastUpdateTime;\r\n }", "public String getLastEditTime() {\n return editedTimeList.get(editedTimeList.size() - 1);\n }", "public Long getTime() {\n return time;\n }", "public Date getTime() {\r\n\t\treturn time;\r\n\t}", "public long getLastUpdateTime() {\n return this.lastUpdateTime;\n }", "public long getTime() {\n return _time;\n }", "public long getLastPlayed ( ) {\n\t\treturn extract ( handle -> handle.getLastPlayed ( ) );\n\t}", "public Date getAtTime() {\r\n return atTime;\r\n }", "public long getEventTime() {\n return eventTime;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public long getLastUpdateTime() {\n return lastUpdateTime;\n }", "@Override\n\tpublic long getLastAccessedTime() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long getLastAccessedTime() {\n\t\treturn 0;\n\t}", "public Date getLastUpdateTime() {\n return lastUpdateTime;\n }", "public Date getLastUpdateTime() {\n return lastUpdateTime;\n }", "public ScheduledHarvest getLastOneTimeHarvest() {\n\n\t\treturn lastOneTimeHarvest;\n\n\t}", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public final long getTime () {\n return time;\n }", "public Date time() {\n return _time;\n }", "public Date time() {\n return _time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Instant getLastUpdate() {\n return lastUpdate;\n }", "public String getTime() {\n return this.time;\n }", "Date snapshotTime();", "long getLastFetchTimeMs();", "public int getTime() {\r\n return time;\r\n }", "public Date getTimeNow() {\r\n return timeNow;\r\n }", "public long getLastWriteTime() {\n return LAST_WRITE_TIME;\n }", "public DateTime lastTrainedDateTime() {\n return this.lastTrainedDateTime;\n }", "public Timestamp getLastUpdatedAt() {\n return (Timestamp) getAttributeInternal(LASTUPDATEDAT);\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public String getEventTime() {\r\n return eventTime;\r\n }", "@Override\n\tpublic Date getLastAccessTime() {\n\t\treturn start;\n\t}" ]
[ "0.7076586", "0.69751996", "0.69397306", "0.6832878", "0.6749902", "0.671053", "0.66293085", "0.6606319", "0.6547072", "0.65311605", "0.6515254", "0.64632577", "0.6453463", "0.64100593", "0.64053", "0.6352371", "0.6342705", "0.632614", "0.6297245", "0.627863", "0.6275332", "0.62665296", "0.62646365", "0.62644136", "0.6251631", "0.6246741", "0.6229307", "0.6222967", "0.62032163", "0.62032163", "0.6193246", "0.6178352", "0.6178352", "0.6178352", "0.6176142", "0.6175883", "0.61653495", "0.61644936", "0.6161252", "0.6161252", "0.6161252", "0.6161252", "0.6161252", "0.6161252", "0.61542636", "0.6154237", "0.6153832", "0.6150907", "0.6141378", "0.61412215", "0.61303735", "0.61297715", "0.6125969", "0.6120566", "0.61166877", "0.6111269", "0.61074054", "0.60936415", "0.60874933", "0.60856587", "0.6083056", "0.6082212", "0.60794646", "0.6076264", "0.6067493", "0.6063736", "0.6055617", "0.60512406", "0.60504067", "0.6048207", "0.6048207", "0.6048207", "0.6041083", "0.60382205", "0.60382205", "0.60320246", "0.60320246", "0.6031678", "0.60269856", "0.60235935", "0.60226834", "0.60226834", "0.60217696", "0.60217696", "0.60217696", "0.60217696", "0.601874", "0.60177875", "0.60063636", "0.6005559", "0.60030097", "0.60016793", "0.60012966", "0.5996412", "0.5994594", "0.5991612", "0.5991612", "0.5991612", "0.59887266", "0.59870213" ]
0.7844123
0
Get the last recorded end time.
public Long getLastEndTime() { if (timeInfos.isEmpty()) { return null; } else { int size = timeInfos.size(); return timeInfos.get(size - 1).getEndTime(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getEnd_time() {\n return end_time;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public java.lang.String getTime_end() {\r\n return time_end;\r\n }", "public long getTimeEnd()\n {\n return this.timeEnd;\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "com.google.protobuf.Timestamp getEndTime();", "public Date getEndtime() {\n return endtime;\n }", "public String getEndtime() {\n return endtime;\n }", "public Date getLastTime() {\n return lastTime;\n }", "public LocalTime getEndTime () {\n\t\treturn DateUtils.toLocalTime(this.end);\n\t}", "public long getEndTime() {\r\n return endTime;\r\n }", "public long getLastCallEndTimestamp() {\n if (!mCallRecords.isEmpty()) {\n return mCallRecords.get(0).getCallEndTimestamp();\n }\n return -1;\n }", "public long getEndTime() {\n return endTime;\n }", "public long getEndTime() {\n return endTime;\n }", "public long getEndTimestamp();", "public long getEndTime() {\n\t\treturn endTime;\n\t}", "java.util.Calendar getEndTime();", "int getEndTime();", "int getEndTime();", "int getEndTime();", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "public Date getEndTime() {\r\n return this.endTime;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "public java.sql.Time getREQ_END_TIME()\n {\n \n return __REQ_END_TIME;\n }", "public Date getEndTime() {\n return this.endTime;\n }", "@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}", "public double getEndTime() {\n return endTime;\n }", "public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }", "public LocalTime getEnd() {\n\treturn end;\n }", "com.google.protobuf.Timestamp getDepositEndTime();", "public Date getEndTime() {\n\t\treturn endTime;\n\t}", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public String getEndTime()\n {\n return this.endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public abstract long getEndTimestamp();", "Date getLastTime();", "public Long getTimestampEnd();", "public long getEndTime() {\n if (endTime < 0) {\n try {\n String datestr = PropertyArray.get(props, END);\n\n if (datestr == null) {\n // this may be more expensive because it can cause a\n // reload from disk\n try {\n datestr = getProperty(END);\n } catch (Fault f) {\n }\n }\n\n if (datestr != null) {\n Date date = parseDate(datestr);\n endTime = date.getTime();\n } else {\n // info not available\n }\n } catch (ParseException e) {\n }\n }\n\n return endTime;\n }", "public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }", "public String getEndTime();", "public String getEndTime();", "long getEndTime() {\n return endTime;\n }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public String getEndTime() {\r\n return endTime;\r\n }", "public java.util.Date getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return this.EndTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "@Override\n public Date getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public Integer getEndTime() {\n return endTime;\n }", "public IUTCTime getLastTime() {\n if (null == lastTime) {\n return new UTCTime(0);\n }\n return lastTime;\n }", "public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }", "public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}", "com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public abstract Date getEndTime();", "public Date getjEndtime() {\n return jEndtime;\n }", "public String getEndTimeString() {\n return endTimeString;\n }", "public OffsetDateTime finishTime() {\n return this.finishTime;\n }", "public BidTime getFinishTime() {\r\n\t\treturn finishTime;\r\n\t}", "public Calendar getEndTime() {\r\n\t\treturn endTime;\r\n\t}", "public String endTime(){\r\n\t\tsaleEnded = Calendar.getInstance().getTime();\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\r\n\t\tString endTime = dateFormat.format(time);\r\n\t\treturn endTime;\r\n\t}", "public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }", "@Override\n\tpublic String getFinishTime() {\n\t\treturn finishTime;\n\t}", "public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public OffsetDateTime endTime() {\n return this.endTime;\n }", "public Date get_end() {\n\t\treturn this.end;\n\t}", "public Long getLastOnsetTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getOnsetTime();\n }\n }", "public Date getAudioVideoEndTime() {\n return (Date)getAttributeInternal(AUDIOVIDEOENDTIME);\n }", "public Date getEndTimeDate() {\n return endTimeDate;\n }", "public String LastEndTimePlus() {\n int _hour = Integer.parseInt(lastEndTime.substring(0, lastEndTime.indexOf(':')));\n int _minute = Integer.parseInt(lastEndTime.substring(lastEndTime.indexOf(':') + 1));\n\n if (_minute == 59) {\n _hour++;\n _minute = 0;\n } else {\n _minute++;\n }\n\n String resultHour = _hour < 10 ? '0' + Integer.toString(_hour) : Integer.toString(_hour);\n String resultMinute = _minute < 10 ? '0' + Integer.toString(_minute) : Integer.toString(_minute);\n\n return resultHour + \":\" + resultMinute;\n }", "public long getCallEndTimestamp() {\n return mCallEndTimestamp;\n }", "public String getEndTime() {\n/* 34 */ return this.endTime;\n/* */ }", "com.google.protobuf.Timestamp getVotingEndTime();", "public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "net.opengis.gml.x32.TimeInstantPropertyType getEnd();", "public Date getTenderEndTime() {\n return tenderEndTime;\n }", "@Override\n\t\tpublic long getEndMillis() {\n\t\t\treturn 0;\n\t\t}", "Instant getEnd();", "public Long getLastRunDuration();", "public Date getLastlogintime() {\n return lastlogintime;\n }", "public long getEndWallClockTime() {\n return endWallClockTime;\n }", "long getVisitEndtime();", "long getVisitEndtime();", "com.google.protobuf.TimestampOrBuilder getDepositEndTimeOrBuilder();", "@Override\r\n\tpublic Date getEventEndTime() {\n\t\treturn null;\r\n\t}" ]
[ "0.80836844", "0.79065126", "0.7866501", "0.78420126", "0.7820941", "0.7784749", "0.7732828", "0.76972276", "0.7666575", "0.76432955", "0.76321876", "0.7561227", "0.7554932", "0.75315076", "0.7524631", "0.7524631", "0.7504346", "0.7481767", "0.74558747", "0.7419971", "0.7419971", "0.7419971", "0.74156517", "0.7383958", "0.7383958", "0.7382818", "0.7377833", "0.7377833", "0.73709536", "0.7369029", "0.7333933", "0.7325854", "0.731946", "0.73071045", "0.7306318", "0.73038614", "0.72943074", "0.7282742", "0.7282742", "0.7273841", "0.72716016", "0.72716016", "0.72716016", "0.72674537", "0.72591144", "0.725246", "0.72489387", "0.7248289", "0.72448295", "0.72448295", "0.7240417", "0.7240215", "0.7235102", "0.7232754", "0.72318584", "0.7188986", "0.7188986", "0.7188986", "0.7168293", "0.71580756", "0.71566296", "0.7134567", "0.70847094", "0.7084699", "0.7069813", "0.7059969", "0.70449615", "0.70238364", "0.7010905", "0.69742024", "0.69560635", "0.6955165", "0.69498116", "0.6939817", "0.68991864", "0.68861073", "0.68851733", "0.68849283", "0.6840367", "0.68387336", "0.678752", "0.6767626", "0.67659926", "0.67550886", "0.67544156", "0.67509264", "0.67424583", "0.6711428", "0.6699963", "0.6680216", "0.6675135", "0.6653529", "0.66103673", "0.65768933", "0.6559154", "0.65534306", "0.65424496", "0.65424496", "0.65094984", "0.64969134" ]
0.8041414
1
Set the end time the last entry.
public void endLastEntry(long time) { int size = timeInfos.size(); if (size > 0) { timeInfos.get(size - 1).setEndTime(Long.valueOf(time)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setEnd(net.opengis.gml.x32.TimeInstantPropertyType end);", "void setEnd(Instant instant);", "public void setEnd_time(long end_time) {\n this.end_time = end_time;\n }", "void setEndPosition(net.opengis.gml.x32.TimePositionType endPosition);", "public void setTimeEnd(long te)\n {\n this.timeEnd = (te > 0L)? te : -1L;\n }", "protected void setEndTimestamp(long timestamp) {\n\t\tthis.endTimestamp = timestamp;\n\t\tsetDirty(true);\n\t}", "private void setLast() { this._last = true; }", "public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}", "public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}", "public void setLastEventTime() {\r\n\t\t\tthis.lastEventTime = 0;\r\n\t\t}", "public void setEndtime(Date endtime) {\n this.endtime = endtime;\n }", "public void setTimeEnd(int timeEnd) {\r\n this.timeEnd = timeEnd;\r\n }", "@Override\n\tpublic void setEndTime(float t) \n\t{\n\t\t_tend = t;\n\t}", "void setEndTime(Time endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(long value) {\r\n this.endTime = value;\r\n }", "public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}", "public void setLastTime(Date lastTime) {\n this.lastTime = lastTime;\n }", "@Override\n\t\tpublic void setEndMillis(long millis) {\n\t\t\t\n\t\t}", "net.opengis.gml.x32.TimeInstantPropertyType addNewEnd();", "public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}", "public void setEndTime(java.lang.Long value) {\n this.end_time = value;\n }", "public M csseAddTimeEnd(Object end){this.put(\"csseAddTimeEnd\", end);return this;}", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public void setEnd(final String end) {\n\tthis.end = LocalTime.parse(end, DateTimeFormatter.ofPattern(\"hh:mma\", Locale.US));\n }", "public void setLast(Node last)\n {\n this.last = last;\n }", "public void setLastTimetable(int lastTimetable) {\n this.lastTimetable = lastTimetable;\n }", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public com.twc.bigdata.views.avro.viewing_info.Builder setEndTime(java.lang.Long value) {\n validate(fields()[1], value);\n this.end_time = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "public void setEndTime(String EndTime) {\n this.EndTime = EndTime;\n }", "public long getEnd_time() {\n return end_time;\n }", "public void setEndTime(String time){endTime = time;}", "public void setREQ_END_TIME(java.sql.Time value)\n {\n if ((__REQ_END_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_END_TIME)))\n {\n _isDirty = true;\n }\n __REQ_END_TIME = value;\n }", "public abstract void setEndTime(Date endTime);", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "public void setEnd(int end) {\r\n this.end = end;\r\n }", "public void setEnd(){\n\t\tthis.isEnd=true;\n\t}", "net.opengis.gml.x32.TimeInstantPropertyType getEnd();", "void setEndTick(int endTick);", "public void setEndTime( Date endTime ) {\n this.endTime = endTime;\n }", "public long getTimeEnd()\n {\n return this.timeEnd;\n }", "public void setEndTime(long endTime) {\n this.endTime = endTime;\n }", "void setEndTime(java.util.Calendar endTime);", "public void setEndTime(Date endTime) {\r\n this.endTime = endTime;\r\n }", "void setLastUpdatedTime();", "public void setEndTime(long endTime) {\n\t\tthis.endTime = endTime;\n\t}", "public void setTime_end(java.lang.String time_end) {\r\n this.time_end = time_end;\r\n }", "public void setEnd(int end) {\n\t\tthis.end = end;\n\t}", "protected void setLastMsTime(long lastMsTime) {\r\n TaskTimeElementDB.lastMsTime = lastMsTime;\r\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(Integer endTime) {\n this.endTime = endTime;\n }", "Instant getEnd();", "public LocalTime getEnd() {\n\treturn end;\n }", "public void setLastContactsUpdate() {\n long time = new Date().getTime();\n preferences.edit()\n .putLong(LAST_CONTACTS_UPDATE, time)\n .apply();\n }", "void setLast(Node node) {\n this.last = node;\n }", "public void setEndtime(String endtime) {\n this.endtime = endtime == null ? null : endtime.trim();\n }", "private void setLastUpdateTime(long lastUpdateTime) {\n this.lastUpdateTime = lastUpdateTime;\n }", "public void setLastUpdTime(LocalDateTime value) {\n set(7, value);\n }", "public void setEndTime(Date endTime) {\n\t\tthis.endTime = endTime;\n\t}", "public void resetToLast() {\r\n\t\taktu = last;\r\n\t}", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public void setEnd(int end)\n {\n if(end >= 0)\n {\n this.end = end;\n }\n else\n {\n System.out.println(\"Cannot be negative.\");\n }\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public Date getEndtime() {\n return endtime;\n }", "net.opengis.gml.x32.TimePositionType addNewEndPosition();", "public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }", "public void setLastUpdate(long lastUpdate) {\n this.lastUpdate = lastUpdate;\n }", "@Override\n public Date getEndTime() {\n return endTime;\n }", "public Builder setVisitEndtime(long value) {\n bitField0_ |= 0x00000080;\n visitEndtime_ = value;\n onChanged();\n return this;\n }", "public Builder setVisitEndtime(long value) {\n bitField0_ |= 0x00000080;\n visitEndtime_ = value;\n onChanged();\n return this;\n }", "public void setjEndtime(Date jEndtime) {\n this.jEndtime = jEndtime;\n }", "@Override\n\t\tpublic long getEndMillis() {\n\t\t\treturn 0;\n\t\t}", "void xsetEndTime(org.apache.xmlbeans.XmlDateTime endTime);", "public Date getEndTime() {\r\n return this.endTime;\r\n }", "public void setTimeOfLastValuesChanged(long millis);", "public void setEndTime(Calendar endTime) {\r\n\t\tthis.endTime = endTime;\r\n\t}", "public final void setActualEndTime(java.util.Date actualendtime)\r\n\t{\r\n\t\tsetActualEndTime(getContext(), actualendtime);\r\n\t}", "public void setEndDateTime(String s) {\n this.setEndDateTime(AppUtility.getUTCTimestamp(s));\n }", "public void setFinishTime() {\r\n\t\t\tthis.finishTime = RNG.MAXINT;\r\n\t\t}", "protected void setLastTimeExecute(long lastTimeExecute) {\n this.lastTimeExecute = lastTimeExecute;\n }", "public Long getTimestampEnd();", "public void setLastAnchor(java.sql.Timestamp tmp) {\n this.lastAnchor = tmp;\n }", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}", "public String getEndtime() {\n return endtime;\n }", "public java.lang.String getTime_end() {\r\n return time_end;\r\n }", "public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }", "public Date get_end() {\n\t\treturn this.end;\n\t}", "public void setEnd(int end)\n {\n this.end = end;\n this.endSpecified = true;\n }", "void seekToLast();", "public Date getEndTime() {\n return this.endTime;\n }", "public void setEndLocation(Location endLoc) {\n gameLocations.put(GameLocation.END, endLoc);\n }", "private void updateEndTime() {\n Date date = endTimeCalendar.getTime();\n String endTime = new SimpleDateFormat(\"HH:mm\").format(date);\n endHourText.setText(endTime);\n }", "public void setEndTime(String endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(String endTime) {\n this.endTime = endTime;\n }" ]
[ "0.7371612", "0.72175246", "0.7108436", "0.7084097", "0.70367026", "0.6842224", "0.68196845", "0.6785844", "0.6780117", "0.6712619", "0.67055464", "0.6693097", "0.6663794", "0.661814", "0.65771085", "0.6556017", "0.6531091", "0.6530757", "0.65026194", "0.6495265", "0.64936703", "0.648572", "0.6475578", "0.6475578", "0.64587456", "0.645486", "0.6450779", "0.6415534", "0.6415534", "0.640661", "0.6401397", "0.6391895", "0.63786334", "0.6376756", "0.6370649", "0.63463026", "0.6342075", "0.6339142", "0.6331666", "0.63285506", "0.63232607", "0.63141876", "0.63054854", "0.62715477", "0.6268393", "0.62512046", "0.6232586", "0.6232144", "0.62318474", "0.62228763", "0.6215313", "0.6215313", "0.6215313", "0.6215313", "0.6192512", "0.6168144", "0.61675924", "0.61521953", "0.6130077", "0.61293906", "0.6122229", "0.61095685", "0.6104429", "0.6093768", "0.6087857", "0.6085928", "0.6085819", "0.6084239", "0.6082731", "0.6074765", "0.6074765", "0.6074765", "0.606094", "0.6057061", "0.60423046", "0.60423046", "0.6041317", "0.60408837", "0.60315883", "0.6027458", "0.60273", "0.6021599", "0.60144776", "0.60094684", "0.6006582", "0.5997136", "0.5995041", "0.5993879", "0.5987417", "0.5984886", "0.5966992", "0.59663224", "0.5964712", "0.59504336", "0.5948291", "0.5936057", "0.59246945", "0.5920512", "0.5913882", "0.5913882" ]
0.7725017
0
Create new instance for the specified module name.
public ModuleConditions(String source) { this.source = source; onsetConditions = new ConcurrentHashMap<String, OnsetCondition>(); state2conditionMapping = new ConcurrentHashMap<String, String>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Module createModule();", "public Module createModule(String bundleName, String moduleTypeName) {\n Bundle bundle = getBundle(bundleName);\n if (bundle == null) {\n return null;\n }\n //System.err.println(\"creating \"+bundleName+\":\"+moduleTypeName);\n CModule newModule = createCModule(bundleName, moduleTypeName);\n //System.err.println(\"done\");\n return newModule;\n }", "private Module createModule(String moduleId, String ownerId, String copyId) throws NoFactoryForModuleException{\n\t\tIModuleFactory factory = factories.get(moduleId);\n\t\tif (factory==null){\n\t\t\tthrow new NoFactoryForModuleException(moduleId);\n\t\t}\n\t\treturn factory.createModule(ownerId, copyId);\n\t}", "public RubyModule getOrCreateModule(String name) {\n IRubyObject module = objectClass.getConstantAt(name);\n if (module == null) {\n module = defineModule(name);\n } else if (getSafeLevel() >= 4) {\n throw newSecurityError(\"Extending module prohibited.\");\n } else if (!module.isModule()) {\n throw newTypeError(name + \" is not a Module\");\n }\n \n return (RubyModule) module;\n }", "public <T> T createInstance(final Class<T> type, final String moduleName, final String className,\n\t\t\tfinal Object... args) {\n\n\t\tfinal PyObject importer = getImporter();\n\t\tsetClasspath(importer);\n\n\t\tfinal PyObject instance = createObject(getPythonClass(importer, moduleName, className), args);\n\n\t\t// coerce into java type\n\t\treturn (T) instance.__tojava__(type);\n\t}", "public RubyModule defineModule(String name) {\n return defineModuleUnder(name, objectClass);\n }", "ModuleDefinition createModuleDefinition();", "public static Object createObject(String className) throws Exception {\n return createObject(Class.forName(className));\n }", "ModuleAssembly module( String name );", "public ProgramModule createRootModule(String treeName) throws DuplicateNameException;", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "private Module createModule() throws Exception\n {\n Map headerMap = m_archive.getCurrentRevision().getManifestHeader();\n\n // Create the module instance.\n ModuleImpl module = new ModuleImpl(\n getFramework().getLogger(),\n getFramework().getConfig(),\n getFramework().getResolver(),\n this,\n Long.toString(getBundleId())\n + \".\" + m_archive.getCurrentRevisionNumber().toString(),\n headerMap,\n m_archive.getCurrentRevision().getContent(),\n getFramework().getBundleStreamHandler(),\n getFramework().getBootPackages(),\n getFramework().getBootPackageWildcards());\n\n // Verify that the bundle symbolic name + version is unique.\n if (module.getManifestVersion().equals(\"2\"))\n {\n Version bundleVersion = module.getVersion();\n bundleVersion = (bundleVersion == null) ? Version.emptyVersion : bundleVersion;\n String symName = module.getSymbolicName();\n\n Bundle[] bundles = getFramework().getBundles();\n for (int i = 0; (bundles != null) && (i < bundles.length); i++)\n {\n long id = ((BundleImpl) bundles[i]).getBundleId();\n if (id != getBundleId())\n {\n String sym = bundles[i].getSymbolicName();\n Version ver = ((ModuleImpl)\n ((BundleImpl) bundles[i]).getCurrentModule()).getVersion();\n if ((symName != null) && (sym != null) && symName.equals(sym) && bundleVersion.equals(ver))\n {\n throw new BundleException(\n \"Bundle symbolic name and version are not unique: \"\n + sym + ':' + ver, BundleException.DUPLICATE_BUNDLE_ERROR);\n }\n }\n }\n }\n\n return module;\n }", "abstract protected T createModuleNode(NodeDescriptor node);", "public void createInstance(String className, String instanceName)\r\n\t{\r\n\t\t\r\n\t\tOntClass c = obtainOntClass(className);\r\n\t\t\r\n\t\tString longName;\r\n\t\tif(instanceName.contains(\"#\"))\r\n\t\t\tlongName = instanceName;\r\n\t\tif(instanceName.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(instanceName);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + instanceName;\r\n\t\t\r\n\t\tc.createIndividual(longName);\r\n\t}", "public static Object createObject( String className )\n throws WfControllerException\n {\n Object object = null;\n try\n {\n Class classDefinition = Class.forName( className );\n object = classDefinition.newInstance();\n }\n catch ( InstantiationException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n catch ( IllegalAccessException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n catch ( ClassNotFoundException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n return object;\n }", "Builder(String name) {\n var synthetic = Set.of(ModuleDescriptor.Modifier.SYNTHETIC);\n this.descriptor = ModuleDescriptor.newModule(name, synthetic);\n }", "ModulePackage createModulePackage();", "public CMObject newInstance();", "public RubyModule defineOrGetModuleUnder(String name) {\n // This method is intended only for defining new modules in Ruby code\n Ruby runtime = getRuntime();\n IRubyObject moduleObj = getConstantAt(name);\n RubyModule module;\n if (moduleObj != null) {\n if (!moduleObj.isModule()) throw runtime.newTypeError(name + \" is not a module\");\n if (runtime.getSafeLevel() >= 4) throw runtime.newSecurityError(\"extending module prohibited\");\n module = (RubyModule)moduleObj;\n } else if (classProviders != null && (module = searchProvidersForModule(name)) != null) {\n // reopen a java module\n } else {\n module = RubyModule.newModule(runtime, name, this, true); \n }\n return module;\n }", "Instance createInstance();", "protected ParserAbstract createRegisterInstance(\n\t\t\tClass<? extends ParserAbstract> className)\n\t\t\tthrows InstantiationException, IllegalAccessException {\n\t\tClass<? extends ParserAbstract> parserClass = ParserList\n\t\t\t\t.findParserClass(className.getSimpleName().toLowerCase());\n\t\tassert (parserClass != null);\n\t\treturn parserClass.newInstance();\n\t}", "ModuleDefine createModuleDefine();", "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalArgumentException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InvocationTargetException{\n\t return (Bot) Class.forName(className).getConstructor().newInstance();\n\t}", "public ModuleSnippet(String className) {\n super();\n this.className = className;\n moduleClass = findClass(className);\n if (moduleClass != null) {\n Exception exception = isModule(moduleClass);\n if (exception == null) {\n try {\n defaultConstructor = moduleClass.getConstructor((Class[]) null);\n } catch (NoSuchMethodException e) {\n defaultConstructor = null;\n }\n try {\n setDefaultConstructor();\n } catch (Exception e) {\n defaultConstructor = null;\n }\n } else {\n problems.add(new InvalidModuleProblem(className,exception));\n defaultConstructor = null;\n }\n }\n }", "public static Object createObject(String className) {\n try {\n Class<?> aClass = Class.forName(className);\n return createObject(aClass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return null;\n }", "static Plugin newInstance(String simpleClassName) throws Exception {\n final String className = Plugin.class.getPackageName() + \".\" + simpleClassName;\n return (Plugin) Class.forName(className).getDeclaredConstructor().newInstance();\n }", "public static Object newInstance(String classname) {\n return newInstance(classname, Object.class);\n }", "public RubyModule defineModuleUnder(String name) {\n return getRuntime().defineModuleUnder(name, this);\n }", "RegistrationModule createRegistrationModule();", "public ModuleType(String name) {\r\n super(name, name);\r\n }", "@GET\n\t@Path(\"/component/{componentName}/new\")\n\t@Produces( MediaType.APPLICATION_JSON )\n\tInstance createInstanceFromComponent( @PathParam(\"name\") String applicationName, @PathParam(\"componentName\") String componentName );", "public RubyModule defineModuleUnder(String name, RubyModule parent) {\n IRubyObject moduleObj = parent.getConstantAt(name);\n \n boolean parentIsObject = parent == objectClass;\n \n if (moduleObj != null ) {\n if (moduleObj.isModule()) return (RubyModule)moduleObj;\n \n if (parentIsObject) {\n throw newTypeError(moduleObj.getMetaClass().getName() + \" is not a module\");\n } else {\n throw newTypeError(parent.getName() + \"::\" + moduleObj.getMetaClass().getName() + \" is not a module\");\n }\n }\n \n return RubyModule.newModule(this, name, parent, !parentIsObject);\n }", "public static Project creer(String name){\n\t\treturn new Project(name);\n\t}", "private static Object createObject(String className, String namespace) {\n try {\n // get constructor\n Constructor<?> constructor = Class.forName(className).getConstructor(new Class[] {String.class});\n // create object\n return constructor.newInstance(new Object[] {namespace});\n } catch (ClassNotFoundException cnfe) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", cnfe);\n } catch (NoSuchMethodException nsme) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", nsme);\n } catch (InstantiationException ie) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ie);\n } catch (IllegalAccessException iae) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", iae);\n } catch (InvocationTargetException ite) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ite);\n }\n }", "static public InstanceGenerator create(String className, String datasetFileName)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(String.class).newInstance(datasetFileName);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "private static Module createEditedModule(Module moduleToEdit,\n EditModuleCommand.EditModuleDescriptor editModuleDescriptor) {\n assert moduleToEdit != null;\n\n ModuleName updatedName = editModuleDescriptor.getModuleName();\n\n UniqueStudentList studentList = moduleToEdit.getUniqueStudentList();\n UniqueTaskList taskList = moduleToEdit.getTaskList();\n\n return new Module(updatedName, studentList, taskList);\n }", "<T> T newInstance(URI description) throws EnvironmentException;", "private static Object getInstance( final String className ) {\n if( className == null ) return null;\n return java.security.AccessController.doPrivileged(\n new java.security.PrivilegedAction<Object>() {\n public Object run() {\n try {\n ClassLoader cl =\n Thread.currentThread().getContextClassLoader();\n if (cl == null)\n cl = ClassLoader.getSystemClassLoader();\n return Class.forName( className, true,cl).newInstance();\n } catch( Exception e ) {\n new ErrorManager().error(\n \"Error In Instantiating Class \" + className, e,\n ErrorManager.GENERIC_FAILURE );\n }\n return null;\n }\n }\n );\n }", "Reproducible newInstance();", "protected abstract Logger newInstance(String name);", "public T newInstance();", "public Object createComponent( final String implementationKey )\n throws Exception\n {\n final Class clazz = getClassLoader().loadClass( implementationKey );\n return clazz.newInstance();\n }", "public static RegisterModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }", "public SNVAppModuleImpl() {\n }", "@SuppressWarnings({\"unchecked\"})\n // Must be synchronized for the Maven Parallel Junit runner to work\n public static synchronized <T> T instantiate(String className, ClassLoader classLoader) {\n try {\n return (T) Class.forName(className, true, classLoader).getDeclaredConstructor().newInstance();\n } catch (Exception e) {\n throw new FlywayException(\"Unable to instantiate class \" + className + \" : \" + e.getMessage(), e);\n }\n }", "public static Object create(String className) throws CreateObjectException {\r\n\t\treturn create(className, null, null);\r\n\r\n\t}", "public JythonObjectFactory(PySystemState state, Class interfaceType, String moduleName, String className) {\n this.interfaceType = interfaceType;\n PyObject importer = state.getBuiltins().__getitem__(Py.newString(\"__import__\"));\n PyObject module = importer.__call__(Py.newString(moduleName));\n klass = module.__getattr__(className);\n System.err.println(\"module=\" + module + \",class=\" + klass);\n }", "DynamicInstance createDynamicInstance();", "static RodUpgrades newInstance(int num) {\n RodUpgrades f = new RodUpgrades();\n\n return f;\n }", "public RubyModule getModule(String name) {\n return (RubyModule) objectClass.getConstantAt(name);\n }", "public static ModuleDef createSyntheticModule(TreeLogger logger,\n String moduleName, String[] inherits, boolean refresh)\n throws UnableToCompleteException {\n ModuleDef moduleDef = tryGetLoadedModule(logger, moduleName, refresh);\n if (moduleDef != null) {\n return moduleDef;\n }\n ModuleDefLoader loader = new ModuleDefLoader(inherits);\n ModuleDef module = loader.doLoadModule(logger, moduleName);\n /*\n * Must reset name override on synthetic modules. Otherwise they'll be\n * incorrectly affected by the last inherits tag, because they have no XML\n * which would reset the name at the end of parse.\n */\n module.setNameOverride(null);\n return module;\n }", "public static ModelLearnable newInstancebyClassName(Class modelClassName) {\r\n try {\r\n return (ModelLearnable) modelClassName.newInstance();\r\n } catch (InstantiationException e) {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "static public InstanceGenerator create(String className, Instances training, Instances testing)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(Instances.class, Instances.class).newInstance(training, testing);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "public static ProductFragments newInstance(String name) {\n ProductFragments fragment = new ProductFragments();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "private Object createObject(final Class<? extends AModule> clazz)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConstructor<? extends AModule> constructor = clazz.getDeclaredConstructor();\n\t\t\tconstructor.setAccessible(true);\n\t\t\treturn constructor.newInstance();\n\t\t} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException\n\t\t\t\t| IllegalArgumentException e)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Error constructing module\", e);\n\t\t}\n\t}", "public Component createComponent(String ComponentClass, String id) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\t\n\t\tComponent c = (Component)Class.forName(ComponentClass).newInstance();\n\t\tc.setId(id);\n\t\t\n\t\treturn c;\n\t}", "IFMLModule createIFMLModule();", "protected PlayLangRuntimeModule createRuntimeModule() {\n\t\treturn new PlayLangRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn PlayLangInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}", "public Modul(String modulname) {\n\t\tthis.modulname=modulname;\n\t}", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "public HALeaseManagementModule() {\n\n }", "static Package toPackage(String name, Module module) {\n return new Package(name, module);\n }", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "public ModuleDependency(String name, String version) {\n this.name = name;\n this.version = version;\n this.shared = true;\n this.reexport = false;\n }", "public JythonObjectFactory(Class interfaceType, String moduleName, String className) {\n this(new PySystemState(), interfaceType, moduleName, className);\n }", "public static Object createInstance(String className, Class<?>[] argumentTypes, Object[] arguments) \n {\n if(className == null) \n {\n throw new IllegalArgumentException(\"ClassName must be specified\");\n }\n if(argumentTypes == null) \n {\n throw new IllegalAnnotationException(\"ArgumentTypes must be specified. Use empty array if no arguments\");\n }\n if(arguments == null) \n {\n throw new IllegalAnnotationException(\"Arguments must be specified. Use empty array if no arguments\");\n }\n try \n {\n Class<?> implClass = loadClass(className); \n Constructor<?> constructor = findConstructor(implClass, argumentTypes);\n return constructor.newInstance(arguments);\n }\n catch (Exception e) \n {\n throw new RuntimeException(\n \"Could not create new instance of \" + className + \", missing package from classpath?\", e);\n } \n }", "public ExampleModuleClient() {\r\n }", "public CourseRegInstance getInstance(String name) throws IOException;", "public CourseRegInstance newInstance(String edma_name, SchoolInfo schoolInfo) throws IOException;", "public static RegistryOperations createInstance(String name, Configuration conf) {\n Preconditions.checkArgument(conf != null, \"Null configuration\");\n RegistryOperationsClient operations =\n new RegistryOperationsClient(name);\n operations.init(conf);\n return operations;\n }", "private static PublishLogDataStrategy createNewStrategie(String className) {\n\n\t\tPublishLogDataStrategy request = null;\n\n\t\ttry {\n\t\t\tClass<?> cl = Class.forName(className);\n\t\t\tLOGGER.info(cl.toString() + \" instantiated\");\n\t\t\tif (cl.getSuperclass() == PublishLogDataStrategy.class) {\n\t\t\t\trequest = (PublishLogDataStrategy) cl.newInstance();\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tLOGGER.severe(\"ClassNotFound\");\n\t\t} catch (InstantiationException e) {\n\t\t\tLOGGER.severe(\"InstantiationException\");\n\t\t} catch (IllegalAccessException e) {\n\t\t\tLOGGER.severe(\"IllegalAccessException\");\n\t\t}\n\n\t\treturn request;\n\t}", "private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}", "protected VaryGrammarRuntimeModule createRuntimeModule() {\n\t\treturn new VaryGrammarRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn VaryGrammarInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}", "@RequestMapping(value = { \"/newModule\" }, method = RequestMethod.GET)\n\t\tpublic String newModule(ModelMap model) {\n\t\t\tModule module = new Module();\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", false);\n\t\t\t\n\t\t\treturn \"addNewModule\";\n\t\t}", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Modules (String module, int ID)\n\n {\n\n // Calls the setter method named setModuleName with module as it's parameter.\n setModuleName (module);\n // Calls the setter method named setModuleID with ID as it's parameter.\n setModuleID (ID);\n\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Node createNode(String p_name) {\n\t\tNode n = new Node(p_name, this);\n\t\taddNode(n);\n\t\treturn n;\n\t}", "NamedClass createNamedClass();", "public static Object create(String className, Class<?>[] argTypes, Object[] argValues)\r\n\t\t\tthrows CreateObjectException {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass<?> clz = Class.forName(className);\r\n\t\t\tif (argTypes == null) {\r\n\t\t\t\treturn clz.newInstance();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tConstructor<?> c = clz.getConstructor(argTypes);\r\n\t\t\t\treturn c.newInstance(argValues);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CreateObjectException(e);\r\n\t\t}\r\n\t}", "NewClass1 createNewClass1();", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public ProgramModule getModule(String treeName, String name);", "public static SuiviModule createEntity(EntityManager em) {\n SuiviModule suiviModule = new SuiviModule()\n .semestre(DEFAULT_SEMESTRE)\n .descriptif(DEFAULT_DESCRIPTIF)\n .observations(DEFAULT_OBSERVATIONS)\n .date(DEFAULT_DATE)\n .debutCreneau(DEFAULT_DEBUT_CRENEAU)\n .finCreneau(DEFAULT_FIN_CRENEAU)\n .duree(DEFAULT_DUREE);\n return suiviModule;\n }", "public void addNewInstance(String className, String instanceName) {\n\t\tOntClass ontClass = model.getOntClass(getDefaultNS()+className);\n\t\tif(ontClass==null) throw new IllegalArgumentException(\"Class: '\"+className+\"' not found\");\n\t\tmodel.createIndividual(getDefaultNS()+instanceName, ontClass);\n\t}", "public static ReadModule newInstance(String trainingModID) {\n ReadModule fragment = new ReadModule();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, trainingModID);\n fragment.setArguments(args);\n return fragment;\n }", "protected SceneGraphObject createNode( String className ) {\n\tSceneGraphObject ret;\n\n\ttry {\n Class state = Class.forName( className, true, control.getClassLoader() );\n\n\t ret = createNode( state );\n\n\t //System.err.println(\"Created J3D node for \"+className );\n\t} catch(ClassNotFoundException e) {\n if (control.useSuperClassIfNoChildClass())\n ret = createNodeFromSuper( className );\n else\n throw new SGIORuntimeException( \"No Such Class \"+\n\t\t\t\t\t\tclassName );\n\t}\n\n\treturn ret;\n }", "static public Person create(String name, String urlpt) {\n Person p;\n p = searchPerson(name);\n if (p == null)\n p = new Person(name, urlpt);\n return p;\n }", "PlayerBean create(String name);", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public static ComModule getInstance() {\n\t\ttry {\n\t\t\tClass<?> moduleClass = Class.forName(Constants.MODULE_CLASSNAME);\n\t\t\tMethod getinst = moduleClass.getDeclaredMethod(\"getInstance\");\n\t\t\treturn (ComModule) getinst.invoke(null);\n\t\t} catch (Throwable e) {\n\t\t\tthrow new IllegalStateException(e);\n\t\t}\n\t}", "public static Unit generateDummy(String className)\r\n {\r\n try\r\n {\r\n //find constructor requiring no parameters\r\n Class classToCreate = Class.forName(\"TowerDefense.\"+className);\r\n Class[] params = {};\r\n Constructor constructor = classToCreate.getConstructor(params);\r\n \r\n //create instance of object using found constructor\r\n Object[] argList = {};\r\n return (Tower)constructor.newInstance(argList);\r\n }\r\n catch (Exception e)\r\n {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "public void createClass(String className)\r\n\t{\r\n\t\tString longName;\r\n\t\tif(className.contains(\"#\"))\r\n\t\t\tlongName = className;\r\n\t\tif(className.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(className);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + className;\r\n\t\t\r\n\t\tONT_MODEL.createClass(longName);\r\n\t}", "public static void initModule(Class<? extends DatabaseHolder> generatedClassName) {\n loadDatabaseHolder(generatedClassName);\n }", "HxType createType(final String className);", "public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }", "IServiceContext createService(Class<?>... serviceModules);", "public PartOfSpeechTagger newPartOfSpeechTagger( String className )\r\n\t{\r\n\t\tPartOfSpeechTagger partOfSpeechTagger\t= null;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tpartOfSpeechTagger\t=\r\n\t\t\t\t(PartOfSpeechTagger)Class.forName(\r\n\t\t\t\t\tclassName ).newInstance();\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\tString fixedClassName\t=\r\n\t\t\t\t(String)taggerClassMap.get( className );\r\n\r\n\t\t\tif ( fixedClassName != null )\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tpartOfSpeechTagger\t=\r\n\t\t\t\t\t\t(PartOfSpeechTagger)Class.forName(\r\n\t\t\t\t\t\t\tfixedClassName ).newInstance();\r\n\t\t\t\t}\r\n\t\t\t\tcatch ( Exception e2 )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\"Unable to create part of speech tagger of class \" +\r\n\t\t\t\t\t\tfixedClassName + \", using trigram tagger.\" );\r\n\r\n\t\t\t\t\tpartOfSpeechTagger\t= new TrigramTagger();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"Unable to create part of speech tagger of class \" +\r\n\t\t\t\t\tclassName + \", using trigram tagger.\" );\r\n\r\n\t\t\t\tpartOfSpeechTagger\t= new TrigramTagger();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn partOfSpeechTagger;\r\n\t}", "private ModuleLoader() {\r\n }" ]
[ "0.7225817", "0.6858442", "0.6450296", "0.63794565", "0.63435507", "0.62279296", "0.62213564", "0.6116991", "0.61015075", "0.6089469", "0.60802084", "0.60376465", "0.60038406", "0.59713596", "0.59093344", "0.590578", "0.587474", "0.58543503", "0.58535814", "0.584119", "0.5831384", "0.5819698", "0.5785295", "0.57407343", "0.5727289", "0.5724992", "0.5710803", "0.56828934", "0.5659923", "0.56584364", "0.56378895", "0.55751383", "0.55701816", "0.5569675", "0.5533758", "0.5520208", "0.55055296", "0.5487824", "0.54822576", "0.543373", "0.5423988", "0.54215705", "0.54102594", "0.5392654", "0.5375746", "0.53579795", "0.5339439", "0.5332281", "0.5306146", "0.52876186", "0.52856594", "0.526449", "0.52640414", "0.5263769", "0.52480215", "0.5247981", "0.5240609", "0.52397424", "0.5237693", "0.52372485", "0.52364033", "0.52214736", "0.5192465", "0.5191759", "0.51879245", "0.5181892", "0.51766443", "0.51688373", "0.51669765", "0.5162229", "0.5152626", "0.5148276", "0.5145215", "0.51422507", "0.5111888", "0.5109799", "0.51071376", "0.50963634", "0.50942296", "0.5089345", "0.50810546", "0.5075686", "0.50741976", "0.5071789", "0.5069796", "0.5057081", "0.50570333", "0.5053143", "0.50515306", "0.5046543", "0.5044248", "0.50442284", "0.50362664", "0.5026067", "0.5025917", "0.5023256", "0.5018225", "0.5010529", "0.5009423", "0.50076765", "0.50063187" ]
0.0
-1
Create a shallow copy of this instance.
public ModuleConditions clone() { ModuleConditions data = new ModuleConditions(this.source); data.state2conditionMapping.putAll(this.state2conditionMapping); data.onsetConditions.putAll(this.onsetConditions); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "public Object clone() {\n return this.copy();\n }", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "protected Shingle copy() {\n return new Shingle(this);\n }", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "Prototype makeCopy();", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "public StateInfo copy() {\n return new StateInfo(this);\n }", "public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Table shallowCopy() {\n\t\tSubsetTableImpl vt =\n\t\t\tnew SubsetTableImpl(this.getColumns(), this.subset);\n\t\tvt.setLabel(getLabel());\n\t\tvt.setComment(getComment());\n\t\treturn vt;\n\t}", "public Update cloneShallow() {\n return (Update)cloneShallowContent(new Update());\n }", "public Dispatchable copy() {\n return this;\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public JsonMember copy() {\n return new JsonMember(name, value.copy());\n }", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "@Override\n public LocalStore<V> copy() {\n return this;\n }", "public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }", "public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }", "public Position copy() {\n return new Position(values.clone());\n }", "public Address copy() {\n\t\tAddress copy = new Address(this.street, this.city, this.state, this.zipCode);\n\t\treturn copy;\n\t}", "@Override\n public Object clone() {\n return super.clone();\n }", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "public Ping dup (Ping self)\n {\n if (self == null)\n return null;\n\n Ping copy = new Ping ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.digest = new ArrayList <State> (self.digest);\n return copy;\n }", "Object clone();", "Object clone();", "public Client copy() {\n\t\tClient clone = new Client(ID, Email, PostalAddress);\n\t\treturn(clone);\n\t}", "public DessertVO clone() {\r\n return (DessertVO) super.clone();\r\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "@Override\r\n public InsertStatementBuilder shallowCopy() {\r\n return new InsertStatementBuilder(this);\r\n }", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "public AgwCslOper cloneShallow() {\n return (AgwCslOper)cloneShallowContent(new AgwCslOper());\n }", "@Override\n public TopicObject copy() {\n return new TopicObject(this);\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Clone() {}", "public Function clone();", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public Srv cloneShallow() {\n return (Srv)cloneShallowContent(new Srv());\n }", "public Sudoku copy(){\n\t\treturn (Sudoku) this.clone();\n\t}", "Model copy();", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }", "public AST copy()\n {\n return new Implicate(left, right);\n }", "public Object clone() {\n return new PointImpl( this );\n }", "public EnbOper cloneShallow() {\n return (EnbOper)cloneShallowContent(new EnbOper());\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "public Square copy() {\n\t\tSquare s = new Square(x,y);\n\t\ts.z = z;\n\t\ts.c = new Color(c.getRGB());\n\t\treturn s;\n\t}", "public Record copy() {\n\t\treturn new Record(video, numOwned, numOut, numRentals);\n\t}", "@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "public Board deepCopy() {\n Board copy = new Board();\n for (int i = 0; i < DIMENSION; i++) {\n System.arraycopy(this.fields[i], 0, copy.fields[i], 0, DIMENSION);\n }\n return copy;\n }", "public Tree copy() {\n Tree cpTree = new Tree();\n if(!empty()) {\n Node cpNode = copyNodes(root);\n cpTree.setRoot(cpNode);\n }\n return cpTree;\n }", "public CFExp deepCopy(){\r\n return this;\r\n }", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}", "public Encoding copy() {\n\t\treturn new Encoding(this);\n\t}", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public SimpleStyle copy() {\n\t\tSimpleStyle simpleStyle = new SimpleStyle();\n\t\tcopyIn(simpleStyle);\n\t\treturn simpleStyle;\n\t}", "Component deepClone();", "public TurtleState copy() {\n\t\treturn new TurtleState(position.copy(), direction.copy(), color, shift);\n\t}", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public Card copy(){\n return new Card(Suits, Value);\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }", "public void copy() {\n\n\t}", "public Animal deepCopy() {\n return new Eagle(this);\n }", "public Field copy()\n {\n return new Field(name, type, vis);\n }", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public User copy() {\r\n try {\r\n return (User) BeanUtils.cloneBean(this);\r\n } catch (Exception e) {\r\n throw new IllegalStateException(\"Error while copying \" + this, e);\r\n }\r\n }", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "public Tree<T> clone() {\n Node<T> clonedRoot = this.root.clone();\n clone(this.root, this.root.clone());\n return new Tree<T>(clonedRoot);\n }", "public ComplexNum copy() {\n /*\n * returns a deep copy of this complex number\n * */\n\n return new ComplexNum(realPart, imaginaryPart);\n }", "public T cloneDeep();", "public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }", "public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }", "public Restaurant clone() {\r\n return new Restaurant(this);\r\n }", "public Expression deepCopy()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "public MapVS<K, T, V> getCopy() {\n return new MapVS(this);\n }", "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "private final State copy( State state)\n {\n State copy = new State();\n copy.index = counter++;\n copy.stackOps = Arrays.copyOf( state.stackOps, state.stackOps.length);\n copy.gotos = Arrays.copyOf( state.gotos, state.gotos.length);\n itemSetMap.put( copy, itemSetMap.get( state));\n return copy;\n }", "StoryState copy() {\r\n\t\tStoryState copy = new StoryState(story);\r\n\r\n\t\tcopy.getOutputStream().addAll(outputStream);\r\n\t\toutputStreamDirty();\r\n\t\tcopy.currentChoices.addAll(currentChoices);\r\n\r\n\t\tif (hasError()) {\r\n\t\t\tcopy.currentErrors = new ArrayList<String>();\r\n\t\t\tcopy.currentErrors.addAll(currentErrors);\r\n\t\t}\r\n\r\n\t\tcopy.callStack = new CallStack(callStack);\r\n\r\n\t\tcopy.variablesState = new VariablesState(copy.callStack, story.getListDefinitions());\r\n\t\tcopy.variablesState.copyFrom(variablesState);\r\n\r\n\t\tcopy.evaluationStack.addAll(evaluationStack);\r\n\r\n\t\tif (getDivertedTargetObject() != null)\r\n\t\t\tcopy.setDivertedTargetObject(divertedTargetObject);\r\n\r\n\t\tcopy.setPreviousContentObject(getPreviousContentObject());\r\n\r\n\t\tcopy.visitCounts = new HashMap<String, Integer>(visitCounts);\r\n\t\tcopy.turnIndices = new HashMap<String, Integer>(turnIndices);\r\n\t\tcopy.currentTurnIndex = currentTurnIndex;\r\n\t\tcopy.storySeed = storySeed;\r\n\t\tcopy.previousRandom = previousRandom;\r\n\r\n\t\tcopy.setDidSafeExit(didSafeExit);\r\n\r\n\t\treturn copy;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "final public Attr clone() {\r\n\t\t\tif(Vector == null)\r\n\t\t\t\treturn new Attr(Name, Value, null);\r\n\t\t\telse if(Object == null)\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone());\r\n\t\t\telse\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone(), Object);\r\n\t\t}", "public ModuleDescriptorAdapter copy() {\n ModuleDescriptorAdapter copy = new ModuleDescriptorAdapter(getId(), getDescriptor(), getComponentId());\n copyTo(copy);\n copy.metaDataOnly = metaDataOnly;\n return copy;\n }", "public static void copyConstructor(){\n\t}", "public Feature copy() {\n\t\tFeature ret = new AbbeelFeature();\n\t\treturn ret;\n\t}", "public JsonFactory copy()\n/* */ {\n/* 324 */ _checkInvalidCopy(JsonFactory.class);\n/* */ \n/* 326 */ return new JsonFactory(this, null);\n/* */ }", "@Override\n public GraphicsState clone(\n )\n {\n GraphicsState clone;\n {\n // Shallow copy.\n try\n {clone = (GraphicsState)super.clone();}\n catch(CloneNotSupportedException e)\n {throw new RuntimeException(e);} // NOTE: It should never happen.\n\n // Deep copy.\n /* NOTE: Mutable objects are to be cloned. */\n clone.ctm = (AffineTransform)ctm.clone();\n clone.tlm = (AffineTransform)tlm.clone();\n clone.tm = (AffineTransform)tm.clone();\n }\n return clone;\n }", "public RawBlockContainer copy() {\n final RawBlockContainer container = new RawBlockContainer();\n container.setVersion(ArrayUtil.arrayCopy(getVersion()));\n container.setPreviousBlockHash(ArrayUtil.arrayCopy(getPreviousBlockHash()));\n container.setMerkleRoot(ArrayUtil.arrayCopy(getMerkleRoot()));\n container.setTimestamp(ArrayUtil.arrayCopy(getTimestamp()));\n container.setBits(ArrayUtil.arrayCopy(getBits()));\n container.setNonce(ArrayUtil.arrayCopy(getNonce()));\n return container;\n }" ]
[ "0.75599885", "0.7550207", "0.7468555", "0.74170417", "0.7415086", "0.73966116", "0.72647595", "0.72313106", "0.72023684", "0.7182921", "0.7173853", "0.71658903", "0.7106737", "0.708105", "0.7053349", "0.69559133", "0.6901973", "0.68985665", "0.6896987", "0.6894", "0.68686444", "0.6861159", "0.68580574", "0.68545604", "0.68513346", "0.6843668", "0.6816811", "0.68128574", "0.68036515", "0.67900914", "0.67900914", "0.6768763", "0.6764064", "0.6746116", "0.67366594", "0.6733698", "0.6727375", "0.6716359", "0.66845584", "0.66845584", "0.66845584", "0.66845584", "0.66815805", "0.66727024", "0.6657816", "0.6654225", "0.6637135", "0.66319543", "0.66060156", "0.6600003", "0.65954083", "0.6594919", "0.65944844", "0.65876794", "0.65874714", "0.6575173", "0.65507877", "0.6541695", "0.65382576", "0.6530579", "0.6526343", "0.6525881", "0.6522801", "0.6521445", "0.65131885", "0.6499925", "0.649878", "0.64972806", "0.64932525", "0.64633065", "0.6456439", "0.6454031", "0.64414674", "0.6431074", "0.6424255", "0.64197934", "0.64148116", "0.64101404", "0.63993675", "0.6396691", "0.6386523", "0.6380032", "0.6377519", "0.6375917", "0.6371305", "0.63678646", "0.6364125", "0.63599545", "0.63571334", "0.6357125", "0.63477737", "0.63454247", "0.6345068", "0.6343925", "0.63431656", "0.634004", "0.63373536", "0.6332831", "0.63326705", "0.6330668", "0.6325507" ]
0.0
-1
Record the onset of a condition.
public void onsetCondition(String condition, String state, long time) { if (!onsetConditions.containsKey(condition)) { onsetConditions.put(condition, new OnsetCondition(condition)); } OnsetCondition onsetCondition = onsetConditions.get(condition); onsetCondition.addNewEntry(time); state2conditionMapping.put(state, condition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}", "public Map<String, OnsetCondition> getOnsetConditions() {\n return onsetConditions;\n }", "public void onConditionOnset(String module, String state, String condition, long time) {\n if (!sources.containsKey(module)) {\n sources.put(module, new ModuleConditions(module));\n }\n ModuleConditions moduleConditions = sources.get(module);\n moduleConditions.onsetCondition(condition, state, time);\n }", "public OnsetCondition clone() {\n OnsetCondition data = new OnsetCondition(this.name);\n data.timeInfos.addAll(this.timeInfos);\n return data;\n }", "public void set( final Condition condition )\n {\n m_condition = condition;\n }", "public static void bgfx_encoder_set_condition(@NativeType(\"bgfx_encoder_t *\") long _this, @NativeType(\"bgfx_occlusion_query_handle_t\") short _handle, @NativeType(\"bool\") boolean _visible) {\n long __functionAddress = Functions.encoder_set_condition;\n if (CHECKS) {\n check(_this);\n }\n invokePCV(_this, _handle, _visible, __functionAddress);\n }", "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "public Collection<T> getInCondition() {\n return inCondition;\n }", "CollectIteratorEvaluator(BooleanValue condition) {\n this.condition = condition;\n }", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public Long getConditionLastOnsetTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastOnsetTime();\n }\n return null;\n }", "public Object getCondition();", "public Set<Condition> getTrackedConditions() {\n return trackedConditions;\n }", "java.lang.String getCondition();", "public String getCondition() {\n\treturn condition;\n}", "public void setTrackedConditions(Set<Condition> trackedConditions) {\n this.trackedConditions = trackedConditions;\n }", "boolean isActiveOperandSet();", "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "public void check_union_set(boolean on){\r\n this.e_union_set = on;\r\n }", "public Expression getCondition()\n {\n return this.condition;\n }", "public void endCondition(String condition, long time) {\n if (onsetConditions.containsKey(condition)) {\n onsetConditions.get(condition).endLastEntry(time);\n }\n }", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "public String getCondition() {\n return condition;\n }", "public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();\n }\n }", "public Condition getCondition() {\n return condition;\n }", "public void setCondition( String condition ) {\n Element conditionElement = controlElement.element( ActionSequenceDocument.CONDITION_NAME );\n if ( conditionElement == null ) {\n conditionElement = controlElement.addElement( ActionSequenceDocument.CONDITION_NAME );\n }\n conditionElement.clearContent();\n conditionElement.addCDATA( condition );\n ActionSequenceDocument.fireControlStatementChanged( this );\n }", "public void setCondition(ExpressionNode condition);", "public static void bgfx_set_condition(@NativeType(\"bgfx_occlusion_query_handle_t\") short _handle, @NativeType(\"bool\") boolean _visible) {\n long __functionAddress = Functions.set_condition;\n invokeCV(_handle, _visible, __functionAddress);\n }", "public void and(Condition c){\n result.retainAll(c.result);\n Collections.sort(result);\n }", "public String onsetString() {\n return getString(FhirPropertyNames.PROPERTY_ONSET_STRING);\n }", "public void addWhen(Object pCondition, Object pValue);", "public void push(ConditionalConstant condition)\n {\n // store the condition\n m_listCondition.add(condition);\n\n // associated (and lazily instantiated) SimulatedLinkerContext\n m_listLinkerContexts.add(null);\n\n // if recursing to a new depth for the first time (i.e. under the specific parent\n // condition), store off the modification count so that a subsequent pop() will restore the\n // current indicator value\n if (m_listCondition.size() > m_listIndicators.size())\n {\n m_listIndicators.add(m_nIndicator);\n }\n\n // update the modification counter and the modification indicator\n m_nIndicator = ++m_cMods;\n }", "public void check_stacking_queries(boolean on){\r\n this.e_stacking_queries = on;\r\n }", "public String getCondition() {\n\t\treturn condition;\n\t}", "public static void on(boolean condition, Runnable then, Runnable elze) {\n\t\tif (condition) {\n\t\t\tthen.run();\n\t\t} else {\n\t\t\telze.run();\n\t\t}\n\t}", "public int[] getConditions() { return conditional; }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}", "@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}", "public static void on(boolean condition, Runnable then) {\n\t\tif (condition) {\n\t\t\tthen.run();\n\t\t}\n\t}", "public GroupByBuilder and(String condition) {\n\t\t\n\t\tadd(condition, Operator.AND);\n\t\treturn this;\n\t}", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }", "public void check_always_true_condition(boolean on){\r\n this.e_always_true_condition = on;\r\n }", "public static void collectConditionalMetric(String key, boolean condition)\n {\n if (ourToolbox != null && QuantifyToolboxUtils.getQuantifyToolbox(ourToolbox) != null && condition)\n {\n QuantifyToolboxUtils.getQuantifyToolbox(ourToolbox).getQuantifyService().collectMetric(key);\n }\n }", "String getCondition();", "com.google.protobuf.ByteString getConditionBytes();", "public void announceConditionSelection(ConditionTag conditionTag) {\n String str;\n int selectedZen = getSelectedZen(0);\n if (selectedZen == 1) {\n str = this.mContext.getString(R$string.interruption_level_priority);\n } else if (selectedZen == 2) {\n str = this.mContext.getString(R$string.interruption_level_none);\n } else if (selectedZen == 3) {\n str = this.mContext.getString(R$string.interruption_level_alarms);\n } else {\n return;\n }\n announceForAccessibility(this.mContext.getString(R$string.zen_mode_and_condition, str, conditionTag.line1.getText()));\n }", "public int addConditionFlagSet(int flag) {\r\n\t\tbackSteps.push(COPROC1_CONDITION_SET, pc(), flag);\r\n\t\treturn flag;\r\n\t}", "@Override\r\n\tpublic void visit(ConditionExpression conditionExpression) {\n\r\n\t}", "@Override\n public void setVisibleWhen(MExpression arg0)\n {\n \n }", "Event getCondition();", "public DoSometime condition(Condition condition) {\n this.condition = condition;\n return this;\n }", "public LogCollectionState logCollectionEnabled();", "@Override\r\n\tpublic String getCondition(String[] sql) {\n\t\treturn sql[4];\r\n\t}", "public void setIsOnCondition (boolean IsOnCondition)\n\t{\n\t\tset_Value (COLUMNNAME_IsOnCondition, Boolean.valueOf(IsOnCondition));\n\t}", "public Long getConditionId() {\n return _conditionId;\n }", "void setCondition(ICDICondition condition) throws CDIException;", "public boolean isOnset(int i)\n\t{\n\t\treturn fIsOnset[i];\n\t}", "protected void setOnWhenAppliedPower(boolean onWhenAppliedPower) {\n this.onWhenAppliedPower = onWhenAppliedPower;\n \n }", "public static OnSetClause create(Expression expression) {\n OnSetClause clause = new OnSetClause();\n clause.addAssignment(expression);\n return clause;\n }", "public java.util.List<IdDt> getCondition() { \n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\treturn myCondition;\n\t}", "public void on() {\n System.out.println(\"C + on = B\");\n }", "public OverallCondition getCondition() {\n return condition;\n }", "public final void addCondition(final Condition c) {\n m_body.add(c);\n }", "public void noteOn()\n\t{\n\t\ttimeFromOn = 0f;\n\t\tisTurnedOn = true;\n\t\t\n\t\t// ddf: reset these so that the envelope can be retriggered\n\t\ttimeFromOff = -1.f;\n\t\tisTurnedOff = false;\n\t}", "public IdDt addCondition() {\n\t\tIdDt newType = new IdDt();\n\t\tgetCondition().add(newType);\n\t\treturn newType; \n\t}", "public void addObservation(Double observation, WILCOXON_SET set) {\n observations.add(new Pair<Double, WILCOXON_SET>(observation, set));\n }", "public Long getConditionid() {\r\n return conditionid;\r\n }", "public Condition [] getConditions() {\n return this.Conditions;\n }", "public void setOn(boolean arg) {\n isOn = arg;\n }", "@Override\n public void receivedReply(final BreakpointConditionSetReply reply) {\n }", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public OperandCondition(Operand operand) {\n this.operand = operand;\n }", "public void check_comment_at_the_end_of_statement(boolean on){\r\n this.e_comment_at_the_end_of_statement = on;\r\n }", "public void setOn(boolean on) {\n\t\tthis.on = on;\n\t}", "public void visit(ConditionSingle conditionSingle)\n\t{\n\t\tinsertJumpAtEndOfCondition();\n\t}", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public void dumpState() {\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> BEGIN - dumpState\");\n\n\t\t\tSystem.out.println(\" ::--> Set : \" + mCombination);\n\n\t\t\tif (mConditions != null) {\n\t\t\t\tSystem.out.println(\" ::--> [\" + mConditions.size() + \"]\");\n\t\t\t\tSystem.out.println(\" ::----------------::\");\n\n\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\tSeqCondition cond = mConditions.get(i);\n\n\t\t\t\t\tcond.dumpState();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" NULL\");\n\t\t\t\tSystem.out.println(\" ::----------------::\");\n\t\t\t}\n\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> END - dumpState\");\n\t\t}\n\t}", "public boolean addCondition(String condition) {\r\n\t\t// if the condition is not already there...\r\n\t\tif (\r\n\t\t\t\tafterFrom.toString().indexOf( condition.trim() ) < 0 &&\r\n\t\t\t\tafterWhere.toString().indexOf( condition.trim() ) < 0\r\n\t\t) {\r\n\t\t\tif ( !condition.startsWith( \" and \" ) ) {\r\n\t\t\t\tafterWhere.append( \" and \" );\r\n\t\t\t}\r\n\t\t\tafterWhere.append( condition );\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void logMinimalSet(Set<BitSet> minset) {\n\t\tLOG.log(Level.FINER, () -> \"\");\n\t\tLOG.log(Level.FINER, () -> \"Minimalna pokrivanja još trebaju:\");\n\t\tLOG.log(Level.FINER, minset::toString);\n\t}", "private void assertCondition(Condition condition) {\n\t}", "public void addConditionAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Condition\", ViewNavigator.ADD_CONDITION_SCENE);\n\t}", "public void select(Condition condition) {\n int i;\n boolean z = DEBUG;\n if (z) {\n String str = this.mTag;\n Log.d(str, \"select \" + condition);\n }\n int i2 = this.mSessionZen;\n if (i2 != -1 && i2 != 0) {\n final Uri realConditionId = getRealConditionId(condition);\n if (this.mController != null) {\n AsyncTask.execute(new Runnable() { // from class: com.android.systemui.volume.ZenModePanel.5\n @Override // java.lang.Runnable\n public void run() {\n ZenModePanel.this.mController.setZen(ZenModePanel.this.mSessionZen, realConditionId, \"ZenModePanel.selectCondition\");\n }\n });\n }\n setExitCondition(condition);\n if (realConditionId == null) {\n this.mPrefs.setMinuteIndex(-1);\n } else if ((isAlarm(condition) || isCountdown(condition)) && (i = this.mBucketIndex) != -1) {\n this.mPrefs.setMinuteIndex(i);\n }\n setSessionExitCondition(copy(condition));\n } else if (z) {\n Log.d(this.mTag, \"Ignoring condition selection outside of manual zen\");\n }\n }", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n assertKeyWord(ScriptBasicKeyWords.KEYWORD_THEN);\n return condition;\n }", "@Override\n public PaymentP2007_03 where(Field<Boolean> condition) {\n return where(DSL.condition(condition));\n }", "OverallCondition(String condition) {\n this.condition = condition;\n }", "public void analyzeSetModified(AnalyzeInfo info)\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.analyzeSetModified(info);\n }", "@Pointcut(\"execution(* com.iamscratches.aopdemo.dao.*.set*(..))\")\n\tpublic void setter() {}", "public TCpyBankCreditExample when(boolean condition, IExampleWhen then) {\n if (condition) {\n then.example(this);\n }\n return this;\n }", "public static String [] getCond(){\n\t\treturn conditions;\n\t}", "public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}", "public boolean isOnCondition () \n\t{\n\t\tObject oo = get_Value(COLUMNNAME_IsOnCondition);\n\t\tif (oo != null) \n\t\t{\n\t\t\t if (oo instanceof Boolean) \n\t\t\t\t return ((Boolean)oo).booleanValue(); \n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public ElementDefinitionDt addCondition( String theId) {\n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\tmyCondition.add(new IdDt(theId));\n\t\treturn this; \n\t}", "public boolean recordPassedParameter(PassedParameter cm) {\n if (passedParameters == null) passedParameters = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n return passedParameters.add(cm);\n }", "public void setInput(int index, Condition condition) {\n Log.d(\"STATE\", \"SETTING INPUT\");\n if (inputs.size() > index) {\n inputs.set(index, condition);\n } else {\n inputs.add(condition);\n }\n }" ]
[ "0.61183983", "0.60869986", "0.56093717", "0.54562235", "0.53374887", "0.5274844", "0.52375233", "0.51586807", "0.5152134", "0.5078918", "0.5022161", "0.5014557", "0.50087935", "0.49734482", "0.4972788", "0.49539217", "0.49532932", "0.49474195", "0.49220788", "0.48900458", "0.48856005", "0.48852962", "0.48738712", "0.4869331", "0.48583883", "0.48551288", "0.48340097", "0.48315725", "0.48104632", "0.48018005", "0.47908315", "0.47849065", "0.47517392", "0.47345683", "0.47264248", "0.47111273", "0.47098446", "0.47079274", "0.47041595", "0.4703619", "0.4703403", "0.4691767", "0.4691767", "0.4691767", "0.4691767", "0.46744162", "0.4654396", "0.46538916", "0.4650445", "0.46422973", "0.46365544", "0.46334994", "0.46318367", "0.4631295", "0.46164623", "0.46134725", "0.4611844", "0.45970833", "0.4575668", "0.45724168", "0.45677346", "0.4556413", "0.45552865", "0.4554872", "0.4548756", "0.45445648", "0.45350406", "0.45191735", "0.45118204", "0.45077142", "0.45064762", "0.45060936", "0.4498664", "0.44926646", "0.44889003", "0.44861877", "0.44832498", "0.44805247", "0.44727007", "0.4467538", "0.44627884", "0.44559792", "0.44398615", "0.44330013", "0.44321394", "0.44319496", "0.44288805", "0.44150805", "0.4412973", "0.44121897", "0.44096467", "0.43978855", "0.4395407", "0.4393931", "0.43902442", "0.43860862", "0.43860596", "0.4374479", "0.43641952", "0.4355933" ]
0.59746265
2
Record the end of a condition.
public void endCondition(String condition, long time) { if (onsetConditions.containsKey(condition)) { onsetConditions.get(condition).endLastEntry(time); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onConditionEnd(String module, String condition, long time) {\n boolean isModulePresent = sources.containsKey(module);\n if (isModulePresent) {\n sources.get(module).endCondition(condition, time);\n }\n }", "protected void end() {\n \t// theres nothing to end\n }", "public void endRecord() {\n if (recordHandler != null)\n recordHandler.record(record);\n }", "protected abstract boolean end();", "public abstract void endRecord();", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "public void setFinishCondition(java.lang.String finishCondition) {\n this.finishCondition = finishCondition;\n }", "public void end() {\n\t\tsigue = false;\n\t}", "@Override\n public void end() {\n }", "protected void end() {\n \n \n }", "public void end() {\n\n }", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n isFinished();\n }", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "protected void end()\n\t{\n\t}", "public abstract boolean shouldEnd();", "public interface ConditionsEndable {\n\n public boolean areEndingConditionsMet();\n\n public void end();\n\n}", "public static void endStep() {\n\t\tTestNotify.log(GenLogTC() + \"has been tested.\");\n\t}", "private void insertJumpAtEndOfCondition(){\n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jcc + Code.eq);\n\t\t\n\t\t// save current pc and store it as jmp address\n\t\tjmpNotThen.push(Code.pc);\n\t\tCode.put2(0);\n\t\t\n\t}", "public abstract void end();", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\t\t\n\t}", "@Override\n protected void end() {\n }", "public void end();", "protected void end() {\n\r\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "public java.lang.String getFinishCondition() {\n return finishCondition;\n }", "public void setEnd(){\n\t\tthis.isEnd=true;\n\t}", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "public void end() {\n\t\tend = System.currentTimeMillis();\n\t\t\n\t\tLogger.d(\"[Stopwatch] \" + msg + \" finished in : \" + duration() + \" milliseconds.\");\n\t}", "@Override\n\tprotected void end() {\n\t\t//System.out.println(this.getClass().getSimpleName() + \" end\");\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "boolean isSetEnd();", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "public void endWrite() throws ThingsException;", "@Override\n protected void end() {\n\n }", "public void end() throws Exception;", "public Builder<T> endIf() {\n this.ifCond = true;\n return this;\n }" ]
[ "0.65820843", "0.6119155", "0.61073434", "0.6101128", "0.60867596", "0.60771406", "0.60771406", "0.60771406", "0.60771406", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.607344", "0.6013639", "0.59845597", "0.59826446", "0.59760463", "0.59746474", "0.5970783", "0.5970783", "0.5970783", "0.5970783", "0.5970783", "0.5970783", "0.59591657", "0.5950633", "0.59406984", "0.5886365", "0.5883768", "0.58748686", "0.58669156", "0.5846206", "0.5829286", "0.58278614", "0.58278614", "0.5824172", "0.5812864", "0.58049625", "0.57819617", "0.57796323", "0.57796323", "0.57796323", "0.57796323", "0.5778475", "0.5774196", "0.5754649", "0.573461", "0.5712829", "0.5712829", "0.5712829", "0.57079196", "0.5692339", "0.56803805", "0.56722516", "0.56667435", "0.56667435", "0.5665067", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56350154", "0.56140757", "0.5606787", "0.56067395", "0.5591183" ]
0.72844934
0
Get the last recorded onset time.
public Long getConditionLastOnsetTime(String condition) { if (onsetConditions.containsKey(condition)) { return onsetConditions.get(condition).getLastOnsetTime(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getLastOnsetTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getOnsetTime();\n }\n }", "public Date getLastTime() {\n return lastTime;\n }", "Date getLastTime();", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public Integer getOnTime() {\n return onTime;\n }", "public IUTCTime getLastTime() {\n if (null == lastTime) {\n return new UTCTime(0);\n }\n return lastTime;\n }", "public Date getLastlogintime() {\n return lastlogintime;\n }", "long getLastAccessedTime();", "long getLastPersistenceTime();", "public int getLastTimetable() {\n return lastTimetable;\n }", "public long getLastTouchMillis()\n {\n return m_dtLastUse;\n }", "public Date getEventTime() {\n\t\treturn time;\n\t}", "public long getEventTime();", "public static long getLastResetTime() {\n return p().lastReset;\n }", "public String getLastUpdTime() {\n return lastUpdTime;\n }", "long getRetrievedTime();", "private long getNow()\n {\n // no need to convert to collection if had an Iterables.max(), but not present in standard toolkit, and not worth adding\n List<SSTableReader> list = new ArrayList<>();\n Iterables.addAll(list, cfs.getSSTables(SSTableSet.LIVE));\n if (list.isEmpty())\n return 0;\n return Collections.max(list, (o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp()))\n .getMaxTimestamp();\n }", "public LocalDateTime getLastUpdTime() {\n return (LocalDateTime) get(7);\n }", "public DateTime getLastSynced() {\n\t\treturn mLastSynced;\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public Date getJlastTime() {\n return jlastTime;\n }", "public Date takeOff() {\n \t\r\n \tthis.lastTimeTookOf = new Date();\r\n \treturn lastTimeTookOf;\r\n }", "public double getTimeOffset() {\r\n return lastTimeOutput;\r\n }", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\r\n \treturn time;\r\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public Date getLastUpdTime() {\n return lastUpdTime;\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public long getLastAttackTime() {\r\n\t\treturn lastAttackTime;\r\n\t}", "public Date getLastSaved()\r\n {\r\n return (m_lastSaved);\r\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time;\n }", "public long getTimeOfLastValuesChanged();", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public OffsetDateTime lastUpdateTime() {\n return this.lastUpdateTime;\n }", "public long getTime() {\n return timeMillis;\n }", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public Timestamp getLastModifiedOn() {\r\n\t\treturn lastModifiedOn;\r\n\t}", "public Date getLastSendRequestTime()\r\n {\r\n return lastSendRequestTime;\r\n }", "public long getLastUpdateTs() {\n return lastUpdateTs;\n }", "public Long getSunsetTime(){\n return sunsetTime;\n }", "@java.lang.Override\n public long getTime() {\n return time_;\n }", "public Date getLastAccessTime() {\n return lastAccessTime;\n }", "public int getLastEventTimestamp() {\n return lastTimestamp;\n }", "public long getLastAccessTime();", "public Date getTime() {\n\t\treturn time;\n\t}", "public Date getLastUpdateTime() {\r\n return lastUpdateTime;\r\n }", "public String getLastEditTime() {\n return editedTimeList.get(editedTimeList.size() - 1);\n }", "public Long getTime() {\n return time;\n }", "public Date getTime() {\r\n\t\treturn time;\r\n\t}", "public long getLastUpdateTime() {\n return this.lastUpdateTime;\n }", "public long getTime() {\n return _time;\n }", "public long getLastPlayed ( ) {\n\t\treturn extract ( handle -> handle.getLastPlayed ( ) );\n\t}", "public Date getAtTime() {\r\n return atTime;\r\n }", "public long getEventTime() {\n return eventTime;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public long getLastUpdateTime() {\n return lastUpdateTime;\n }", "@Override\n\tpublic long getLastAccessedTime() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long getLastAccessedTime() {\n\t\treturn 0;\n\t}", "public Date getLastUpdateTime() {\n return lastUpdateTime;\n }", "public Date getLastUpdateTime() {\n return lastUpdateTime;\n }", "public ScheduledHarvest getLastOneTimeHarvest() {\n\n\t\treturn lastOneTimeHarvest;\n\n\t}", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public final long getTime () {\n return time;\n }", "public Date time() {\n return _time;\n }", "public Date time() {\n return _time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Instant getLastUpdate() {\n return lastUpdate;\n }", "public String getTime() {\n return this.time;\n }", "Date snapshotTime();", "long getLastFetchTimeMs();", "public int getTime() {\r\n return time;\r\n }", "public Date getTimeNow() {\r\n return timeNow;\r\n }", "public long getLastWriteTime() {\n return LAST_WRITE_TIME;\n }", "public DateTime lastTrainedDateTime() {\n return this.lastTrainedDateTime;\n }", "public Timestamp getLastUpdatedAt() {\n return (Timestamp) getAttributeInternal(LASTUPDATEDAT);\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public String getEventTime() {\r\n return eventTime;\r\n }", "@Override\n\tpublic Date getLastAccessTime() {\n\t\treturn start;\n\t}" ]
[ "0.7844123", "0.7076586", "0.69751996", "0.69397306", "0.6832878", "0.6749902", "0.671053", "0.66293085", "0.6606319", "0.6547072", "0.65311605", "0.6515254", "0.64632577", "0.6453463", "0.64100593", "0.64053", "0.6352371", "0.6342705", "0.632614", "0.6297245", "0.627863", "0.6275332", "0.62665296", "0.62646365", "0.62644136", "0.6251631", "0.6246741", "0.6229307", "0.6222967", "0.62032163", "0.62032163", "0.6193246", "0.6178352", "0.6178352", "0.6178352", "0.6176142", "0.6175883", "0.61653495", "0.61644936", "0.6161252", "0.6161252", "0.6161252", "0.6161252", "0.6161252", "0.6161252", "0.61542636", "0.6154237", "0.6153832", "0.6150907", "0.6141378", "0.61412215", "0.61303735", "0.61297715", "0.6125969", "0.6120566", "0.61166877", "0.6111269", "0.61074054", "0.60936415", "0.60874933", "0.60856587", "0.6083056", "0.6082212", "0.60794646", "0.6076264", "0.6067493", "0.6063736", "0.6055617", "0.60512406", "0.60504067", "0.6048207", "0.6048207", "0.6048207", "0.6041083", "0.60382205", "0.60382205", "0.60320246", "0.60320246", "0.6031678", "0.60269856", "0.60235935", "0.60226834", "0.60226834", "0.60217696", "0.60217696", "0.60217696", "0.60217696", "0.601874", "0.60177875", "0.60063636", "0.6005559", "0.60030097", "0.60016793", "0.60012966", "0.5996412", "0.5994594", "0.5991612", "0.5991612", "0.5991612", "0.59887266", "0.59870213" ]
0.0
-1
Get the last recorded end time.
public Long getConditionLastEndTime(String condition) { if (onsetConditions.containsKey(condition)) { return onsetConditions.get(condition).getLastEndTime(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getEnd_time() {\n return end_time;\n }", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public java.lang.String getTime_end() {\r\n return time_end;\r\n }", "public long getTimeEnd()\n {\n return this.timeEnd;\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "com.google.protobuf.Timestamp getEndTime();", "public Date getEndtime() {\n return endtime;\n }", "public String getEndtime() {\n return endtime;\n }", "public Date getLastTime() {\n return lastTime;\n }", "public LocalTime getEndTime () {\n\t\treturn DateUtils.toLocalTime(this.end);\n\t}", "public long getEndTime() {\r\n return endTime;\r\n }", "public long getLastCallEndTimestamp() {\n if (!mCallRecords.isEmpty()) {\n return mCallRecords.get(0).getCallEndTimestamp();\n }\n return -1;\n }", "public long getEndTime() {\n return endTime;\n }", "public long getEndTime() {\n return endTime;\n }", "public long getEndTimestamp();", "public long getEndTime() {\n\t\treturn endTime;\n\t}", "java.util.Calendar getEndTime();", "int getEndTime();", "int getEndTime();", "int getEndTime();", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "public Date getEndTime() {\r\n return this.endTime;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "public java.sql.Time getREQ_END_TIME()\n {\n \n return __REQ_END_TIME;\n }", "public Date getEndTime() {\n return this.endTime;\n }", "@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}", "public double getEndTime() {\n return endTime;\n }", "public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }", "public LocalTime getEnd() {\n\treturn end;\n }", "com.google.protobuf.Timestamp getDepositEndTime();", "public Date getEndTime() {\n\t\treturn endTime;\n\t}", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public String getEndTime()\n {\n return this.endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public abstract long getEndTimestamp();", "Date getLastTime();", "public Long getTimestampEnd();", "public long getEndTime() {\n if (endTime < 0) {\n try {\n String datestr = PropertyArray.get(props, END);\n\n if (datestr == null) {\n // this may be more expensive because it can cause a\n // reload from disk\n try {\n datestr = getProperty(END);\n } catch (Fault f) {\n }\n }\n\n if (datestr != null) {\n Date date = parseDate(datestr);\n endTime = date.getTime();\n } else {\n // info not available\n }\n } catch (ParseException e) {\n }\n }\n\n return endTime;\n }", "public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }", "public String getEndTime();", "public String getEndTime();", "long getEndTime() {\n return endTime;\n }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public String getEndTime() {\r\n return endTime;\r\n }", "public java.util.Date getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return this.EndTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "@Override\n public Date getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public Integer getEndTime() {\n return endTime;\n }", "public IUTCTime getLastTime() {\n if (null == lastTime) {\n return new UTCTime(0);\n }\n return lastTime;\n }", "public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }", "public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}", "com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public abstract Date getEndTime();", "public Date getjEndtime() {\n return jEndtime;\n }", "public String getEndTimeString() {\n return endTimeString;\n }", "public OffsetDateTime finishTime() {\n return this.finishTime;\n }", "public BidTime getFinishTime() {\r\n\t\treturn finishTime;\r\n\t}", "public Calendar getEndTime() {\r\n\t\treturn endTime;\r\n\t}", "public String endTime(){\r\n\t\tsaleEnded = Calendar.getInstance().getTime();\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\r\n\t\tString endTime = dateFormat.format(time);\r\n\t\treturn endTime;\r\n\t}", "public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }", "@Override\n\tpublic String getFinishTime() {\n\t\treturn finishTime;\n\t}", "public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public OffsetDateTime endTime() {\n return this.endTime;\n }", "public Date get_end() {\n\t\treturn this.end;\n\t}", "public Long getLastOnsetTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getOnsetTime();\n }\n }", "public Date getAudioVideoEndTime() {\n return (Date)getAttributeInternal(AUDIOVIDEOENDTIME);\n }", "public Date getEndTimeDate() {\n return endTimeDate;\n }", "public String LastEndTimePlus() {\n int _hour = Integer.parseInt(lastEndTime.substring(0, lastEndTime.indexOf(':')));\n int _minute = Integer.parseInt(lastEndTime.substring(lastEndTime.indexOf(':') + 1));\n\n if (_minute == 59) {\n _hour++;\n _minute = 0;\n } else {\n _minute++;\n }\n\n String resultHour = _hour < 10 ? '0' + Integer.toString(_hour) : Integer.toString(_hour);\n String resultMinute = _minute < 10 ? '0' + Integer.toString(_minute) : Integer.toString(_minute);\n\n return resultHour + \":\" + resultMinute;\n }", "public long getCallEndTimestamp() {\n return mCallEndTimestamp;\n }", "public String getEndTime() {\n/* 34 */ return this.endTime;\n/* */ }", "com.google.protobuf.Timestamp getVotingEndTime();", "public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "net.opengis.gml.x32.TimeInstantPropertyType getEnd();", "public Date getTenderEndTime() {\n return tenderEndTime;\n }", "@Override\n\t\tpublic long getEndMillis() {\n\t\t\treturn 0;\n\t\t}", "Instant getEnd();", "public Long getLastRunDuration();", "public Date getLastlogintime() {\n return lastlogintime;\n }", "public long getEndWallClockTime() {\n return endWallClockTime;\n }", "long getVisitEndtime();", "long getVisitEndtime();", "com.google.protobuf.TimestampOrBuilder getDepositEndTimeOrBuilder();", "@Override\r\n\tpublic Date getEventEndTime() {\n\t\treturn null;\r\n\t}" ]
[ "0.80836844", "0.8041414", "0.79065126", "0.7866501", "0.78420126", "0.7820941", "0.7784749", "0.7732828", "0.76972276", "0.7666575", "0.76432955", "0.76321876", "0.7561227", "0.7554932", "0.75315076", "0.7524631", "0.7524631", "0.7504346", "0.7481767", "0.74558747", "0.7419971", "0.7419971", "0.7419971", "0.74156517", "0.7383958", "0.7383958", "0.7382818", "0.7377833", "0.7377833", "0.73709536", "0.7369029", "0.7333933", "0.7325854", "0.731946", "0.73071045", "0.7306318", "0.73038614", "0.72943074", "0.7282742", "0.7282742", "0.7273841", "0.72716016", "0.72716016", "0.72716016", "0.72674537", "0.72591144", "0.725246", "0.72489387", "0.7248289", "0.72448295", "0.72448295", "0.7240417", "0.7240215", "0.7235102", "0.7232754", "0.72318584", "0.7188986", "0.7188986", "0.7188986", "0.7168293", "0.71580756", "0.71566296", "0.7134567", "0.70847094", "0.7084699", "0.7069813", "0.7059969", "0.70449615", "0.70238364", "0.7010905", "0.69742024", "0.69560635", "0.6955165", "0.69498116", "0.6939817", "0.68991864", "0.68861073", "0.68851733", "0.68849283", "0.6840367", "0.68387336", "0.678752", "0.6767626", "0.67659926", "0.67550886", "0.67544156", "0.67509264", "0.67424583", "0.6711428", "0.6699963", "0.6680216", "0.6675135", "0.6653529", "0.66103673", "0.65768933", "0.6559154", "0.65534306", "0.65424496", "0.65424496", "0.65094984", "0.64969134" ]
0.0
-1
Get the condition for the supplied state.
public String getConditionFromState(String state) { if (state2conditionMapping.containsKey(state)) { return state2conditionMapping.get(state); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getConditionFromState(String module, String state) {\n String result = null;\n boolean isModulePresent = sources.containsKey(module);\n if (isModulePresent) {\n result = sources.get(module).getConditionFromState(state);\n }\n return result;\n }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "Event getCondition();", "public Object getCondition();", "Condition getCondition(String conditionName, Lock lock);", "String getCondition();", "java.lang.String getCondition();", "public Condition getCondition() {\n return condition;\n }", "com.google.protobuf.ByteString getConditionBytes();", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public Expression getCondition()\n {\n return this.condition;\n }", "public OverallCondition getCondition() {\n return condition;\n }", "ConditionFactory getConditionFactory();", "OclExpression getCondition();", "Condition createCondition();", "public String getCondition() {\n\t\treturn condition;\n\t}", "public String getCondition() {\n return condition;\n }", "public String getCondition() {\n\treturn condition;\n}", "public ExpressionNode getCondition();", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}", "private double condProb(String stateGiven, String stateFind){\n HashMap probs = genAllProb(stateGiven);\n return (double) probs.get(stateFind);\n }", "io.grpc.user.task.PriceCondition getCondition();", "ICDICondition getCondition() throws CDIException;", "int getConditionValue();", "public WeatherCondition getCondition() {\n return condition;\n }", "Expression getCond();", "public Reference condition() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_CONDITION);\n }", "Expr getCond();", "public Condition getCondition() {\n\t\treturn new MoveDistanceCondition(5,5);\n\t}", "@Override\n\tpublic VehicleCondition getCondition() {\n\t\treturn condition;\n\t}", "condition getConditionAllocution();", "cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();", "public native ConditionerTemplate getConditioner(int idx);", "private DependResult getDependResultByState(TaskExecutionStatus state) {\n\n if (!state.isFinished()) {\n return DependResult.WAITING;\n } else if (state.isSuccess()) {\n return DependResult.SUCCESS;\n } else {\n return DependResult.FAILED;\n }\n }", "public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }", "public ContractValue getCondition(int argumentIndex) {\n ContractValue left;\n if (this == NULL_VALUE || this == NOT_NULL_VALUE) {\n left = ContractValue.nullValue();\n }\n else if (this == TRUE_VALUE || this == FALSE_VALUE) {\n left = ContractValue.booleanValue(true);\n }\n else {\n return ContractValue.booleanValue(true);\n }\n return ContractValue.condition(left, RelationType.equivalence(!shouldUseNonEqComparison()), ContractValue.argument(argumentIndex));\n }", "LogicCondition createLogicCondition();", "public double cond() {\n return new SingularValueDecomposition(this).cond();\n }", "public ASTNode getCondition() {\n \treturn (ASTNode)getChildNode(ChooseRulePlugin.GUARD_NAME);\n }", "private TaskState getState(String type, String state) {\r\n\t\tTaskType tt = getType(type);\r\n\t\tif (tt != null) {\r\n\t\t\tfor (TaskState ts : tt.states) {\r\n\t\t\t\tif (ts.name.equals(state))\r\n\t\t\t\t\treturn ts;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static OperationType stateOf(String state) {\n for (OperationType stateEnum : values()) {\n if (stateEnum.getOperation().equals(state)) {\n return stateEnum;\n }\n }\n return null;\n }", "public ParamsRequestCondition getParamsCondition()\n/* */ {\n/* 133 */ return this.paramsCondition;\n/* */ }", "public String getJobCondition() {\n return jobCondition;\n }", "PowerState getState();", "@Override\n\tpublic String getcond() {\n\t\treturn null;\n\t}", "public String getWorkingCondition() {\r\n return workingCondition;\r\n }", "@Override\n public ConditionType getConditionType() {\n return typeLookup.get(_cfRule.getType());\n }", "public RequestCondition<?> getCustomCondition()\n/* */ {\n/* 164 */ return this.customConditionHolder.getCondition();\n/* */ }", "private StateVertex getStateInGraph(StateVertex state) {\n\t\tSet<StateVertex> states = getAllStates();\n\n\t\tfor (StateVertex st : states) {\n\t\t\tif (state.equals(st)) {\n\t\t\t\treturn st;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "static ExpressionParsingState composeConditionalExpression(\n final ExpressionParsingState state, final int nodeIndex) {\n \n final String input = state.get(nodeIndex).getInput();\n \n if (StringUtils.isEmptyOrWhitespace(input)) {\n return null;\n }\n\n // Trying to fail quickly...\n final int condSuffixPos = input.indexOf(CONDITION_SUFFIX_CHAR);\n if (condSuffixPos == -1) {\n return state;\n }\n \n final String condStr = input.substring(0, condSuffixPos);\n final String remainder = input.substring(condSuffixPos + 1);\n\n if (remainder.indexOf(CONDITION_SUFFIX_CHAR) != -1) {\n // There are two \"?\" symbols\n return null;\n }\n\n final int thenElseSepPos = remainder.indexOf(CONDITION_THENELSE_SEPARATOR_CHAR);\n if (remainder.lastIndexOf(CONDITION_THENELSE_SEPARATOR_CHAR) != thenElseSepPos) {\n // There are two \":\" symbols\n return null;\n }\n\n String thenStr = null;\n String elseStr = null;\n if (thenElseSepPos != -1) {\n if (thenElseSepPos == 0) {\n // Maybe it is a default operation\n return state;\n }\n thenStr = remainder.substring(0, thenElseSepPos);\n elseStr = remainder.substring(thenElseSepPos + 1);\n } else {\n thenStr = remainder;\n }\n\n \n final Expression condExpr = ExpressionParsingUtil.parseAndCompose(state, condStr);\n if (condExpr == null) {\n return null;\n }\n\n final Expression thenExpr = ExpressionParsingUtil.parseAndCompose(state, thenStr);\n if (thenExpr == null) {\n return null;\n }\n\n Expression elseExpr = VariableExpression.NULL_VALUE;\n if (elseStr != null) {\n elseExpr = ExpressionParsingUtil.parseAndCompose(state, elseStr);\n if (elseExpr == null) {\n return null;\n }\n }\n\n \n final ConditionalExpression conditionalExpressionResult = \n new ConditionalExpression(condExpr, thenExpr, elseExpr);\n state.setNode(nodeIndex,conditionalExpressionResult);\n \n return state;\n \n }", "public Long getConditionId() {\n return _conditionId;\n }", "public int getConditionCode() {\n\t\t\treturn conditionCode;\n\t\t}", "StateT getState();", "public final TestConditionModel getTestConditionModel() {\r\n\t\treturn testConditionModel;\r\n\t}", "public Filter condition();", "public Long getConditionid() {\r\n return conditionid;\r\n }", "public interface Conditioned {\n @Nullable\n ROSCondition getCondition();\n }", "State getState();", "State getState();", "State getState();", "State getState();", "@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}", "public DebugEvaluatedCondition getBaseCondition() {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_baseCondition == null)\n jcasType.jcas.throwFeatMissing(\"baseCondition\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n return (DebugEvaluatedCondition)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_baseCondition)));}", "public IdDt getConditionFirstRep() {\n\t\tif (getCondition().isEmpty()) {\n\t\t\treturn addCondition();\n\t\t}\n\t\treturn getCondition().get(0); \n\t}", "@Override UpodCondition getConditionTest(UpodProgram pgm) {\n return null;\n }", "public String getStateUpperBoundConstraint(Scope<?> scope, StateModelDefId stateModelDefId,\n State state) {\n // set up attributes to match based on the scope\n ClusterConstraints stateConstraints = getConstraintMap().get(ConstraintType.STATE_CONSTRAINT);\n Map<ConstraintAttribute, String> matchAttributes = Maps.newHashMap();\n matchAttributes.put(ConstraintAttribute.STATE, state.toString());\n matchAttributes.put(ConstraintAttribute.STATE_MODEL, stateModelDefId.toString());\n switch (scope.getType()) {\n case CLUSTER:\n // cluster is implicit\n break;\n case RESOURCE:\n matchAttributes.put(ConstraintAttribute.RESOURCE, scope.getScopedId().stringify());\n break;\n default:\n LOG.error(\"Unsupported scope for state constraint: \" + scope);\n return \"-1\";\n }\n Set<ConstraintItem> matches = stateConstraints.match(matchAttributes);\n int value = -1;\n for (ConstraintItem item : matches) {\n // match: if an R or N is found, always choose that one\n // otherwise, take the minimum of the counts specified in the constraints\n String constraintValue = item.getConstraintValue();\n if (constraintValue != null) {\n if (constraintValue.equals(ConstraintValue.N.toString())\n || constraintValue.equals(ConstraintValue.R.toString())) {\n return constraintValue;\n } else {\n try {\n int current = Integer.parseInt(constraintValue);\n if (value == -1 || current < value) {\n value = current;\n }\n } catch (NumberFormatException e) {\n LOG.error(\"Invalid state upper bound: \" + constraintValue);\n }\n }\n }\n }\n return Integer.toString(value);\n }", "public double conditionP2() {\n return ops.conditionP2(mat);\n }", "public java.util.List<IdDt> getCondition() { \n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\treturn myCondition;\n\t}", "public ObjectId findAttributeEntityState(String name, ObjectId classEntityState, Commit c) {\r\n if (classEntityState == null) {\r\n return null;\r\n }\r\n Query<CodeEntityState> attributeStates = datastore.find(CodeEntityState.class);\r\n\r\n if (c.getCodeEntityStates() != null && c.getCodeEntityStates().size() > 0) {\r\n attributeStates.and(\r\n attributeStates.criteria(\"_id\").in(c.getCodeEntityStates()),\r\n attributeStates.criteria(\"ce_type\").equal(\"attribute\"),\r\n attributeStates.criteria(\"ce_parent_id\").equal(classEntityState),\r\n attributeStates.criteria(\"long_name\").startsWith(name.replace(\"#\", \".\"))\r\n\r\n );\r\n } else {\r\n attributeStates.and(\r\n attributeStates.criteria(\"commit_id\").equal(c.getId()),\r\n attributeStates.criteria(\"ce_type\").equal(\"attribute\"),\r\n attributeStates.criteria(\"ce_parent_id\").equal(classEntityState),\r\n attributeStates.criteria(\"long_name\").startsWith(name.replace(\"#\", \".\"))\r\n\r\n );\r\n }\r\n final List<CodeEntityState> attributes = attributeStates.asList();\r\n\r\n if (attributes.size() == 1) {\r\n return attributes.get(0).getId();\r\n } else {\r\n logger.debug(\"Could not find ces for attribute: \" + name + \" in commit \" + c.getRevisionHash());\r\n return null;\r\n }\r\n }", "public String getConditiondescription() {\r\n return conditiondescription;\r\n }", "public com.google.protobuf.ByteString\n getInitCondBytes() {\n Object ref = initCond_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n initCond_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getFixedCondition() {\n return _fixedCondition;\n }", "private JComboBox getCondition() {\n\t\tif (condition == null) {\n\t\t\tcondition = new JComboBox();\n\t\t\tcondition.setModel(new DefaultComboBoxModel(new String [] {\"<\", \"=\", \">\"}));\n\t\t\tcondition.setSelectedIndex(1);\n\t\t\t\n\t\t}\n\t\treturn condition;\n\t}", "int getWinCondition();", "public String getEvaluationCondition()\r\n {\r\n return evaluationCondition;\r\n }", "public Cond newCond() {\n return new Cond();\n }", "@Override\n public com.google.protobuf.ByteString\n getInitCondBytes() {\n Object ref = initCond_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n initCond_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getAction(int state) {\n return explorationPolicy.ChooseAction(qvalues[state]);\n }", "@NotNull\r\n State getState();", "public RefactoringStatus getConditionStatus() {\n return fPreconditionStatus;\n }", "public Conditions getConditions() {\n // Lazy initialization with double-check.\n Conditions c = this.conditions;\n if (c == null) {\n synchronized (this) {\n c = this.conditions;\n if (c == null) {\n this.conditions = c = new Conditions();\n }\n }\n }\n return c;\n }", "public String getInitCond() {\n Object ref = initCond_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n initCond_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public int[] getConditions() { return conditional; }", "public static String getJobRunState(int state) {\n if (state < 1 || state >= RUNSTATES.length) {\n return UNKNOWN;\n }\n return RUNSTATES[state];\n }", "public State getState();", "public State getState();", "public int indexOfPostcondition(Postcondition state) {\r\n\t\treturn postconditions.indexOf( state );\r\n\t}", "public String getActualCriteria(GLState pGLState) {\n return Build.MODEL;\n }", "private static String getStateInput() {\n\t\treturn getQuery(\"Valid State\");\n\t}", "State getState(Long stateId);", "Boolean conditionResult();", "String getInitCond();", "BaseCondition createBaseCondition();", "@Override\r\n\tpublic String getCondition(String[] sql) {\n\t\treturn sql[4];\r\n\t}", "@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getConditionName() {\n return conditionName;\n }", "public EventCondition [] getEventConditions() {\n return this.EventConditions;\n }", "Conditions getConditions();", "public static String [] getCond(){\n\t\treturn conditions;\n\t}", "Constraint getBodyCondition();", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}" ]
[ "0.7036453", "0.64934576", "0.6455576", "0.644311", "0.64387137", "0.6433905", "0.6420111", "0.633442", "0.63006186", "0.6258195", "0.62529355", "0.61973745", "0.6153085", "0.612038", "0.60973716", "0.6085777", "0.60849446", "0.6073394", "0.60635513", "0.6044874", "0.5924672", "0.58873075", "0.5808095", "0.58047193", "0.578253", "0.57605976", "0.56961715", "0.56945944", "0.56868005", "0.5686208", "0.5630462", "0.5602283", "0.558684", "0.5571465", "0.54666156", "0.54522884", "0.5449645", "0.53641343", "0.53570455", "0.53532207", "0.52834094", "0.52737373", "0.52479887", "0.5210281", "0.5178678", "0.5175865", "0.51661116", "0.514774", "0.5129803", "0.51245385", "0.5079767", "0.50581187", "0.50580156", "0.5046034", "0.5040577", "0.5019433", "0.50167936", "0.5016419", "0.5016419", "0.5016419", "0.5016419", "0.5008761", "0.50085515", "0.49915856", "0.49867928", "0.49814194", "0.49717802", "0.49589255", "0.4955435", "0.49431312", "0.49421698", "0.49404752", "0.49025467", "0.48985445", "0.4889925", "0.48872975", "0.48862723", "0.48509198", "0.48444638", "0.48322275", "0.48169792", "0.48147804", "0.48080355", "0.48060578", "0.48028874", "0.48028874", "0.48005837", "0.47820288", "0.47782916", "0.4773657", "0.47532704", "0.47516775", "0.47505873", "0.47493866", "0.47490147", "0.47462368", "0.4741206", "0.47395784", "0.4731541", "0.47232354" ]
0.7842019
0
Get the recorded conditions and onset/end information.
public Map<String, OnsetCondition> getOnsetConditions() { return onsetConditions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Condition [] getConditions() {\n return this.Conditions;\n }", "Conditions getConditions();", "public EventCondition [] getEventConditions() {\n return this.EventConditions;\n }", "public static String [] getCond(){\n\t\treturn conditions;\n\t}", "public Set<Condition> getTrackedConditions() {\n return trackedConditions;\n }", "public int[] getConditions() { return conditional; }", "public List<ICondition> getConditions()\r\n\t{\r\n\t\treturn conditions;\r\n\t}", "public List<OperationEqField> getConditions()\n {\n if (conditions == null)\n {\n conditions = new ArrayList<>();\n }\n return conditions;\n }", "public List<ConditionalRequirement> getConditions() {\r\n return conditions;\r\n }", "public List<Condition> getConditions() {\n\t\treturn conditions;\n\t}", "public LinkedHashMap<String, LinkedHashSet<String>> getConditionsFromTable() {\n\t\tLinkedHashMap<String, LinkedHashSet<String>> toReturn = new LinkedHashMap<String, LinkedHashSet<String>>();\n\t\tfor (int i = 0; i < modelCondTable.getRowCount(); i++) {\n\t\t\tString key = (String) modelCondTable.getValueAt(i, 0);\n\t\t\tString value = (String) modelCondTable.getValueAt(i, 1);\n\t\t\tLinkedHashSet<String> setValue = new LinkedHashSet<String>(Arrays.asList(value.split(\";\")));\n\n\t\t\ttoReturn.put(key, setValue);\n\t\t}\n\t\treturn toReturn;\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a statefulset's current state.\")\n\n public List<V1StatefulSetCondition> getConditions() {\n return conditions;\n }", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public Conditions getConditions() {\n // Lazy initialization with double-check.\n Conditions c = this.conditions;\n if (c == null) {\n synchronized (this) {\n c = this.conditions;\n if (c == null) {\n this.conditions = c = new Conditions();\n }\n }\n }\n return c;\n }", "public SearchCondition[] getConditions();", "public DataLakeRequestConditions getRequestConditions() {\n return requestConditions;\n }", "public String getAssessmentandReportingPostconditions() {\n return assessmentandReportingPostconditions;\n }", "public FSArray getConditions() {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions)));}", "java.lang.String getCondition();", "String getCondition();", "private Set<Condition> getConditions(List<RuleInstance> rules)\n{\n Set<Condition> conds = new HashSet<Condition>();\n\n getTimeConditions(rules,conds);\n getSensorConditions(rules,conds);\n getCalendarConditions(rules,conds);\n\n return null;\n}", "com.google.protobuf.ByteString getConditionBytes();", "public java.util.List<IdDt> getCondition() { \n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\treturn myCondition;\n\t}", "public Object getCondition();", "@Override\n public VictoryConditionDetails getDetails() {\n Map<String, String> info = new LinkedHashMap<>();\n\n VictoryConditionDetails details = new VictoryConditionDetails();\n\n details.setKey(title);\n details.setInfo(info);\n\n info.put(\"Description:\", description);\n info.putAll(getShipEventInfo());\n info.put(\"Required Points:\", requiredPoints + \"\");\n\n return details;\n }", "cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();", "public java.util.List<FamilyMemberHistoryCondition> condition() {\n return getList(FamilyMemberHistoryCondition.class, FhirPropertyNames.PROPERTY_CONDITION);\n }", "private String E19Conditions() {\n StringBuilder buffer = new StringBuilder();\n int numCols = 60;\n int leftMargin = 17;\n String tmp1 = \" \";\n String tmp2 = \" \";\n String tmp3 = \" \";\n String indent = \"\";\n for (int i = 0; i < leftMargin; i++) {\n indent = indent.concat(\" \");\n }\n buffer.append(\"\\f\");\n buffer.append(TextReportConstants.E19_HDR_CONDITIONS + \"\\n\\n\");\n\n TextReportData data = TextReportDataManager.getInstance()\n .getDataForReports(lid, 0);\n\n if (data.getRiverstat().getMile() != HydroConstants.MISSING_VALUE) {\n tmp1 = String.format(\"%-6.1f\", data.getRiverstat().getMile());\n }\n if (data.getRiverstat().getDa() != HydroConstants.MISSING_VALUE) {\n tmp2 = String.format(\"%-6.1f\", data.getRiverstat().getDa());\n }\n if (data.getRiverstat().getPool() != HydroConstants.MISSING_VALUE) {\n tmp3 = String.format(\"%-6.1f\", data.getRiverstat().getPool());\n }\n\n buffer.append(String.format(\n \" MILES ABOVE MOUTH: %s%sDRAINAGE AREA: %s%sPOOL STAGE: %s\",\n tmp1, \" \", tmp2, \" \", tmp3));\n buffer.append(\"\\n\\n\\n\");\n\n buffer.append(\" STREAM BED: \");\n\n if (data.getDescrip().getBed() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getBed(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" REACH: \");\n if (data.getDescrip().getReach() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getReach(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" REGULATION: \");\n if (data.getDescrip().getRes() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getRes(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" DIVERSION: \");\n if (data.getDescrip().getDivert() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getDivert(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" WINTER: \");\n if (data.getDescrip().getIce() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getIce(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" TOPOGRAPHY: \");\n if (data.getDescrip().getTopo() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getTopo(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" REMARKS: \");\n if (data.getDescrip().getRemark() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getRemark(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(0, buffer.toString()));\n\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\")).getTime();\n String footer = createFooter(data, E19_RREVISE_TYPE, sdf.format(d),\n \"NWS FORM E-19\", E19_CONDITIONS, \"CONDITIONS\", null,\n E19_STANDARD_LEFT_MARGIN);\n buffer.append(footer);\n\n return buffer.toString();\n }", "public String toString(){\r\n\t\tString cons = \"Conditions\\n\";\r\n\t\t//enhanced for loop could also be used\r\n\t\tfor(int i = 0; i<conditions.size(); i++){\r\n\t\t\tcons += conditions.get(i).getName()+\"\\n\";\r\n\t\t}\r\n\t\treturn \"Name : \" + fname + \" \" + lname+\"\\nDate Of Birth: \" + age+ \"\\n\" + cons; \r\n\t}", "public int getConditionCount() {\n return this.conditions.size();\n }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "public String[] getConditionAccessTimestampNames();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a deployment's current state.\")\n\n public List<V1DeploymentCondition> getConditions() {\n return conditions;\n }", "io.dstore.values.StringValue getConditionList();", "public Condition getCondition() {\n return condition;\n }", "public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n assertEquals(\"Diabetes\", condition.getTitle());\n assertEquals(\"diabetes\", condition.getName());\n assertEquals(EMPTY, condition.getType());\n assertEquals(\"DIAB1\", condition.getForm());\n assertEquals(DIABETES_CONDITION, condition.getDomain());\n assertEquals(\"diabetes-with-insulin\", condition.getStart());\n assertEquals(\"diabetes\", condition.getDomain());\n assertEquals(\"diabetes-driving\", condition.getInformation());\n assertTrue(condition.getSynonyms().isEmpty());\n assertEquals(1, condition.getCasp().size());\n assertTrue(condition.getCasp().contains(\"D01\"));\n assertEquals(condition.getCeg(), \"101\");\n assertEquals(Severity.NOTIFIABLE, condition.getSeverity());\n assertEquals(Boolean.TRUE, condition.getEnabled());\n\n assertNotNull(condition.toString());\n }", "public OverallCondition getCondition() {\n return condition;\n }", "Expr getCond();", "private void getCriteriaSaved() {\n try {\n Map<Integer, Criteria> mapCriteria = search.getDataBaseInHashMap();\n for (Integer key : mapCriteria.keySet()) {\n Criteria cri = mapCriteria.get(key);\n frameSearch.getTpDataBase().addRowTableDb(\n (key), mapCriteria.get(key).getNameOwnwe());\n }\n cm = new HashMap<Integer, Criteria>(mapCriteria);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public io.dstore.values.StringValueOrBuilder getConditionListOrBuilder() {\n return getConditionList();\n }", "public String getCondition() {\n\treturn condition;\n}", "Event getCondition();", "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "public Set getUnsatisfiedConditions() {\n return unsatisfiedConditions;\n }", "Expression getCond();", "public void dumpState() {\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> BEGIN - dumpState\");\n\n\t\t\tSystem.out.println(\" ::--> Set : \" + mCombination);\n\n\t\t\tif (mConditions != null) {\n\t\t\t\tSystem.out.println(\" ::--> [\" + mConditions.size() + \"]\");\n\t\t\t\tSystem.out.println(\" ::----------------::\");\n\n\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\tSeqCondition cond = mConditions.get(i);\n\n\t\t\t\t\tcond.dumpState();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" NULL\");\n\t\t\t\tSystem.out.println(\" ::----------------::\");\n\t\t\t}\n\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> END - dumpState\");\n\t\t}\n\t}", "IConditionsRequest getConditionsRequest(double lat, double lon, IRequestListener listener);", "public ParamsRequestCondition getParamsCondition()\n/* */ {\n/* 133 */ return this.paramsCondition;\n/* */ }", "public Collection<T> getInCondition() {\n return inCondition;\n }", "Set<Condition> getDeclaredInstanceInvariantConditions();", "private void getSensorConditions(List<RuleInstance> rules,Set<Condition> conds)\n{\n for (int i = 0; i < rules.size(); ++i) {\n RuleInstance ri1 = rules.get(i);\n for (int j = i+1; j < rules.size(); ++j) {\n\t RuleInstance ri2 = rules.get(j);\n\t if (ri1.getStateId() == ri2.getStateId()) continue;\n\t addSensorConditions(ri1,ri2,conds);\n }\n }\n}", "public String getConditiondescription() {\r\n return conditiondescription;\r\n }", "public Expression getCondition()\n {\n return this.condition;\n }", "@java.lang.Deprecated\n public java.util.List<io.kubernetes.client.openapi.models.V1DaemonSetCondition> getConditions() {\n return conditions != null ? build(conditions) : null;\n }", "@Override\n\tpublic RptParams getCustomCondition() {\n\t\tRptParams params = new RptParams();\n\n\t\tDate sd = (Date) this.pkStartDate.getValue();\n\t\tDate ed = (Date) this.pkEndDate.getValue();\n\n\t\tparams.setObject(\"startDate\", sd);\n\t\tparams.setObject(\"endDate\", ed);\n\n\t\treturn params;\n\t}", "public OnsetCondition clone() {\n OnsetCondition data = new OnsetCondition(this.name);\n data.timeInfos.addAll(this.timeInfos);\n return data;\n }", "Set<Condition> getInstanceInvariantConditions();", "public String getCondition() {\n return condition;\n }", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }", "public int getConditionCount()\n {\n return m_listCondition.size();\n }", "public String getCollectCondition()\n\t{\n\t\tStringBuffer stbf = new StringBuffer(256) ;\n\t\tboolean existFlg = false ;\n\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableCollect() != null)\n\t\t\t{\n\n\t\t\t\t//#CM708969\n\t\t\t\t// Edit acquisition Condition + acquisition column when acquisition Condition is described clearly. \n\t\t\t\tif (!ky.getTableCollect().trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableCollect()) ;\n\t\t\t\t\tstbf.append(\"(\") ;\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\") \") ;\n\t\t\t\t\tint wPnt = ky.getTableColumn().indexOf(\".\") ;\n\n\t\t\t\t\tif (wPnt >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn().substring((wPnt + 1))) ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t}\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\n\t\t\t\tif (existFlg == false)\n\t\t\t\t\texistFlg = true ;\n\t\t\t}\n\t\t}\n\t\t//#CM708970\n\t\t// Return '*' as all item acquisition when data is not set in the key value. \n\t\tif (existFlg == false)\n\t\t\treturn null ;\n\n\t\t//#CM708971\n\t\t// The last \"\"is removed because it is extra. \n\t\tint ep = stbf.toString().lastIndexOf(\",\") ;\n\t\treturn stbf.toString().substring(0, ep) ;\n\t}", "public List<IndicatorCriteria> getIndicatorCriterias();", "public WeatherCondition getCondition() {\n return condition;\n }", "@Override\n public List<Object> getModemOperationLog(Map<String, Object> condition) {\n return null;\n }", "@Override\n public List<Object> getModemCommLog(Map<String, Object> condition) {\n return null;\n }", "public io.dstore.values.StringValue.Builder getConditionListBuilder() {\n \n onChanged();\n return getConditionListFieldBuilder().getBuilder();\n }", "private void fillTrialConditionsData() {\n List<Condition> trialConditions = new ArrayList<Condition>();\n\n int instanceCounter = 1;\n for (Condition condition : this.workbookStudy.getConditions()) {\n if (condition.getDataType().equals(DATA_TYPE_CHAR)) {\n// LevelC levelCFilter = new LevelC(true);\n// LevelCPK levelCPK = new LevelCPK();\n// levelCPK.setLabelid(condition.getLabelId());\n// levelCFilter.setFactorid(condition.getFactorId());\n// levelCFilter.setLevelCPK(levelCPK);\n// List<LevelC> levelCList = this.servicioApp.getListLevelC(levelCFilter, 0, 0, false);\n List<LevelC> levelCList = condition.getFactor().getLevelsC();\n instanceCounter = 1;\n for (LevelC levelC : levelCList) {\n try {\n Condition conditionToAdd = new Condition();\n BeanUtilsBean.getInstance().copyProperties(conditionToAdd, condition);\n conditionToAdd.setValue(levelC.getLvalue());\n conditionToAdd.setInstance(instanceCounter);\n conditionToAdd.setLevelNo(levelC.getLevelCPK().getLevelno());\n trialConditions.add(conditionToAdd);\n instanceCounter++;\n } catch (IllegalAccessException ex) {\n Exceptions.printStackTrace(ex);\n } catch (InvocationTargetException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n } else if (condition.getDataType().equals(DATA_TYPE_NUMERIC)) {\n// LevelN levelNFilter = new LevelN(true);\n// LevelNPK levelnPK = new LevelNPK();\n// levelnPK.setLabelid(condition.getLabelId());\n// levelNFilter.setFactorid(condition.getFactorId());\n// levelNFilter.setLevelNPK(levelnPK);\n// List<LevelN> levelNList = this.servicioApp.getListLevelN(levelNFilter, 0, 0, false);\n List<LevelN> levelNList = condition.getFactor().getLevelsN();\n instanceCounter = 1;\n for (LevelN levelN : levelNList) {\n try {\n Condition conditionToAdd = new Condition();\n BeanUtilsBean.getInstance().copyProperties(conditionToAdd, condition);\n conditionToAdd.setValue(DecimalUtils.getValueAsString(levelN.getLvalue()));\n conditionToAdd.setInstance(instanceCounter);\n conditionToAdd.setLevelNo(levelN.getLevelNPK().getLevelno());\n trialConditions.add(conditionToAdd);\n instanceCounter++;\n } catch (IllegalAccessException ex) {\n Exceptions.printStackTrace(ex);\n } catch (InvocationTargetException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n }\n }\n\n Comparator<Condition> conditionComparator = new Comparator<Condition>() {\n\n @Override\n public int compare(Condition o1, Condition o2) {\n return o1.getInstance().compareTo(o2.getInstance());\n }\n };\n\n Collections.sort(trialConditions, conditionComparator);\n\n this.workbookStudy.setConditionsData(trialConditions);\n }", "public String getTagsConditions() {\n return tagsConditions;\n }", "public String getCondition() {\n\t\treturn condition;\n\t}", "@Override\n\tpublic VehicleCondition getCondition() {\n\t\treturn condition;\n\t}", "public String getInternalAuditServiceAgreementTermsandConditions() {\n return internalAuditServiceAgreementTermsandConditions;\n }", "public void testAllSupportedMedicalConditionsForNotify() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n assertEquals(165, conditions.size());\n }", "@Override\n public Criteria getCriteria() {\n //region your codes 2\n Criteria criteria = new Criteria();\n criteria.addAnd(SiteConfineArea.PROP_NATION,Operator.EQ,searchObject.getNation()).addAnd(SiteConfineArea.PROP_PROVINCE, Operator.EQ, searchObject.getProvince()).addAnd(SiteConfineArea.PROP_CITY,Operator.EQ,searchObject.getCity());\n if (searchObject.getStatus() != null) {\n if (searchObject.getStatus().equals(SiteConfineStatusEnum.USING.getCode())) {\n //使用中\n criteria.addAnd(SiteConfineArea.PROP_END_TIME, Operator.GT, new Date());\n } else if (searchObject.getStatus().equals(SiteConfineStatusEnum.EXPIRED.getCode())) {\n criteria.addAnd(SiteConfineArea.PROP_END_TIME, Operator.LT, new Date());\n }\n }\n criteria.addAnd(SiteConfineArea.PROP_SITE_ID,Operator.EQ,searchObject.getSiteId());\n return criteria;\n //endregion your codes 2\n }", "public interface OpenCondition {\n public Condition getCondition();\n\n //public int getMinTime();\n public Step getStep();\n}", "public List<Criterion> getCriteria() {\n\t return criteria;\n\t }", "@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}", "@Override\n public List<Object> getModemLogChart(Map<String, Object> condition) {\n return null;\n }", "public io.dstore.values.StringValue getConditionList() {\n return conditionList_ == null ? io.dstore.values.StringValue.getDefaultInstance() : conditionList_;\n }", "public Map<Long, List<ConditionWithSymptoms>> getConditionSymptoms() {\n Map<String, ExpressedSymptom> symptoms = person.getExpressedSymptoms();\n Map<Long, List<ConditionWithSymptoms>> result;\n result = new ConcurrentHashMap<Long, List<ConditionWithSymptoms>>();\n for (String module : sources.keySet()) {\n ModuleConditions moduleConditions = sources.get(module);\n for (String condition : moduleConditions.getOnsetConditions().keySet()) {\n List<ConditionPeriod> infos = moduleConditions.getOnsetConditions().get(\n condition).getTimeInfos();\n for (ConditionPeriod entry : infos) {\n Long begin = entry.getOnsetTime();\n Long end = entry.getEndTime();\n if (!result.containsKey(begin)) {\n result.put(begin, new LinkedList<ConditionWithSymptoms>());\n }\n ConditionWithSymptoms conditionWithSymptoms = new ConditionWithSymptoms(\n condition, begin, end\n );\n for (String type : symptoms.keySet()) {\n ExpressedSymptom expressedSymptom = symptoms.get(type);\n if (expressedSymptom.getSources().containsKey(module)) {\n SymptomSource symptomSource = expressedSymptom.getSources().get(module);\n conditionWithSymptoms.addSymptoms(type, symptomSource);\n }\n }\n result.get(begin).add(conditionWithSymptoms);\n }\n }\n }\n return result;\n }", "public String getTermsAndConditions() {\n return this.termsAndConditions;\n }", "public String getCriteriaDetail() {\n return (String) get(13);\n }", "public String getAssessmentandReportingPreconditions() {\n return assessmentandReportingPreconditions;\n }", "public String getEXTRACTION_CRITERIA() {\r\n return EXTRACTION_CRITERIA;\r\n }", "void jbtnExtract_actionPerformed(ActionEvent e) {\n java.util.HashMap conditions=new java.util.HashMap();\r\n\r\n for(int i=0;i<guis.size();i++){\r\n exgui.DataBindGUIObject dbGUIOBJ=(exgui.DataBindGUIObject)guis.get(i);\r\n if(dbGUIOBJ instanceof exgui.DataBindTextWithChecker ){\r\n if(!((exgui.DataBindTextWithChecker)dbGUIOBJ).isValidx()) return;\r\n if(dbGUIOBJ instanceof exgui.SwingSingleSelection){\r\n Object value=((exgui.SwingSingleSelection)dbGUIOBJ).getSelectedValue();\r\n if(value!=null)conditions.put(dbGUIOBJ.getOrgRecField(),value);\r\n }\r\n }else{\r\n exgui.SwingSingleSelection slk=(exgui.SwingSingleSelection)dbGUIOBJ;\r\n if(slk.getSelectedValue()!=null){\r\n conditions.put(dbGUIOBJ.getOrgRecField(),slk.getSelectedValue());\r\n }\r\n }\r\n }\r\n if(cbxAuditStatus.getSelectedIndex()>0){\r\n conditions.put(prdHead.QRY_CONDITION_ADT_STATUS,\r\n String.valueOf(cbxAuditStatus.getSelectedIndex()));\r\n }\r\n if(null!=slkVender.getSelectedValue()){\r\n conditions.put(\"CT_VENDER\",slkVender.getSelectedValue().toString());\r\n }\r\n //handing all the conditions to Commnad set object,wait for querry result.\r\n if(rdoOnlySamle.isSelected()){\r\n conditions.put(\"a.PROD_IS_SAMPLE\",\"Y\");\r\n }\r\n if(txtBatchNo.getText().trim().length()>0){\r\n conditions.put(\"TPE_NB_BATCH_NO\",txtBatchNo.getText().trim());\r\n }\r\n//\r\n if(txtCust_Po.getText().trim().length()>0){\r\n conditions.put(\"CUST_PO\",txtCust_Po.getText().trim());\r\n }\r\n//\r\n\r\n newtimes.preproduction.process.PP_Maintain_CmdSet.qryConditions=conditions;\r\n util.ApplicationProperites.removeProperites(processhandler.template.Constants.XNT_LIST_QRY_RESLUT_BGN_AT);\r\n goCommand();\r\n }", "Record getShortTermCompEffAndExpDates(Record inputRecord);", "public void setTrackedConditions(Set<Condition> trackedConditions) {\n this.trackedConditions = trackedConditions;\n }", "@Override\r\n\tpublic String getCondition(String[] sql) {\n\t\treturn sql[4];\r\n\t}", "@JsonProperty(\"conditions\")\n @ApiModelProperty(value = \"The condition that will trigger the dialog node.\")\n public String getConditions() {\n return conditions;\n }", "private void getTimeConditions(List<RuleInstance> rules,Set<Condition> conds)\n{\n for (RuleInstance ri : rules) {\n getTimeConditions(ri,rules,conds);\n }\n}", "@CheckPermission(category = Category.TASK, needs = {Operation.GET})\n public Result getConditions(long institutionId, long stepId) {\n Step step = stepRepository.get(stepId);\n Component component = step.getComponent();\n List<ComponentProperty> componentProperties = component.getComponentProperties()\n .stream()\n .filter(cp -> cp.getType().equals(\"condition\"))\n .collect(Collectors.toList());\n\n JSONArray jsonArray = new JSONArray();\n for (ComponentProperty componentProperty : componentProperties) {\n JSONObject record = new JSONObject();\n record.put(\"id\", componentProperty.getId());\n jsonArray.add(record);\n }\n\n return ok(Json.toJson(jsonArray));\n }", "public Object getAssessmentandReportingInitiateActionRecord() {\n return assessmentandReportingInitiateActionRecord;\n }", "public String getReferenceCondition()\n\t\t\tthrows ReadWriteException\n\t{\n\t\tStringBuffer stbf = new StringBuffer(512) ;\n\t\tboolean existFlg = false ;\n\t\tint s_cond = 0 ; // AND 又は OR条件\n\t\tint st_Parenthesis = 0 ; // ’(’文字数\n\t\tint en_Parenthesis = 0 ; // ’)’文字数\n\t\tint total_stparen = 0 ; // ’(’トータル文字数\n\t\tint total_enparen = 0 ; // ’)’トータル文字数\n\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableValue() != null)\n\t\t\t{\n\t\t\t\ts_cond = ky.getTableCondtion() % 10 ;\n\t\t\t\tst_Parenthesis = ky.getTableCondtion() / 100 ;\n\t\t\t\ten_Parenthesis = (ky.getTableCondtion() / 10) % 10 ;\n\n\t\t\t\ttotal_stparen += st_Parenthesis ;\n\t\t\t\ttotal_enparen += en_Parenthesis ;\n\n\t\t\t\t//#CM708950\n\t\t\t\t// set the '(' character for necessary part. \n\t\t\t\tfor (int lp = 0; lp < st_Parenthesis; lp++)\n\t\t\t\t\tstbf.append(\"(\") ;\n\n\t\t\t\t//#CM708951\n\t\t\t\t// Use the LIKE retrieval when whether the pattern collation is included when the character value is verified, and it exists. \n\t\t\t\tif (ky.getTableValue() instanceof String)\n\t\t\t\t{\n\t\t\t\t\tif (DBFormat.isPatternMatching((String)ky.getTableValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t\tstbf.append(\" LIKE \") ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//#CM708952\n\t\t\t\t\t\t// Replace it with IS NULL. \n\t\t\t\t\t\tif(((String)ky.getTableValue()).trim().equals(\"\") && \n\t\t\t\t\t\t!ky.getTableCompCode().equals(\"IS NOT NULL\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstbf.append(\"IS NULL\") ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstbf.append(ky.getTableCompCode()) ;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t\tstbf.append(ky.getTableCompCode()) ;\n\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t}\n\t\t\t\tif (ky.getTableValue() instanceof String\n\t\t\t\t\t\t&& !((String)ky.getTableValue()).trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tstbf.append(DBFormat.format(((String)ky.getTableValue())).replaceAll(\n\t\t\t\t\t\t\t\"[\" + WmsParam.PATTERNMATCHING + \"]\", \"%\")) ;\n\t\t\t\t}\n\t\t\t\telse if (ky.getTableValue() instanceof Date)\n\t\t\t\t{\n\t\t\t\t\tstbf.append(DBFormat.format((Date)ky.getTableValue())) ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableValue()) ;\n\t\t\t\t}\n\n\t\t\t\t//#CM708953\n\t\t\t\t// set the ')' character for necessary part. \n\t\t\t\tfor (int lp = 0; lp < en_Parenthesis; lp++)\n\t\t\t\t\tstbf.append(\")\") ;\n\n\t\t\t\tif (s_cond == 0)\n\t\t\t\t{\n\t\t\t\t\tstbf.append(\" AND \") ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(\" OR \") ;\n\t\t\t\t}\n\n\t\t\t\tif (existFlg == false)\n\t\t\t\t\texistFlg = true ;\n\t\t\t}\n\t\t}\n\t\t//#CM708954\n\t\t// Return null when data is not set in the key value. \n\t\tif (existFlg == false)\n\t\t\treturn null ;\n\n\t\t//#CM708955\n\t\t// It returns ReadWriteException when Condition () is not corresponding. \n\t\tif (total_stparen != total_enparen)\n\t\t{\n\t\t\tRmiMsgLogClient.write(6006010, LogMessage.F_ERROR, \"SQLSearchKey\", null) ;\n\t\t\tthrow (new ReadWriteException(\"6006002\" + wDelim + \"SQLSearchKey\")) ;\n\t\t}\n\t\t//#CM708956\n\t\t// The last \"AND\" is removed because it is extra. \n\t\tint ep = 0 ;\n\t\tif (s_cond == 0)\n\t\t{\n\t\t\tep = stbf.toString().lastIndexOf(\"AND\") ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tep = stbf.toString().lastIndexOf(\"OR\") ;\n\t\t}\n\t\treturn stbf.toString().substring(0, ep) ;\n\t}", "@Override\n\tprotected String getWhereConditionBaseOnIdRecord()\n\t{\n\t\tStringBuilder whereCondition = new StringBuilder(\"GAZOID='\");\n\t\twhereCondition.append(getMyDataModel().getOptionId());\n\t\twhereCondition.append(\"'and GAZFLD='\");\n\t\twhereCondition.append(getMyDataModel().getFieldId());\n\t\twhereCondition.append(\"'and GAZPVN='\");\n\t\twhereCondition.append(getMyDataModel().getPvId());\n\t\twhereCondition.append(\"'and GAZTYP='\");\n\t\twhereCondition.append(getMyDataModel().getType());\n\t\twhereCondition.append(\"'\");\n\t\treturn whereCondition.toString();\n\t}", "Map<String, OperationalSets> getSets();", "public Map<String, CashMovementRecord> getCashMovementRecords(){\n\t\treturn hmCashMovementRecord;\n\t}", "public Long getConditionLastOnsetTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastOnsetTime();\n }\n return null;\n }", "ICDICondition getCondition() throws CDIException;", "public HeadersRequestCondition getHeadersCondition()\n/* */ {\n/* 141 */ return this.headersCondition;\n/* */ }", "protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n assertKeyWord(ScriptBasicKeyWords.KEYWORD_THEN);\n return condition;\n }", "IConditionsRequest getConditionsRequest(String location, IRequestListener listener);" ]
[ "0.67327553", "0.67195296", "0.66783863", "0.64237684", "0.6345223", "0.62592137", "0.6256982", "0.62016976", "0.61480016", "0.61362255", "0.6060062", "0.5934155", "0.5915772", "0.5865065", "0.58329433", "0.5800942", "0.5703783", "0.56710625", "0.5654106", "0.56265056", "0.55854774", "0.55730563", "0.5562793", "0.55308783", "0.54764265", "0.5440991", "0.5417289", "0.5386387", "0.5382476", "0.5303069", "0.5268925", "0.524136", "0.5237376", "0.523649", "0.5212979", "0.5203275", "0.5157396", "0.5155537", "0.51431537", "0.5132055", "0.51115346", "0.51053464", "0.5101679", "0.5094244", "0.5093696", "0.5067272", "0.5065433", "0.5052717", "0.50495684", "0.50256807", "0.5020457", "0.5016068", "0.5013995", "0.5005534", "0.4996605", "0.49937317", "0.49860305", "0.498602", "0.49686897", "0.49657387", "0.49523905", "0.49272949", "0.49218136", "0.49182716", "0.49077842", "0.48992234", "0.48957556", "0.48749316", "0.4874379", "0.48693478", "0.48574755", "0.4854815", "0.4852463", "0.48420638", "0.48390117", "0.4830295", "0.48299775", "0.48231137", "0.4818955", "0.4818527", "0.48031193", "0.48030668", "0.4801399", "0.47960094", "0.47870907", "0.47705454", "0.47551593", "0.47549158", "0.4748134", "0.47323143", "0.47226202", "0.47173366", "0.47154123", "0.47053832", "0.46975917", "0.46860933", "0.46855533", "0.4679187", "0.4677056", "0.4662699" ]
0.6501761
3
Create a new instance for the supplied condition name, onset and end times.
public ConditionWithSymptoms(String name, Long onsetTime, Long endTime) { this.conditionName = name; this.onsetTime = onsetTime; this.endTime = endTime; this.symptoms = new ConcurrentHashMap<String, List<Integer>>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Condition createCondition();", "public OnsetCondition clone() {\n OnsetCondition data = new OnsetCondition(this.name);\n data.timeInfos.addAll(this.timeInfos);\n return data;\n }", "public void onsetCondition(String condition, String state, long time) {\n if (!onsetConditions.containsKey(condition)) {\n onsetConditions.put(condition, new OnsetCondition(condition));\n }\n OnsetCondition onsetCondition = onsetConditions.get(condition);\n onsetCondition.addNewEntry(time);\n state2conditionMapping.put(state, condition);\n }", "LogicCondition createLogicCondition();", "BaseCondition createBaseCondition();", "public TimedCondition (List<Expression> exprList, long per) {\n this(exprList, per, 0L);\n }", "ConditionNameReference createConditionNameReference();", "public Attribute(String name, String value, Condition condition) {\n if(name == \"\")\n try {\n throw new Exception(\"Attribute Name is null\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n this.name = name;\n this.value = value;\n this.condition = condition;\n }", "public static OnSetClause create(Expression expression) {\n OnSetClause clause = new OnSetClause();\n clause.addAssignment(expression);\n return clause;\n }", "ConditionFactory getConditionFactory();", "public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}", "public TimedCondition (List<Expression> exprList, long per, long dur) {\n if (exprList == null) { // init with empty list\n m_exprList = new ArrayList<Expression>();\n } else {\n m_exprList = exprList;\n }\n m_period = per;\n m_duration = dur;\n }", "public Event(long id, String name, Date startTime, Date endTime)\n\t{\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.startTime = startTime;\n\t\tthis.endTime = endTime;\n\t\tthis.billings = new ArrayList<Billing>();\n\t\tthis.seatingPlan = null;\n\t}", "public AirCondition(){}", "public Condition newCondition() {\r\n throw new java.lang.UnsupportedOperationException();\r\n }", "public SeqConditionSet() {\n\t}", "public interface ConditionFactory {\n\n Condition createNewCondition(List<List<Object>> arguments);\n\n}", "public void onConditionOnset(String module, String state, String condition, long time) {\n if (!sources.containsKey(module)) {\n sources.put(module, new ModuleConditions(module));\n }\n ModuleConditions moduleConditions = sources.get(module);\n moduleConditions.onsetCondition(condition, state, time);\n }", "JoinCondition createJoinCondition();", "public Condition newCondition() {\n throw new java.lang.UnsupportedOperationException();\n }", "public SimpleCondition() {\n\n\t}", "public ModuleConditions(String source) {\n this.source = source;\n onsetConditions = new ConcurrentHashMap<String, OnsetCondition>();\n state2conditionMapping = new ConcurrentHashMap<String, String>();\n }", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "public abstract Builder customCondition(RequestCondition<?> paramRequestCondition);", "Condition(double multiplier) {\r\n this.multiplier = multiplier;\r\n }", "@Override public String getName()\n{\n return base_condition.getName() + \"@\" + min_time + \"-\" + max_time;\n}", "protected abstract T create(final double idealStartTime);", "public EventCondition(EventCondition source) {\n if (source.AlarmNotifyPeriod != null) {\n this.AlarmNotifyPeriod = new String(source.AlarmNotifyPeriod);\n }\n if (source.AlarmNotifyType != null) {\n this.AlarmNotifyType = new String(source.AlarmNotifyType);\n }\n if (source.EventID != null) {\n this.EventID = new String(source.EventID);\n }\n if (source.EventDisplayName != null) {\n this.EventDisplayName = new String(source.EventDisplayName);\n }\n if (source.RuleID != null) {\n this.RuleID = new String(source.RuleID);\n }\n }", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }", "public TriggerCondition() {\n this(METRIC_HEAPUSG, 95);\n }", "public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}", "FilterCondition createFilterCondition(int clueNum);", "public static CartDiscountSetValidFromAndUntilActionBuilder builder(\n final CartDiscountSetValidFromAndUntilAction template) {\n return CartDiscountSetValidFromAndUntilActionBuilder.of(template);\n }", "public DoSometime condition(Condition condition) {\n this.condition = condition;\n return this;\n }", "public SchedulingRequest(LocalDateTime startTime, LocalDateTime endTime,\n LocalDateTime timeRequested, LocalDateTime timeCompleted,\n String name, Node room) {\n this();\n\n this.startTime.set(startTime);\n this.endTime.set(endTime);\n this.timeRequested.set(timeRequested);\n this.timeCompleted.set(timeCompleted);\n this.whoReserved.set(name);\n this.room.set(room);\n }", "public void setCondition(ExpressionNode condition);", "public void addWhen(Object pCondition, Object pValue);", "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "public static CartDiscountSetValidFromAndUntilAction of(final CartDiscountSetValidFromAndUntilAction template) {\n CartDiscountSetValidFromAndUntilActionImpl instance = new CartDiscountSetValidFromAndUntilActionImpl();\n instance.setValidFrom(template.getValidFrom());\n instance.setValidUntil(template.getValidUntil());\n return instance;\n }", "public ConditionalExpressionTest(String name) {\n\t\tsuper(name);\n\t}", "public Cond newCond() {\n return new Cond();\n }", "public ScheduleExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public Condition() {\n _rawProperties = new HashSet<>();\n _usedLookupIds = new HashSet<>();\n _potentialContextEntries = new HashSet<>();\n }", "@Override\n\tpublic RptParams getCustomCondition() {\n\t\tRptParams params = new RptParams();\n\n\t\tDate sd = (Date) this.pkStartDate.getValue();\n\t\tDate ed = (Date) this.pkEndDate.getValue();\n\n\t\tparams.setObject(\"startDate\", sd);\n\t\tparams.setObject(\"endDate\", ed);\n\n\t\treturn params;\n\t}", "public ElementDefinitionDt addCondition( String theId) {\n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\tmyCondition.add(new IdDt(theId));\n\t\treturn this; \n\t}", "OverallCondition(String condition) {\n this.condition = condition;\n }", "Condition getCondition(String conditionName, Lock lock);", "public Task(String name, String category, Date start, Date end, Time s) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tTime autoEndTime = new Time(s.getHours() + 1, s.getMins());\n\t\tthis.setEndTime(autoEndTime);\n\t\tsetIfOverdue();\n\t}", "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "private EndConditionTypes(int value, String name, String literal)\n {\n this.value = value;\n this.name = name;\n this.literal = literal;\n }", "public Task(String name, String category, Date start, Date end, Time s, Time e) throws Exception{\n\t\tthis.setName(name);\n\t\tthis.setCategory(category);\n\t\tthis.setEndDate(end);\n\t\tthis.setStartDate(start);\n\t\tthis.setStartTime(s);\n\t\tthis.setEndTime(e);\n\t\tsetIfOverdue();\n\t}", "Between createBetween();", "public ConditionEventSystem(Petrinet petrinet) {\n super(petrinet.name, petrinet.places, petrinet.transitions, petrinet.flow, petrinet.mue0,\n new Marking(petrinet.mue0.getDimension(), 1));\n }", "protected FilterCondition(final FilterCondition rhs) {\n }", "public Rule(List<ICondition> conditions)\r\n\t{\r\n\t\tif (conditions != null)\r\n\t\t{\r\n\t\t\tthis.conditions = conditions;\r\n\t\t}\r\n\t}", "public ThresholdEventRule(String name, String name_lt, String name_gt, String d_lt, String d_gt, String sensorName, int val, boolean hideFromFeed, int timeout){\n super(name, hideFromFeed, timeout);\n this.name_lt = name_lt;\n this.name_gt = name_gt;\n this.description_lt = d_lt;\n this.description_gt = d_gt;\n this.sensorName = sensorName;\n this.threshold = val;\n this.currentState = getInitialState();\n }", "public SCondition(Node node) {\n super(node);\n }", "public void endCondition(String condition, long time) {\n if (onsetConditions.containsKey(condition)) {\n onsetConditions.get(condition).endLastEntry(time);\n }\n }", "public void opInitFrom(LogicalOp logicalOperator) {\n \twindowAttribute = ((Bucket) logicalOperator).getWindowAttr();\n \twindowType = ((Bucket) logicalOperator).getWindowType();\t\t\n \trange = ((Bucket) logicalOperator).getWindowRange();\n \tslide = ((Bucket) logicalOperator).getWindowSlide();\n \twidName = ((Bucket) logicalOperator).getWid();\n \tstart = ((Bucket) logicalOperator).getStarttime();\n \tae = new AtomicEvaluator (windowAttribute.getName());\n \t\n }", "public <T> Builder put(@NotNull String name, @NotNull T value) {\n event.put(name, value);\n return this;\n }", "public BTGConditionDTO()\n\t{\n\t\tsuper();\n\t}", "Event getCondition();", "VariantConditionModel createInstanceOfVariantConditionModel();", "private List<ComparisonExpression> comparisons(HashMap<TimeSelector, Long> lowerBounds,\n HashMap<TimeSelector, Long> upperBounds) {\n List<ComparisonExpression> newComparisons = new ArrayList<>();\n // for all selectors, as lowerBounds has the same keys as upperBounds\n for (Map.Entry<TimeSelector, Long> entry : lowerBounds.entrySet()) {\n TimeSelector selector = entry.getKey();\n Long lower = entry.getValue();\n Long upper = upperBounds.get(selector);\n if (lower.equals(upper)) {\n newComparisons.add(new ComparisonExpression(\n new Comparison(selector, EQ, new TimeLiteral(lower)),\n new ComparableTPGMFactory()));\n } else {\n if (lower > TemporalElement.DEFAULT_TIME_FROM) {\n // check if informative: lower bound of from is trivial lower bound of to\n if (selector.getTimeProp().equals(TX_TO)) {\n TimeSelector txFromSel = new TimeSelector(selector.getVariable(), TX_FROM);\n if (lowerBounds.getOrDefault(txFromSel, TemporalElement.DEFAULT_TIME_FROM).equals(lower)) {\n continue;\n }\n } else if (selector.getTimeProp().equals(VAL_TO)) {\n TimeSelector valFromSel = new TimeSelector(selector.getVariable(), VAL_FROM);\n if (lowerBounds.getOrDefault(valFromSel, TemporalElement.DEFAULT_TIME_FROM).equals(lower)) {\n continue;\n }\n }\n // informative => build comparison\n newComparisons.add(new ComparisonExpression(\n new Comparison(new TimeLiteral(lower), LTE, selector),\n new ComparableTPGMFactory()));\n }\n if (upper < TemporalElement.DEFAULT_TIME_TO) {\n // analagously as for lower bounds\n // upper bound of to is trivial upper of from\n if (selector.getTimeProp().equals(TimeSelector.TimeField.TX_FROM)) {\n TimeSelector txToSel = new TimeSelector(selector.getVariable(), TX_TO);\n if (upperBounds.getOrDefault(txToSel, TemporalElement.DEFAULT_TIME_TO).equals(upper)) {\n continue;\n }\n } else if (selector.getTimeProp().equals(TimeSelector.TimeField.VAL_FROM)) {\n TimeSelector valToSel = new TimeSelector(selector.getVariable(), VAL_TO);\n if (upperBounds.getOrDefault(valToSel, TemporalElement.DEFAULT_TIME_TO).equals(upper)) {\n continue;\n }\n }\n // informative => build comparison\n newComparisons.add(new ComparisonExpression(\n new Comparison(selector, LTE, new TimeLiteral(upper)),\n new ComparableTPGMFactory()));\n }\n }\n }\n return newComparisons;\n }", "public static AbsTime factory(AbsTime t)\n {\n // The value to return.\n AbsTime result;\n\n if (t.isASAP() || t.isNEVER()) {\n // No need to make a new object.\n result = t;\n } else {\n // Not a special case. Make a new object.\n result = new AbsTime(t);\n }\n\n return result;\n }", "@NonNull\n Tomato newTomato(long startTime, long endTime);", "protected AbstractIntradayRequestBuilder(String ticker, String eventType, OffsetDateTime startDateTime, OffsetDateTime endDateTime) {\n this.startDateTime = Preconditions.checkNotNull(startDateTime, \"The start date must not be null\");\n this.endDateTime = Preconditions.checkNotNull(endDateTime, \"The end date must not be null\");\n this.ticker = Preconditions.checkNotNull(ticker, \"The ticker must not be null\");\n this.eventType = Preconditions.checkNotNull(eventType, \"The event type must not be null\");\n Preconditions.checkArgument(!startDateTime.isAfter(endDateTime), \"The start date (%s) must not be after the end date (%s)\", startDateTime, endDateTime);\n Preconditions.checkArgument(!ticker.isEmpty(), \"The ticker must not be an empty string\");\n }", "public GroupByBuilder and(String condition) {\n\t\t\n\t\tadd(condition, Operator.AND);\n\t\treturn this;\n\t}", "public void setCondition(WeatherCondition condition) {\n this.condition = condition;\n }", "public BetweenCriteria(String attributeName, Object lowerBound, Object upperBound) {\n super(attributeName, lowerBound);\n this.upperBound = upperBound;\n }", "public void set( final Condition condition )\n {\n m_condition = condition;\n }", "java.lang.String getCondition();", "public Cashier(String name, double startTime, double endTime){\n this.name = name;\n this.startTime = startTime;\n this.endTime = endTime;\n this.breakTime = 0;\n this.allocations = new int[(int)((endTime - startTime)/0.25 + 1)];\n }", "public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}", "public ConditionalStatement(IExpression condition, IStatement s0, IStatement s1)\n {\n super(\"Conditional\", null);\n // TODO - anything else you need\n }", "public Event (String name, String dateTime) {\n\t\tsuper(name);\n\t\tthis.dateTime = dateTime;\n\t}", "public static AbsTime factory(String t) throws NumberFormatException, Time.Ex_TimeNotAvailable\n {\n // The value to return.\n AbsTime result;\n\n // Check for ASAP and NEVER.\n if (t.equals(\"ASAP\")) {\n // No need to make a new object.\n result = ASAP;\n } else if (t.equals(\"NEVER\")) {\n // No need to make a new object.\n result = NEVER;\n } else if (t.equals(\"NOW\")) {\n // Make a new object using null constructor.\n result = new AbsTime();\n } else {\n // Not a special case. Need to make a new object.\n result = new AbsTime(t);\n }\n\n return result;\n }", "public SimpleCondition(String fieldName, Cs cs) throws ConditionException {\n\t\tthis(fieldName, cs, null);\n\t}", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public DeleteBuilder and(String condition) {\n\t\t\n\t\tdelete.add(condition, Operator.AND);\n\t\treturn this;\n\t}", "public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n assertEquals(\"Diabetes\", condition.getTitle());\n assertEquals(\"diabetes\", condition.getName());\n assertEquals(EMPTY, condition.getType());\n assertEquals(\"DIAB1\", condition.getForm());\n assertEquals(DIABETES_CONDITION, condition.getDomain());\n assertEquals(\"diabetes-with-insulin\", condition.getStart());\n assertEquals(\"diabetes\", condition.getDomain());\n assertEquals(\"diabetes-driving\", condition.getInformation());\n assertTrue(condition.getSynonyms().isEmpty());\n assertEquals(1, condition.getCasp().size());\n assertTrue(condition.getCasp().contains(\"D01\"));\n assertEquals(condition.getCeg(), \"101\");\n assertEquals(Severity.NOTIFIABLE, condition.getSeverity());\n assertEquals(Boolean.TRUE, condition.getEnabled());\n\n assertNotNull(condition.toString());\n }", "public ConditionerTemplate newConditionerBase(String name, String description, String category)\n\t{\n\t\tConditionerTemplate cb = new ConditionerTemplate(name, description, category);\n\t\treturn cb;\n\t}", "public ConditionWithSymptoms clone() {\n ConditionWithSymptoms data = new ConditionWithSymptoms(conditionName, onsetTime, endTime);\n data.symptoms.putAll(this.symptoms);\n return data;\n }", "SpecialNamesConditionNameReference createSpecialNamesConditionNameReference();", "public FromTo() {\n this(\"now-6h\", \"now\");\n }", "public void setConditions(Condition [] Conditions) {\n this.Conditions = Conditions;\n }", "condition getConditionAllocution();", "public ClipLog(String name, String start, String end){\n this.name = name;\n this.start = start;\n this.end = end;\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t\t\n\t\tif (TAG_CONDITION.equals(localName)) {\n\t\t\tmWeatherInfo.setWoeid(woeid);\n\t\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\t\tString qn = attributes.getQName(i);\n\t\t\t\t\n\t\t\t\tif (QNAME_CODE.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setCode(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DATE.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setDate(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TMP.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setTemp(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TEXT.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setText(attributes.getValue(i));\n\t\t\t\t\tmWeatherInfo.setUpdateTime(System.currentTimeMillis());//wangjun\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (TAG_FORCAST.equals(localName)) {\n\t\t\tforecast = mWeatherInfo.new Forecast();\n\t\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\t\tString qn = attributes.getQName(i);\n\t\t\t\t\n\t\t\t\tif (QNAME_CODE.equals(qn)) {\n\t\t\t\t\tforecast.setCode(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DAY.equals(qn)) {\n\t\t\t\t\tforecast.setDay(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_HIGH.equals(qn)) {\n\t\t\t\t\tforecast.setHigh(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_LOW.equals(qn)) {\n\t\t\t\t\tforecast.setLow(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TEXT.equals(qn)) {\n\t\t\t\t\tforecast.setText(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DATE.equals(qn)) {\n\t\t\t\t\tforecast.setDate(attributes.getValue(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tmWeatherInfo.getForecasts().add(forecast);\n\t\t}\n\t}", "@Override\n\tpublic void startElement(String namespaceURI, String localName,\n\t\t\tString qName, Attributes atts) throws SAXException {\n\n\t\t// abertura da tag \"weather\" ou \"current_condition\"\n\t\tif (localName.equals(\"weather\")) {\n\t\t\tcv = new ContentValues();\n\t\t\tcv.put(WeatherCondition.ID_PLACE, p_id);\n\t\t\tin_weather = true;\n\t\t}\n\n\t\tif (localName.equals(\"current_condition\")) {\n\t\t\tcv = new ContentValues();\n\t\t\tcv.put(WeatherCondition.ID_PLACE, p_id);\n\t\t\tin_current_condition = true;\n\t\t}\n\n\t\t// tag com o URL da imagem da condição\n\t\tif (localName.equals(\"weatherIconUrl\"))\n\t\t\tin_img = true;\n\n\t\t// tag com a temperatura (para condições actuais)\n\t\tif (localName.equals(\"temp_C\"))\n\t\t\tin_temp_c = true;\n\n\t\t// tag com temperatura máxima (para previsões)\n\t\tif (localName.equals(\"tempMaxC\"))\n\t\t\tin_temp_max_c = true;\n\n\t\t// tag com temperatura mínima (para previsões)\n\t\tif (localName.equals(\"tempMinC\"))\n\t\t\tin_temp_min_c = true;\n\n\t\tif (localName.equals(\"observation_time\") || localName.equals(\"date\"))\n\t\t\tin_observation_time = true;\n\n\t\tif (localName.equals(\"weatherDesc\"))\n\t\t\tin_weather_desc = true;\n\n\t\tif (localName.equals(\"windspeedMiles\"))\n\t\t\tin_windspeed_miles = true;\n\n\t\tif (localName.equals(\"windspeedKmph\"))\n\t\t\tin_windspeed_kmph = true;\n\n\t\tif (localName.equals(\"winddir16Point\")\n\t\t\t\t|| localName.equals(\"winddirection\"))\n\t\t\tin_winddir = true;\n\n\t\tif (localName.equals(\"precipMM\"))\n\t\t\tin_precip_mm = true;\n\n\t\tif (localName.equals(\"humidity\"))\n\t\t\tin_humidity = true;\n\t}", "public Builder setInitCond(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n initCond_ = value;\n onChanged();\n return this;\n }", "public void beginIfSpecified(String sName)\n {\n push(m_pool.ensureNamedCondition(sName));\n }", "public String createEvent(final boolean pastEvent, final String startDate,\n final String duration, final String mode, final boolean precoolOpted, String groupName)\n throws ParseException;", "public NotCondition() {\r\n\t\tsuper();\r\n\t}", "public Condition(Compendium compendium) {\n\t\tgrn_ = compendium.getGrn();\n\t\tcompendium_ = compendium;\n\t}", "public Cashier(String name, double startTime, double endTime, double breakTime){\n this.name = name;\n this.startTime = startTime;\n this.endTime = endTime;\n this.breakTime = breakTime;\n this.allocations = new int[(int)((endTime - startTime)/0.25 + 1)];\n }", "Condition between(QueryParameter parameter, Object x, Object y);", "public MutableBlock createMutableBlock(TimeParameter timeType, int start, int end) {\r\n String type = timeType.getTextField();\r\n ExpressionBuilder exp = new ExpressionBuilder();\r\n exp.value(type).greaterEquals().value(start).and().value(type).lessEquals().value(end);\r\n return createMutableBlock(exp);\r\n }" ]
[ "0.6068146", "0.5846783", "0.56216", "0.558856", "0.54025555", "0.53569084", "0.5345882", "0.513925", "0.50792223", "0.5077517", "0.50611323", "0.5044492", "0.4917628", "0.49034417", "0.4899261", "0.48906386", "0.48482054", "0.4848066", "0.48100942", "0.47806126", "0.477678", "0.47588184", "0.47206542", "0.47206542", "0.4717552", "0.47092015", "0.4703334", "0.47023514", "0.46990275", "0.468161", "0.46745571", "0.4669956", "0.4667399", "0.46673653", "0.4649704", "0.46451885", "0.4632076", "0.46095243", "0.4589845", "0.45897555", "0.45756426", "0.45746547", "0.45493805", "0.45478275", "0.45219168", "0.45130453", "0.45079678", "0.45069337", "0.45062414", "0.450216", "0.44987023", "0.4492614", "0.4492293", "0.44900584", "0.44719806", "0.44683972", "0.44628742", "0.44433135", "0.44387218", "0.44357362", "0.44205028", "0.44159028", "0.4415765", "0.44153237", "0.43876365", "0.43868065", "0.43858904", "0.43834877", "0.43814072", "0.4380014", "0.4373137", "0.43543005", "0.43512917", "0.4347738", "0.4338612", "0.43329206", "0.43307006", "0.43299732", "0.43203747", "0.43199062", "0.43172616", "0.43166882", "0.43153217", "0.43089008", "0.4304098", "0.42964005", "0.42899063", "0.42819342", "0.42791358", "0.42751983", "0.42709234", "0.4254728", "0.424713", "0.42470962", "0.42452776", "0.4244417", "0.4233206", "0.4220667", "0.42188188", "0.4218732" ]
0.60736763
0
Create a shallow copy of this instance.
public ConditionWithSymptoms clone() { ConditionWithSymptoms data = new ConditionWithSymptoms(conditionName, onsetTime, endTime); data.symptoms.putAll(this.symptoms); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "public Object clone() {\n return this.copy();\n }", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "protected Shingle copy() {\n return new Shingle(this);\n }", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "Prototype makeCopy();", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "public StateInfo copy() {\n return new StateInfo(this);\n }", "public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Table shallowCopy() {\n\t\tSubsetTableImpl vt =\n\t\t\tnew SubsetTableImpl(this.getColumns(), this.subset);\n\t\tvt.setLabel(getLabel());\n\t\tvt.setComment(getComment());\n\t\treturn vt;\n\t}", "public Update cloneShallow() {\n return (Update)cloneShallowContent(new Update());\n }", "public Dispatchable copy() {\n return this;\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public JsonMember copy() {\n return new JsonMember(name, value.copy());\n }", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "@Override\n public LocalStore<V> copy() {\n return this;\n }", "public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }", "public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }", "public Position copy() {\n return new Position(values.clone());\n }", "public Address copy() {\n\t\tAddress copy = new Address(this.street, this.city, this.state, this.zipCode);\n\t\treturn copy;\n\t}", "@Override\n public Object clone() {\n return super.clone();\n }", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "public Ping dup (Ping self)\n {\n if (self == null)\n return null;\n\n Ping copy = new Ping ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.digest = new ArrayList <State> (self.digest);\n return copy;\n }", "Object clone();", "Object clone();", "public Client copy() {\n\t\tClient clone = new Client(ID, Email, PostalAddress);\n\t\treturn(clone);\n\t}", "public DessertVO clone() {\r\n return (DessertVO) super.clone();\r\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "@Override\r\n public InsertStatementBuilder shallowCopy() {\r\n return new InsertStatementBuilder(this);\r\n }", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "public AgwCslOper cloneShallow() {\n return (AgwCslOper)cloneShallowContent(new AgwCslOper());\n }", "@Override\n public TopicObject copy() {\n return new TopicObject(this);\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Clone() {}", "public Function clone();", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public Srv cloneShallow() {\n return (Srv)cloneShallowContent(new Srv());\n }", "public Sudoku copy(){\n\t\treturn (Sudoku) this.clone();\n\t}", "Model copy();", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }", "public AST copy()\n {\n return new Implicate(left, right);\n }", "public Object clone() {\n return new PointImpl( this );\n }", "public EnbOper cloneShallow() {\n return (EnbOper)cloneShallowContent(new EnbOper());\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "public Square copy() {\n\t\tSquare s = new Square(x,y);\n\t\ts.z = z;\n\t\ts.c = new Color(c.getRGB());\n\t\treturn s;\n\t}", "public Record copy() {\n\t\treturn new Record(video, numOwned, numOut, numRentals);\n\t}", "@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "public Board deepCopy() {\n Board copy = new Board();\n for (int i = 0; i < DIMENSION; i++) {\n System.arraycopy(this.fields[i], 0, copy.fields[i], 0, DIMENSION);\n }\n return copy;\n }", "public Tree copy() {\n Tree cpTree = new Tree();\n if(!empty()) {\n Node cpNode = copyNodes(root);\n cpTree.setRoot(cpNode);\n }\n return cpTree;\n }", "public CFExp deepCopy(){\r\n return this;\r\n }", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}", "public Encoding copy() {\n\t\treturn new Encoding(this);\n\t}", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public SimpleStyle copy() {\n\t\tSimpleStyle simpleStyle = new SimpleStyle();\n\t\tcopyIn(simpleStyle);\n\t\treturn simpleStyle;\n\t}", "Component deepClone();", "public TurtleState copy() {\n\t\treturn new TurtleState(position.copy(), direction.copy(), color, shift);\n\t}", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public Card copy(){\n return new Card(Suits, Value);\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }", "public void copy() {\n\n\t}", "public Animal deepCopy() {\n return new Eagle(this);\n }", "public Field copy()\n {\n return new Field(name, type, vis);\n }", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public User copy() {\r\n try {\r\n return (User) BeanUtils.cloneBean(this);\r\n } catch (Exception e) {\r\n throw new IllegalStateException(\"Error while copying \" + this, e);\r\n }\r\n }", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "public Tree<T> clone() {\n Node<T> clonedRoot = this.root.clone();\n clone(this.root, this.root.clone());\n return new Tree<T>(clonedRoot);\n }", "public ComplexNum copy() {\n /*\n * returns a deep copy of this complex number\n * */\n\n return new ComplexNum(realPart, imaginaryPart);\n }", "public T cloneDeep();", "public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }", "public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }", "public Restaurant clone() {\r\n return new Restaurant(this);\r\n }", "public Expression deepCopy()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "public MapVS<K, T, V> getCopy() {\n return new MapVS(this);\n }", "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "private final State copy( State state)\n {\n State copy = new State();\n copy.index = counter++;\n copy.stackOps = Arrays.copyOf( state.stackOps, state.stackOps.length);\n copy.gotos = Arrays.copyOf( state.gotos, state.gotos.length);\n itemSetMap.put( copy, itemSetMap.get( state));\n return copy;\n }", "StoryState copy() {\r\n\t\tStoryState copy = new StoryState(story);\r\n\r\n\t\tcopy.getOutputStream().addAll(outputStream);\r\n\t\toutputStreamDirty();\r\n\t\tcopy.currentChoices.addAll(currentChoices);\r\n\r\n\t\tif (hasError()) {\r\n\t\t\tcopy.currentErrors = new ArrayList<String>();\r\n\t\t\tcopy.currentErrors.addAll(currentErrors);\r\n\t\t}\r\n\r\n\t\tcopy.callStack = new CallStack(callStack);\r\n\r\n\t\tcopy.variablesState = new VariablesState(copy.callStack, story.getListDefinitions());\r\n\t\tcopy.variablesState.copyFrom(variablesState);\r\n\r\n\t\tcopy.evaluationStack.addAll(evaluationStack);\r\n\r\n\t\tif (getDivertedTargetObject() != null)\r\n\t\t\tcopy.setDivertedTargetObject(divertedTargetObject);\r\n\r\n\t\tcopy.setPreviousContentObject(getPreviousContentObject());\r\n\r\n\t\tcopy.visitCounts = new HashMap<String, Integer>(visitCounts);\r\n\t\tcopy.turnIndices = new HashMap<String, Integer>(turnIndices);\r\n\t\tcopy.currentTurnIndex = currentTurnIndex;\r\n\t\tcopy.storySeed = storySeed;\r\n\t\tcopy.previousRandom = previousRandom;\r\n\r\n\t\tcopy.setDidSafeExit(didSafeExit);\r\n\r\n\t\treturn copy;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "final public Attr clone() {\r\n\t\t\tif(Vector == null)\r\n\t\t\t\treturn new Attr(Name, Value, null);\r\n\t\t\telse if(Object == null)\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone());\r\n\t\t\telse\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone(), Object);\r\n\t\t}", "public ModuleDescriptorAdapter copy() {\n ModuleDescriptorAdapter copy = new ModuleDescriptorAdapter(getId(), getDescriptor(), getComponentId());\n copyTo(copy);\n copy.metaDataOnly = metaDataOnly;\n return copy;\n }", "public static void copyConstructor(){\n\t}", "public Feature copy() {\n\t\tFeature ret = new AbbeelFeature();\n\t\treturn ret;\n\t}", "public JsonFactory copy()\n/* */ {\n/* 324 */ _checkInvalidCopy(JsonFactory.class);\n/* */ \n/* 326 */ return new JsonFactory(this, null);\n/* */ }", "@Override\n public GraphicsState clone(\n )\n {\n GraphicsState clone;\n {\n // Shallow copy.\n try\n {clone = (GraphicsState)super.clone();}\n catch(CloneNotSupportedException e)\n {throw new RuntimeException(e);} // NOTE: It should never happen.\n\n // Deep copy.\n /* NOTE: Mutable objects are to be cloned. */\n clone.ctm = (AffineTransform)ctm.clone();\n clone.tlm = (AffineTransform)tlm.clone();\n clone.tm = (AffineTransform)tm.clone();\n }\n return clone;\n }", "public RawBlockContainer copy() {\n final RawBlockContainer container = new RawBlockContainer();\n container.setVersion(ArrayUtil.arrayCopy(getVersion()));\n container.setPreviousBlockHash(ArrayUtil.arrayCopy(getPreviousBlockHash()));\n container.setMerkleRoot(ArrayUtil.arrayCopy(getMerkleRoot()));\n container.setTimestamp(ArrayUtil.arrayCopy(getTimestamp()));\n container.setBits(ArrayUtil.arrayCopy(getBits()));\n container.setNonce(ArrayUtil.arrayCopy(getNonce()));\n return container;\n }" ]
[ "0.75599885", "0.7550207", "0.7468555", "0.74170417", "0.7415086", "0.73966116", "0.72647595", "0.72313106", "0.72023684", "0.7182921", "0.7173853", "0.71658903", "0.7106737", "0.708105", "0.7053349", "0.69559133", "0.6901973", "0.68985665", "0.6896987", "0.6894", "0.68686444", "0.6861159", "0.68580574", "0.68545604", "0.68513346", "0.6843668", "0.6816811", "0.68128574", "0.68036515", "0.67900914", "0.67900914", "0.6768763", "0.6764064", "0.6746116", "0.67366594", "0.6733698", "0.6727375", "0.6716359", "0.66845584", "0.66845584", "0.66845584", "0.66845584", "0.66815805", "0.66727024", "0.6657816", "0.6654225", "0.6637135", "0.66319543", "0.66060156", "0.6600003", "0.65954083", "0.6594919", "0.65944844", "0.65876794", "0.65874714", "0.6575173", "0.65507877", "0.6541695", "0.65382576", "0.6530579", "0.6526343", "0.6525881", "0.6522801", "0.6521445", "0.65131885", "0.6499925", "0.649878", "0.64972806", "0.64932525", "0.64633065", "0.6456439", "0.6454031", "0.64414674", "0.6431074", "0.6424255", "0.64197934", "0.64148116", "0.64101404", "0.63993675", "0.6396691", "0.6386523", "0.6380032", "0.6377519", "0.6375917", "0.6371305", "0.63678646", "0.6364125", "0.63599545", "0.63571334", "0.6357125", "0.63477737", "0.63454247", "0.6345068", "0.6343925", "0.63431656", "0.634004", "0.63373536", "0.6332831", "0.63326705", "0.6330668", "0.6325507" ]
0.0
-1
Record a symptom for the supplied module.
public void addSymptoms(String name, SymptomSource symptomSource) { Map<Long, SymptomInfo> timedTypedSymptoms = symptomSource.getTimeInfos(); // get the value that correspond to the all times belonging // to the interval [begin, end] of the condition if any. List<Long> allTimes = new ArrayList<Long>(); for (Long time : timedTypedSymptoms.keySet()) { boolean greatThanBegin = time >= onsetTime; boolean lowThanEnd = (endTime != null && time <= endTime) || (endTime == null); if (greatThanBegin && lowThanEnd) { allTimes.add(time); } } if (allTimes.size() > 0) { Collections.sort(allTimes); if (!symptoms.containsKey(name)) { symptoms.put(name, new ArrayList<Integer>()); } for (Long time : allTimes) { Integer value = timedTypedSymptoms.get(time).getValue(); symptoms.get(name).add(value); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addExamToModule(Module module, Exam exam);", "public void addDetails(String symptom, String diagnosis, String prescription) {\n if (symptom != null) {\n symptoms.add(symptom);\n }\n if (diagnosis != null) {\n diagnoses.add(diagnosis);\n }\n if (prescription != null) {\n prescriptions.add(prescription);\n }\n }", "void addLessonToModule(Module module, Lesson lesson);", "public void setModuleName(final String moduleName) {\n this.moduleName = moduleName;\n }", "@Override\r\n\tpublic String addModulePage(Module module) {\n\t\ttry {\r\n\t\t\tsessionFactory.getCurrentSession().save(module);\r\n\t\t\treturn \"success\";\r\n\t\t} catch (HibernateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"fail\";\r\n\t\t}\r\n\t}", "public void setModuleName(String moduleName) {\r\n\t\tthis.moduleName = moduleName;\r\n\t}", "@Override\n\tprotected void inspectModule(String label, ModuleAction action, Module module) {\n\t\tfinal Instant mark = timeService.now();\n\t\tfinal String modulePK = module.primaryKey();\n\t\tif (Stream.of(ignoredModules).anyMatch(ignorance -> !StringUtils.isEmpty(ignorance) && modulePK.startsWith(ignorance))) {\n\t\t\tlog.debug(\"Module '{}' is ignored for inspection.\", modulePK);\n\t\t\treturn;\n\t\t}\n\t\tlog.info(\"Scan module '{}'\", modulePK);\n\t\t// get health state of module\n\t\tmodule.getMetricsContainer().health().heartBeat(action, module);\n\t\t// collect and save all metrics of module\n\t\tAtomicInteger counter = new AtomicInteger(1);\n\t\tmodule.metrics().stream()\n\t\t\t\t.peek(metric -> log.debug(\"{}. metric '{}' processing\", counter.getAndIncrement(), metric.getName()))\n\t\t\t\t.filter(metric -> this.isWorking())\n\t\t\t\t.forEach(this::storeMetric);\n\n\t\t// save metric about module health check duration\n\t\tgetMetricsContainer().duration().simple(label, action, timeService.now(), modulePK, timeService.duration(mark));\n\t}", "public void addSymptom(View v) {\n\tfinal Dialog dialog = new Dialog(this);\n\tdialog.setContentView(R.layout.dialog_symptom);\n\tdialog.setTitle(\"Patient Symptom Description\");\n\t((TextView) dialog.findViewById(R.id.current_time_field))\n\t\t.setText(new Date().toString());\n\tButton dialog_addButton = (Button) dialog\n\t\t.findViewById(R.id.add_symptom_button);\n\tdialog_addButton.setOnClickListener(new OnClickListener() {\n\t @Override\n\t public void onClick(View v) {\n\t\tsymptoms.put(new Date(), ((EditText) dialog\n\t\t\t.findViewById(R.id.symtom_description_field)).getText()\n\t\t\t.toString());\n\t\t;\n\t\t((EditText) dialog.findViewById(R.id.symtom_description_field))\n\t\t\t.setText(\"\");\n\t\t((EditText) dialog.findViewById(R.id.symtom_description_field))\n\t\t\t.setHint(\"Symtoms Description Here\");\n\t\tdialog.dismiss();\n\t }\n\t});\n\tButton dialog_cancelButton = (Button) dialog\n\t\t.findViewById(R.id.cancel_symptom_button);\n\tdialog_cancelButton.setOnClickListener(new OnClickListener() {\n\t @Override\n\t public void onClick(View v) {\n\t\t((EditText) dialog.findViewById(R.id.symtom_description_field))\n\t\t\t.setText(\"\");\n\t\t((EditText) dialog.findViewById(R.id.symtom_description_field))\n\t\t\t.setHint(\"Symtoms Description Here\");\n\t\tdialog.dismiss();\n\t }\n\t});\n\tdialog.show();\n }", "public void majInformation (String typeMessage, String moduleMessage, String corpsMessage) {\n Date date = new Date();\n listMessageInfo.addFirst(dateFormat.format(date)+\" - \"+typeMessage+\" - \"+moduleMessage+\" - \"+corpsMessage);\n }", "public void setModuleName (String moduleName)\n\n {\n\n // moduleName is set equal to moduleName.\n this.moduleName = moduleName;\n\n }", "void logModuleEvent(ModuleInfo module, String action, String value) {\n\t\tList<NameValuePair> pairs = new ArrayList<NameValuePair>();\n\t\tpairs.add(new BasicNameValuePair(\"user\", module.getUser()));\n\t\tpairs.add(new BasicNameValuePair(\"moduleName\", module.getModuleName()));\n\t\tpairs.add(new BasicNameValuePair(\"moduleType\", module.getModuleType()));\n\t\tpairs.add(new BasicNameValuePair(\"action\", action));\n\t\tpairs.add(new BasicNameValuePair(\"message\", value));\n\t\ttry {\n\t\t\thttpPostLog.setEntity(new UrlEncodedFormEntity(pairs));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(httpPostLog);\n\t\t\tLog.i(\"HttpResponse\", response.getEntity().toString());\n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setModule(java.lang.CharSequence value) {\n this.module = value;\n }", "private void registerModule(Module module) {\n \t\tif (module.register()) {\n \t\t\t_availableModules.add(module);\n \t\t}\n \t}", "public void publishTiancheWarn(String errorMsg) {\n }", "public void sendModuleNameToServer() {\n try {\n System.out.println(\"writing module name:\" + getModuleName());\n ostream.writeObject(getModuleName());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "<S> void storeEmissionProbability(String hmmId, HMMEmissionProbability<S> probability) throws IOException;", "private void putInCacheDirty(Module module) throws NoStorageForModuleException, StorageFailureException{\n\t\tputInCache(module);\n\t\tIModuleStorage storage = storages.get(module.getId());\n\t\tif (storage==null){\n\t\t\tLOGGER.warn(\"No storage for \" + module.getId() + \", \" + module + \" is not persistent!\");\n\t\t\tthrow new NoStorageForModuleException(module.getId());\n\t\t}\n\t\tstorage.saveModule(module);\n\t}", "@Override\n\tpublic void recordVisitAssessment(String matriculation, UoGGrade grade,\n\t\t\tString description) {\n\t\t//Add grade thing\n\t\tSystem.out.println(\"Send an email to \" + matriculation + \" & employer to let them know about the grade\");\n\t}", "public void trace (String msg) \n\t{\n\t\tLog.d(\"Reminder\", msg);\n\t\t//toast (msg);\n\t}", "public static void error(Symbol was, Ident now) {\n String loc = was.m_id.getLocation().toString();\n message(now.getLocation(), 'E', \"DEFN-2\", now.getId(), loc);\n }", "public void perceptAttended(IPerceptualMemoryModuleEvent event)\n {\n\n }", "void deleteExam(Module module, Exam target);", "public abstract int addCause(Guid process, Guid signal)\r\n throws SignalModeConflictException;", "@DefaultMessage(\"System Module already added to the user\")\n @Key(\"systemUser.moduleAddedToUser\")\n String systemUser_moduleAddedToUser();", "public void save(ErpmItemMaster erpmim) {\n Session session = HibernateUtil.getSessionPicoFactory();\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n session.save(erpmim);\n tx.commit();\n }\n catch (RuntimeException re) {\n if(erpmim != null)\n tx.rollback();\n throw re;\n }\n finally {\n session.close();\n }\n }", "public void report (Task task, Component concept, Severity severity, ReportActionType actionType, String... details) throws TermServerScriptException {\n\t\tString taskStr = (task == null)?\"Null\":task.toString();\n\t\tString concatonatedLine = taskStr + concept + severity + actionType + details[0];\n\t\tif (!reportedItems.contains(concatonatedLine.hashCode())) {\n\t\t\tsuper.report(task, concept, severity, actionType, details[0]);\n\t\t\treportedItems.add(concatonatedLine.hashCode());\n\t\t}\n\t}", "public void setModule(String name, BwModule module) {\n modules.put(name, module);\n }", "@Override\r\n\tpublic void add(AssesmentQuestion assesmentQuestion) {\r\n\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\ttry {\r\n\t\t\tsession.save(assesmentQuestion);\r\n\t\t\ttx.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void startActivityTimers(String module) {\n\t\tclearTimeOutWarning();\n\t\tactiveModule = module;\n\t\tDate lastActivityDate = new Date();\n\t\tlastActivityTime = lastActivityDate.getTime();\n\t\ttimeoutWarning.cancel();\n\t\trepeatedWarning.cancel();\n\t\t//US 439. Warning message only required for Mat module not Login module.\n\t\tif(activeModule != null && activeModule.equalsIgnoreCase(ConstantMessages.MAT_MODULE)){\n\t\t\tif(timeoutWarning != null)\n\t\t\t\ttimeoutWarning.schedule(WARNING_TIME);\n\t\t}\n\t}", "public void notify(String name, String GradYear){\n\t\ttry{\n\t\t\tcrm.addStudent(name, Integer.parseInt(GradYear));\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tsv.setErrorMsg();\n\t\t}\n\t}", "private String name(String module)\n {\n return module.split(\"%%\")[1];\n }", "public AddCompletedModuleCommand(Module module) {\n requireNonNull(module);\n toAdd = module;\n }", "public void testAddModule() {\n\t System.out.println(\"addModule\");\n\t Module module = module1;\n\t Student instance = student1;\n\t instance.addModule(module);\n\t }", "@Then(\"^new type is saved$\")\n public void newTypeIsSaved() throws Throwable {\n throw new PendingException();\n }", "@Override\r\n\tpublic String annoy() \r\n\t{\r\n\t\treturn super.getName() + \" annoys by giving a sales pitch\"; \r\n\t}", "boolean moduleHasExam(Module module, Exam exam);", "public Medicine saveMedicineMedicineSymptoms(Integer id_1, MedicineSymptom related_medicinesymptoms);", "public void handle(final String symbolicName, final Throwable t, final Logger log) {\r\n\t\tlog.error(t.getMessage(), t);\r\n\r\n\t\tErrorLog error = new ErrorLog();\r\n\t\terror.setCreationDate(new Date());\r\n\t\terror.setBundleId(symbolicName);\r\n\t\terror.setThrowable(t);\r\n\r\n\t\tmodelListener.fireEvent(null, error, LevelType.Exception, ChangeType.Added);\r\n\t}", "public Record(\n LinkedHashSet<String> symptoms,\n LinkedHashSet<String> diagnoses,\n LinkedHashSet<String> prescriptions\n ) {\n this.symptoms = symptoms;\n this.diagnoses = diagnoses;\n this.prescriptions = prescriptions;\n }", "public void removeModule(Discipline discipline, int module_id) throws SQLException{\r\n discipline.modules=new LinkedList<Module>();\r\n \r\n \r\n System.out.println();\r\n String SQLStatement = SQLInstruct.removeModule(discipline.getId(), module_id);\r\n db.updateDB(SQLStatement);\r\n updateModules(discipline);\r\n }", "public void addStudent(Student student) {\t\r\n\t\t//Adds student to list of students taking module\r\n\t\tStudentList.add(student);\r\n\t\t\r\n\t\t// adds module to students list of modules\r\n\t\tstudent.AddModuleList(ModuleName);\r\n}", "public void logThis(String log, Theory theory)\n {\n }", "@Override\n\tpublic void save(EhmoPackage ehmoPackage) {\n\t\t\n\t\t\n\t\tehmoPackageDao.save(ehmoPackage);\n\t\t\n\t}", "public void trace(String message);", "public void trace(String message);", "public Receipt recordTransaction(Transaction t) throws RemoteException;", "public void savePersonTiming(ActionEvent actionEvent) {\n\t\tfor (int i = 0; i < 1000000; i++) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"You've registered\"));\n\t}", "void storeMetric(ModuleMetric metric) {\n\t\tlog.debug(\"Storing metric '{}' of '{}'\", metric.getName(), metric.getAction().getModule().primaryKey());\n\t\tfinal ModuleAction action = metric.getAction();\n\t\tactionStorage.persist(action);\n\n\t\tfinal String modulePK = action.getModule().primaryKey();\n\t\tfinal String metricName = metric.getName();\n\t\tfinal Instant metricMeasured = metric.getMeasured();\n\t\tfinal String metricHost = action.getHostName();\n\t\tfinal String metricActionId = action.getId();\n\t\tfinal String metricData = metric.valuesAsString();\n\t\tmetricStorage.storeMetric(metricName, modulePK, metricMeasured, metricHost, metricActionId, metricData);\n\t\tlog.debug(\"Stored '{}'\", metric);\n\t}", "@OnClick(R.id.buttonConfirmSymptoms)\n public void buttonConfirmSymptoms() {\n if (sharedPreferences.getInt(\"symptomCounter\", 0) == 0) {\n Toast.makeText(ExaminationActivity.this, getString(R.string.not_enough), Toast.LENGTH_SHORT).show();\n } else {\n startActivity(new Intent(ExaminationActivity.this, DiagnoseActivity.class));\n finish();\n }\n }", "public CommandResult execute(ModuleManager moduleManager) {\n assert getModuleName() != null;\n TerminusLogger.info(\"Executing Add Question Command\");\n NusModule module = moduleManager.getModule(getModuleName());\n ContentManager<Question> contentManager = module.getContentManager(Question.class);\n assert contentManager != null;\n\n contentManager.add(new Question(question, answer));\n TerminusLogger.info(String.format(\"Question (\\\"%s\\\",\\\"%s\\\") has been added\", question, answer));\n String message = String.format(Messages.MESSAGE_RESPONSE_ADD, CommonFormat.COMMAND_QUESTION, question);\n return new CommandResult(message);\n }", "public void registhourly_employee(Hourly_employee form) throws UserException, ClassNotFoundException, InstantiationException, IllegalAccessException{\n\t\tHourly_employee hrs = hourly_employeeDao.findByHourly_ssn(form.gethourly_ssn());\r\n\t\tString hrsID = hrs.gethourly_ssn();\r\n\t\tString formID = form.gethourly_ssn();\r\n\t\t\r\n\t\tif(hrsID == formID)\r\n\t\t\tthrow new UserException(\"This Employee ID has already been in your Database!\");\r\n\t\t\r\n\t\thourly_employeeDao.add(form);\r\n\t}", "public void message(String msg) {\n lastScope.message(msg);\n }", "public void setModuleID (int moduleID)\n\n {\n\n // moduleId is set equal to moduleID.\n this.moduleID = moduleID;\n\n }", "private void displaySaveSuccess() {\n\t\tString title = \"Event successfully save...\";\n\t\tString msg =\n\t\t\t\t\"To Do List: \" +txtSubject.getText()+ \n\t\t\t\t\"\\nhas been save....\";\n\t\tJOptionPane.showMessageDialog(\n\t\t\t\tnull, msg, title, JOptionPane.INFORMATION_MESSAGE);\n\t}", "public synchronized void informModuleEndLoading(Module module) {\n\t\tModuleStat stat = getModuleStat(module);\n\t\tstat.waitLoading = false;\n\t}", "public static void logEvent(SimulationEvent event) {\n\t\tevents.add(event);\n\t\tSystem.out.println(event);\n\t}", "public String printChangeSuccessful(String field) {\n return \"Congratulations! Your \" + field + \" has been successfully changed\";\n }", "public void logPayRaise(){\r\n\t\tSystem.out.println(\"Log message: employee \" + this.employeeName + \" has new salary: \" + this.salary);\r\n\t}", "public void saveQuestion(Questions q) {\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\tsession.save(q);\n\t\ttx.commit();\n\t\tsession.close();\n\t}", "public void addRequest(String module) {\r\n //if this module hasn't already requested this button\r\n if (!modules.contains(module)) {\r\n //add a request\r\n modules.add(module);\r\n }\r\n }", "@Transactional\r\n\tprotected void createQuestionInstruction(QuestionTransferObject newQuestdto, \r\n\t\t\tModuleTransferObject moduledto, String instString) {\r\n\t\t\r\n\t\tif (instString == null || instString.length() == 0)\r\n\t\t\treturn; //Nothing to do\r\n\t\t\r\n\t\tString sizedUpInstr = instString;\r\n\r\n\t\t/* (Snippet copied from FormModuleEditAction (FB)\r\n\t\t * \r\n\t\t * Truncate instruction string to fit in LONG_NAME field (255 characters)\r\n\t\t * Refer to GF# 12379 for guidance on this\r\n\t\t */\r\n\r\n\t\tif (sizedUpInstr.length() > MAX_LONG_NAME_LENGTH) { \r\n\t\t\tsizedUpInstr = sizedUpInstr.substring(0, MAX_LONG_NAME_LENGTH);\r\n\t\t}\r\n\r\n\t\tInstruction instr = new InstructionTransferObject();\r\n\t\tinstr.setLongName(sizedUpInstr);\r\n\t\tinstr.setDisplayOrder(0);\r\n\t\tinstr.setVersion(new Float(1));\r\n\t\tinstr.setAslName(\"DRAFT NEW\");\r\n\t\tinstr.setContext(moduledto.getContext());\r\n\t\tinstr.setPreferredDefinition(instString);\r\n\t\tinstr.setCreatedBy(moduledto.getCreatedBy());\r\n\t\tnewQuestdto.setInstruction(instr);\r\n\t\t\r\n\t\tquestInstructionV2Dao.createInstruction(instr, newQuestdto.getQuesIdseq());\r\n \r\n\t}", "public String getModuleID() { return \"\"; }", "public void SimAdded(AddSimEvento event);", "private void createRejectionNotice(Order faultOrder)\n {\n\n Random rand = new Random();\n int randomNum = rand.nextInt(2);\n\n Inspection inspection = new Inspection(\"1/03/2017\", Item.TOURINGTUBE, faultOrder, workerList.get(randomNum), \"dented\");\n\n System.out.println(inspection + \"\\n\");\n }", "public static void addMarker(IResource resource, int type, int line, String message){\r\n\t\ttry {\r\n\t\t\tIMarker marker = resource.createMarker(IMarker.PROBLEM);\r\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\t\tmap.put(IMarker.SEVERITY, Integer.valueOf(type));\r\n\t\t\tmap.put(IMarker.MESSAGE, message);\r\n\t\t\tmap.put(IMarker.LINE_NUMBER,Integer.valueOf(line));\r\n\t\t\tmarker.setAttributes(map);\r\n\t\t} catch(CoreException ex){\r\n\t\t\tHTMLPlugin.logException(ex);\r\n\t\t}\r\n\t}", "public void addSubject(Subject s) {\n // TODO implement here\n }", "public void addModule(String name, Discipline discipline) throws SQLException{\r\n \r\n discipline.modules=new LinkedList<Module>();\r\n \r\n String SQL_addModule = SQLInstruct.addModule(name);\r\n db.updateDB(SQL_addModule);\r\n \r\n int module_id;\r\n String SQL_moduleId = SQLInstruct.getModuleAdded();\r\n ResultSet rSet = db.queryDB(SQL_moduleId);\r\n \r\n if(rSet.next()){\r\n module_id=rSet.getInt(1);\r\n String SQL_connectModule=SQLInstruct.connectDisciplineModule(discipline.getId(), module_id);\r\n db.updateDB(SQL_connectModule);\r\n }\r\n updateModules(discipline);\r\n }", "public void modifyModule(Module module) {\n\t\tmodule=(Module) this.getHibernateTemplate().merge(module);\n\t\tthis.getHibernateTemplate().update(module);\n\t}", "@Subroutine(\"signal\")\n public static LispObject signal (LispSymbol errorSymbol, LispList data) {\n String msg = \"\";// '[' + ((errorMessage instanceof LispString) ? ((LispString) errorMessage).getData() : \"peculiar error\") + \"] \";\n msg += '(' + errorSymbol.getName() + ' ';\n msg += (data.length() == 1 ? data.car().toString() : data.toString()) + ')';\n // System.out.println(msg);\n throw new LispException(msg);\n }", "public void save(XmlWriter w) throws Throwable {\n w.add(\"log\", new String[] { \"type\", type().toString(), \"time\",\n new SimpleDateFormat(DateTime.DATE_TIME_FORMAT).format(time()) }, message());\n }", "public java.lang.CharSequence getModule() {\n return module;\n }", "synchronized void addModule(Module module) throws Exception\n {\n m_modules.add(module);\n\n // Set protection domain after adding the module to the bundle,\n // since this requires that the bundle has a module.\n ((ModuleImpl) module).setSecurityContext(\n new BundleProtectionDomain(getFramework(), this));\n\n SecurityProvider sp = getFramework().getSecurityProvider();\n if ((sp != null) && (System.getSecurityManager() != null))\n {\n try\n {\n sp.checkBundle(this);\n }\n catch (Exception ex) \n {\n m_modules.remove(m_modules.size() - 1);\n throw ex;\n }\n }\n\n // TODO: REFACTOR - consider moving ModuleImpl into the framework package\n // so we can null module capabilities for extension bundles so we don't\n // need this check anymore.\n if (!isExtension())\n {\n // Now that the module is added to the bundle, we can update\n // the resolver's module state.\n getFramework().getResolver().addModule(module);\n }\n }", "@Then(\"^Mostrara mensaje de error$\")\n\tpublic void Mostrara_mensaje_de_error() throws Throwable {\n\t System.out.println(\"El email o la contrase�a es erronea\");\n\t assert(true);\n\t}", "public java.lang.CharSequence getModule() {\n return module;\n }", "@Override\r\n\tpublic void saveAction(Person p) {\n\t\tSystem.out.println(this.getClass().getCanonicalName());\r\n\t}", "public void note(ValidationType type, String validationName, String content);", "public void printMessage(DiagnosticKind kind, CharSequence msg);", "org.hl7.fhir.ResourceReference addNewSubject();", "void registerStatement(EPStatement statement) {\r\n\t\tepnStatements.add(statement);\r\n\t}", "public void setReason(String reason);", "@Override\n public void setReason( String arg0)\n {\n \n }", "public void greet(String greeter, String personToBeGreeted) {\n\n ProcessInstance processInstance = runtimeService.createProcessInstanceBuilder()\n .processDefinitionKey(\"dimitrios_process\")\n .variable(\"initiator\", \"dimitrios\")\n .start();\n\n System.out.println(\"new process: \" + processInstance.getId());\n\n System.out.println(greeter + \" says: Hello \" + personToBeGreeted + \", I also created a new process.\");\n\n\n auditService.createAuditInstanceBuilder()\n .scopeType(ScopeTypes.CMMN)\n .scopeId(\"CAS-ASDASD-12314-123123\")\n .payload(Collections.singletonMap(\"text\", \"Case was very interesting\"))\n .create();\n\n List<AuditInstance> list = auditService.createAuditInstanceQuery()\n .scopeType(ScopeTypes.CMMN)\n .id(\"CAS-ASDASD-12314-123123\")\n .list();\n\n\n }", "public void printMessage(DiagnosticKind kind, CharSequence msg, MMObj mmObj);", "private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"[email protected]\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}", "void notifyReject(final TradeInstruction instruction);", "void onModuleAdded(final ModularConfigurationModule<T> module) {\n for (ModularConfigurationEntry<T> newEntry : module.getAll()) {\n ModularConfigurationEntry<T> existing = entries.getIfExists(newEntry.getName());\n if (existing == null) {\n existing = removedEntries.remove(newEntry.getName());\n }\n\n // Directly store the module's entry. No change notification as there's\n // no listeners registered yet.\n if (existing == null) {\n this.entries.set(newEntry.getName(), newEntry);\n continue;\n }\n\n // Check whether the existing entry's module overrides the module that\n // we are adding to this store. If so, the entry isn't loaded.\n // Instead it's added to the \"shadow modules\" - a list modules are taken\n // from when the entry is removed from higher-priority modules.\n if (!existing.isRemoved() && !isModuleOverriding(module, existing.getModule())) {\n int index = 0;\n while (index < existing.shadowModules.size() &&\n isModuleOverriding(module, existing.shadowModules.get(index)))\n {\n index++;\n }\n existing.shadowModules.add(index, module);\n continue;\n }\n\n // Swap the entry for the existing one\n existing.loadFromModule(module);\n }\n }", "public void storeQuestion(Question message) {\n Entity messageEntity = new Entity(\"Question\", message.getId().toString());\n messageEntity.setProperty(\"user\", message.getUser());\n messageEntity.setProperty(\"text\", message.getText());\n messageEntity.setProperty(\"timestamp\", message.getTimestamp());\n messageEntity.setProperty(\"children\", message.getKidsToString());\n messageEntity.setProperty(\"privacy\", message.getAccess());\n datastore.put(messageEntity);\n }", "void deleteModule(Module module);", "@Override\n\tpublic void saveModule() throws Exception {\n\n\t}", "public static void saveReligionName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_RELIGION, type);\n editor.apply();\n }", "public void logPM(String to, String message) {\n\t\ttry {\n\n\t\t\tDateFormat df = new SimpleDateFormat(\"'On' MM/dd/yyyy 'at' HH:mm:ss\");\n\t\t\tDate d = new Date();\n\t\t\tBufferedWriter log = new BufferedWriter(new FileWriter(Data.PM_LOG, true));\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t\tlog.write(df.format(d) + \", [From: \" + c.getDisplayName() + \"] [To: \" + to + \"] [Message: \" + message + \"]\");\n\t\t\t\t\t\n\t\t\t} finally {\n\t\t\t\tlog.newLine();\n\t\t\t\tlog.close();\n\t\t\t}\n\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public void unregisterModule(Enum event, IModule module) {\n eventQueue.unregisterModule(event, module);\n }", "public void register(final ImmutableMessage immutableMessage) {\n if (immutableMessage != null) {\n Message.MessageType type = immutableMessage.getType();\n if (isMessageTypeUnsupported(type)) {\n return;\n }\n\n String messageId = getId(immutableMessage);\n\n logger.info(\"Trying to register message with the following ID: {}\", messageId);\n boolean registrationResult = registeredMessages.add(messageId);\n if (registrationResult) {\n logger.info(\"The message with the following ID: {} has been successfully registered\", messageId);\n } else {\n logger.error(\"The message with the following ID is already registered: {}\", messageId);\n }\n } else {\n throw new JoynrIllegalStateException(\"The ImmutableMessage object passed for registering is null.\");\n }\n }", "@SuppressWarnings({\"UNUSED_SYMBOL\"})\r\n private void plog(String m) {\n }", "public void insertQuestion(Pregunta p){\n\t\tpreguntas.persist(p);\n\t}", "int insert(SysNotice record);", "public void addModule(Module module, String name) {\n module.parentMobile = this;\n modules.put(name, module);\n if(module instanceof LightSource)\n Scene.addLightSource((LightSource) module);\n }", "@Override\n public String toString() {\n return String.format(\"Module '%s'\", getName());\n }", "@Override\n\tpublic void submitReimbEmp(Reimbursement reimbursement) {\n\t\t\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tfinal String SQL = \"insert into ers_reimbursement (reimb_amount, reimb_description, reimb_submitted, reimb_author, reimb_status_id, reimb_type_id) values (?,?, current_timestamp, ?, 1 ,?) \";\n\n\t\ttry {\n\t\t\tconn = ConnectionUtil.getConnection();\n\t\t\tstmt = conn.prepareStatement(SQL);\n\t\t\t\n\t\t\tstmt.setInt(1, reimbursement.getAmount());\n\t\t\tstmt.setString(2, reimbursement.getDescription());\n\t\t\tstmt.setInt(3, reimbursement.getAuthorId());\n\t\t\tstmt.setInt(4, reimbursement.getType().getTypeId());\n\t\t\t\n\n\t\t\tstmt.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\n\t\t\n\t}\n\t}", "public void saveMessage(Message message) {\n log.info(\"Saved message: \" + message.getText());\n }" ]
[ "0.54963094", "0.4645124", "0.4480828", "0.44605646", "0.44541252", "0.44053108", "0.4336037", "0.43185636", "0.4295237", "0.42600536", "0.42102954", "0.42096227", "0.41752452", "0.4161316", "0.41381785", "0.4136868", "0.41174227", "0.41117507", "0.41044158", "0.4097408", "0.40603667", "0.40440622", "0.4033929", "0.40260878", "0.40188554", "0.40176272", "0.40071467", "0.40010968", "0.3989833", "0.39730564", "0.3972768", "0.39589944", "0.39534733", "0.3950956", "0.3945214", "0.39437148", "0.3914958", "0.39126834", "0.39078405", "0.38970485", "0.3891515", "0.38767028", "0.38759142", "0.3867828", "0.3867828", "0.38670588", "0.38635364", "0.38619784", "0.38604447", "0.3849983", "0.3847559", "0.38448787", "0.3838063", "0.38338467", "0.3833439", "0.3829625", "0.38283798", "0.3820365", "0.38184205", "0.38102913", "0.3808892", "0.3805944", "0.380102", "0.37977803", "0.37948284", "0.3789992", "0.37876508", "0.3785576", "0.3784002", "0.37833318", "0.3781808", "0.3780608", "0.37800786", "0.37741187", "0.37710124", "0.37688723", "0.37622908", "0.37618178", "0.37611815", "0.37604877", "0.37529087", "0.37518713", "0.37505713", "0.37503308", "0.3748479", "0.37458456", "0.3745835", "0.37444955", "0.3743303", "0.37432787", "0.37286568", "0.3727941", "0.37263244", "0.37262434", "0.37260553", "0.37260476", "0.37254557", "0.37196", "0.3718215", "0.37167493" ]
0.42264122
10
Create a shallow clone of this instance.
public ExpressedConditionRecord clone() { ExpressedConditionRecord data = new ExpressedConditionRecord(this.person); data.sources.putAll(this.sources); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object clone(){\n \t\n \treturn this;\n \t\n }", "public Object clone() {\n return this.copy();\n }", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "Object clone();", "Object clone();", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Function clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Clone() {}", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "protected Shingle copy() {\n return new Shingle(this);\n }", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "Prototype makeCopy();", "public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "Component deepClone();", "public Update cloneShallow() {\n return (Update)cloneShallowContent(new Update());\n }", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public T cloneDeep();", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "public Tree<T> clone() {\n Node<T> clonedRoot = this.root.clone();\n clone(this.root, this.root.clone());\n return new Tree<T>(clonedRoot);\n }", "public final Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "public abstract Object clone();", "public Srv cloneShallow() {\n return (Srv)cloneShallowContent(new Srv());\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }", "public abstract Object clone() ;", "public Object clone() throws CloneNotSupportedException {\n // return INSTANCE\n throw new CloneNotSupportedException();\n }", "public Restaurant clone() {\r\n return new Restaurant(this);\r\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public DessertVO clone() {\r\n return (DessertVO) super.clone();\r\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "public AgwCslOper cloneShallow() {\n return (AgwCslOper)cloneShallowContent(new AgwCslOper());\n }", "public Sudoku clone() {\n\t\tSudoku s = new Sudoku(this.B);\n\t\ts.fileName = this.getFileName();\n\t\t// clone the puzzle\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= N; j++) {\n\t\t\t\ts.puzzle[i][j] = puzzle[i][j];\n\t\t\t}\n\t\t}\n\t\t// clone the constraints table\n\t\tfor (int i = 0; i <= N + 1; i++) {\n\t\t\tfor (int j = 0; j <= N; j++) {\n\t\t\t\ts.constraints[i][j] = (BitSet) constraints[i][j].clone();\n\t\t\t}\n\t\t}\n\t\t// clone the nonAssignedCells\n\t\ts.nonAssignedCells.addAll(this.nonAssignedCells);\n\t\treturn s;\n\t}", "public EnbOper cloneShallow() {\n return (EnbOper)cloneShallowContent(new EnbOper());\n }", "public Table shallowCopy() {\n\t\tSubsetTableImpl vt =\n\t\t\tnew SubsetTableImpl(this.getColumns(), this.subset);\n\t\tvt.setLabel(getLabel());\n\t\tvt.setComment(getComment());\n\t\treturn vt;\n\t}", "public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public Object clone() {\n return new PointImpl( this );\n }", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}", "public Position copy() {\n return new Position(values.clone());\n }", "public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }", "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "protected final Object clone() {\n\t\tBitBoardImpl clone = new BitBoardImpl();\n\t\tfor( int i = 0; i < 5; i++) {\n\t\t clone._boardLayer[i] = _boardLayer[i];\n\t\t}\n\t\treturn clone;\n }", "public abstract State clone();", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public StateInfo copy() {\n return new StateInfo(this);\n }", "public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }", "@Override\n public MetaContainer clone() {\n return clone(false);\n }", "public Ping dup (Ping self)\n {\n if (self == null)\n return null;\n\n Ping copy = new Ping ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.digest = new ArrayList <State> (self.digest);\n return copy;\n }", "public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }", "final public Attr clone() {\r\n\t\t\tif(Vector == null)\r\n\t\t\t\treturn new Attr(Name, Value, null);\r\n\t\t\telse if(Object == null)\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone());\r\n\t\t\telse\r\n\t\t\t\treturn new Attr(Name, Value, Vector.clone(), Object);\r\n\t\t}", "@Override\n public MultiCache clone () {\n return new MultiCache(this);\n }", "public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException(\"clone() is not supported in \"+this.getClass().getName());\n }", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "@Override\n\tpublic Box clone()\n\t{\n\t\treturn new Box(center.clone(), xExtent, yExtent, zExtent);\n\t}", "public Object clone() {\n GlobalizedAnswer cloned;\n try {\n cloned = (GlobalizedAnswer)super.clone();\n }\n catch (CloneNotSupportedException e) {\n throw new Error(getClass() + \" must support cloning\", e);\n }\n assert cloned != null;\n \n // Copy mutable fields by value\n cloned.tuples = (Tuples) tuples.clone();\n \n return cloned;\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public GameBoard clone(){\r\n\t\tGameBoard result = new GameBoard();\r\n\t\ttry{\r\n\t\t\tresult = (GameBoard) super.clone();\r\n\t\t}catch(CloneNotSupportedException e){\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t\tresult.board = (Box[]) board.clone();\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}", "public Client copy() {\n\t\tClient clone = new Client(ID, Email, PostalAddress);\n\t\treturn(clone);\n\t}", "@Override\n public User clone(){\n return new User(this);\n }", "public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}", "public Object clone() {\n SetQuery copy = new SetQuery(this.operation);\n\n this.copyMetadataState(copy);\n\n copy.leftQuery = (QueryCommand)this.leftQuery.clone();\n copy.rightQuery = (QueryCommand)this.rightQuery.clone();\n\n copy.setAll(this.all);\n\n if(this.getOrderBy() != null) {\n copy.setOrderBy(this.getOrderBy().clone());\n }\n\n if(this.getLimit() != null) {\n copy.setLimit( this.getLimit().clone() );\n }\n\n copy.setWith(LanguageObject.Util.deepClone(this.getWith(), WithQueryCommand.class));\n\n if (this.projectedTypes != null) {\n copy.setProjectedTypes(new ArrayList<Class<?>>(projectedTypes), this.metadata);\n }\n\n return copy;\n }", "public VCalendar clone() {\n\t\treturn new VCalendar(this.content, this.collectionId, this.resourceId, this.earliestStart, this.latestEnd, null);\n\t}", "@Override\n public GraphicsState clone(\n )\n {\n GraphicsState clone;\n {\n // Shallow copy.\n try\n {clone = (GraphicsState)super.clone();}\n catch(CloneNotSupportedException e)\n {throw new RuntimeException(e);} // NOTE: It should never happen.\n\n // Deep copy.\n /* NOTE: Mutable objects are to be cloned. */\n clone.ctm = (AffineTransform)ctm.clone();\n clone.tlm = (AffineTransform)tlm.clone();\n clone.tm = (AffineTransform)tm.clone();\n }\n return clone;\n }", "Model copy();", "public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }", "public Solution deepClone() {\n\t\tArrayList<GridPoint> cloneRepresentation = new ArrayList<GridPoint>();\n\t\t\n\t\tfor(GridPoint p : solutionRepresentation) {\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0] = p.getX();\n\t\t\tcoord[1] = p.getY();\n\t\t\tcloneRepresentation.add(new GridPoint(coord));\n\t\t}\n\t\treturn new Solution(this.host, cloneRepresentation);\n\t}", "public abstract Pessoa clone();", "public Sudoku copy(){\n\t\treturn (Sudoku) this.clone();\n\t}", "public WorldState clone ()\n\t{\n\t\tWorldState clone = new WorldState();\n\t\tclone.copy(this);\n\t\treturn clone;\n\t}", "public Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\r\n\tprotected A clone() throws CloneNotSupportedException {\r\n\t\tA clone = (A)super.clone();\r\n//\t\tclone.b = new B();\r\n\t\treturn clone;\r\n\t}", "public Update clone() {\n return (Update)cloneContent(new Update());\n }", "@Override\r\n\tprotected B clone() throws CloneNotSupportedException {\r\n\t\tB clone = (B)super.clone();\r\n//\t\tclone.a = new A();\r\n\t\treturn clone;\r\n\t}", "@Override\n public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "YangType<T> clone();", "public IStore<T> clone();", "public Object clone() throws CloneNotSupportedException\n\t{\n\t\tthrow new CloneNotSupportedException();\n\t}", "@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }", "public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n /* Cannot happen */\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "public Board deepCopy() {\n Board copy = new Board();\n for (int i = 0; i < DIMENSION; i++) {\n System.arraycopy(this.fields[i], 0, copy.fields[i], 0, DIMENSION);\n }\n return copy;\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}" ]
[ "0.7719061", "0.76566917", "0.762373", "0.7534014", "0.7520538", "0.7520538", "0.7485966", "0.7444044", "0.7442256", "0.7442256", "0.7442256", "0.7442256", "0.7400936", "0.73491424", "0.7302782", "0.7248457", "0.72415274", "0.7216734", "0.71597815", "0.7130809", "0.71200305", "0.7113481", "0.7086927", "0.70814514", "0.7079369", "0.70768124", "0.70519847", "0.70222", "0.70183736", "0.7013477", "0.7012648", "0.70099455", "0.6969938", "0.696416", "0.69587797", "0.6956188", "0.69343644", "0.692463", "0.6922986", "0.69159555", "0.6913802", "0.69119465", "0.68954796", "0.68835706", "0.68781453", "0.68673384", "0.685582", "0.6835513", "0.6828141", "0.68225855", "0.6815249", "0.6810063", "0.6806691", "0.6777771", "0.67457503", "0.67452", "0.6740121", "0.6733618", "0.6733038", "0.6729863", "0.67148", "0.6712654", "0.6711134", "0.66983813", "0.6694262", "0.6687681", "0.6682937", "0.6673247", "0.6663701", "0.665573", "0.6642189", "0.6640394", "0.66378564", "0.6608257", "0.66073686", "0.6606878", "0.6597412", "0.6588736", "0.65853643", "0.65833163", "0.65777135", "0.6571465", "0.65655875", "0.65645087", "0.6554052", "0.6552842", "0.65514064", "0.6544724", "0.65427804", "0.6541974", "0.6541062", "0.65358406", "0.6532467", "0.6530821", "0.6530133", "0.6528594", "0.65279114", "0.65274364", "0.65274256", "0.6526864", "0.6523148" ]
0.0
-1
Method that is used to update the onsetConditions field when a ConditionOnset state is processed.
public void onConditionOnset(String module, String state, String condition, long time) { if (!sources.containsKey(module)) { sources.put(module, new ModuleConditions(module)); } ModuleConditions moduleConditions = sources.get(module); moduleConditions.onsetCondition(condition, state, time); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, OnsetCondition> getOnsetConditions() {\n return onsetConditions;\n }", "public void onsetCondition(String condition, String state, long time) {\n if (!onsetConditions.containsKey(condition)) {\n onsetConditions.put(condition, new OnsetCondition(condition));\n }\n OnsetCondition onsetCondition = onsetConditions.get(condition);\n onsetCondition.addNewEntry(time);\n state2conditionMapping.put(state, condition);\n }", "public void setTrackedConditions(Set<Condition> trackedConditions) {\n this.trackedConditions = trackedConditions;\n }", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }", "public void setIsOnCondition (boolean IsOnCondition)\n\t{\n\t\tset_Value (COLUMNNAME_IsOnCondition, Boolean.valueOf(IsOnCondition));\n\t}", "public void setConditions(Condition [] Conditions) {\n this.Conditions = Conditions;\n }", "public void setEventConditions(EventCondition [] EventConditions) {\n this.EventConditions = EventConditions;\n }", "protected void setOnWhenAppliedPower(boolean onWhenAppliedPower) {\n this.onWhenAppliedPower = onWhenAppliedPower;\n \n }", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "public void set( final Condition condition )\n {\n m_condition = condition;\n }", "void setOnStatus(Boolean on) {\n this.on = on;\n }", "public void setOn(boolean on) {\n\t\tthis.on = on;\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a statefulset's current state.\")\n\n public List<V1StatefulSetCondition> getConditions() {\n return conditions;\n }", "public Set<Condition> getTrackedConditions() {\n return trackedConditions;\n }", "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "public OnsetCondition clone() {\n OnsetCondition data = new OnsetCondition(this.name);\n data.timeInfos.addAll(this.timeInfos);\n return data;\n }", "public String onsetString() {\n return getString(FhirPropertyNames.PROPERTY_ONSET_STRING);\n }", "public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();\n }\n }", "public void setStatus(Condition con) {\n\t\t\n\t}", "public static void bgfx_encoder_set_condition(@NativeType(\"bgfx_encoder_t *\") long _this, @NativeType(\"bgfx_occlusion_query_handle_t\") short _handle, @NativeType(\"bool\") boolean _visible) {\n long __functionAddress = Functions.encoder_set_condition;\n if (CHECKS) {\n check(_this);\n }\n invokePCV(_this, _handle, _visible, __functionAddress);\n }", "public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}", "public void setOn(boolean isOn) {\n\t\tisOn = isOn;\n\t}", "public static void bgfx_set_condition(@NativeType(\"bgfx_occlusion_query_handle_t\") short _handle, @NativeType(\"bool\") boolean _visible) {\n long __functionAddress = Functions.set_condition;\n invokeCV(_handle, _visible, __functionAddress);\n }", "public void changeConditionsSetsFromRadioButton(Set<String> conditionSetsNames){\n\t\t//text to be add\n\t\tString toAdd;\n\n\t\t//integrate conditions set in text from radio button\n\t\tif (conditionSetsNames.isEmpty()) {\n\t\t\ttoAdd = \"<\"+translator.getTranslation(Tags.USPECIFIED_CONDITIONS)+\">\";\n\t\t} else {\n\t\t\ttoAdd = ContentPersisterUtil.join(\";\", conditionSetsNames);\n\t\t}\n\t\t\n\t\t//set text\n\t\tuseAllCondSetsRBtn.setText(translator.getTranslation(Tags.ALL_CONDITIONS_SETS) + \" \" + toAdd);\n\t}", "public void setOn(boolean arg) {\n isOn = arg;\n }", "public void check_union_set(boolean on){\r\n this.e_union_set = on;\r\n }", "public void setOn(final boolean ON) {\n on = ON;\n init(getInnerBounds().width, getInnerBounds().height);\n repaint(getInnerBounds());\n }", "public void setItemState(boolean isOn){\n\t\tthis.isWarningOn=isOn;\n\t\tbtn.setEnabled(!isOn);\n\t\tbtn.setBackground(this.getBackground());\n\t\twnd.setState(isOn);\n\t\tif (isOn)\n\t\t\twnd.setLabel(WarningText);\n\t\telse \n\t\t\twnd.setLabel((VariantPointConstants.isvShowLowStock() && quantity <= LowStockThreshold) \n\t\t\t\t\t? LowStockText : NormalText);\n\t}", "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "public List<ConditionalRequirement> getConditions() {\r\n return conditions;\r\n }", "public Condition [] getConditions() {\n return this.Conditions;\n }", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "public void setCondition( String condition ) {\n Element conditionElement = controlElement.element( ActionSequenceDocument.CONDITION_NAME );\n if ( conditionElement == null ) {\n conditionElement = controlElement.addElement( ActionSequenceDocument.CONDITION_NAME );\n }\n conditionElement.clearContent();\n conditionElement.addCDATA( condition );\n ActionSequenceDocument.fireControlStatementChanged( this );\n }", "void setState(Object sender, ConditionT condition, Params params, StateT state);", "public void check_always_true_condition(boolean on){\r\n this.e_always_true_condition = on;\r\n }", "protected void setOnWhenMovementDetected(boolean onWhenMovementDetected) {\n this.onWhenMovementDetected = onWhenMovementDetected;\n }", "public void addCriticalOnset() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"critical-onset\",\n null,\n childrenNames());\n }", "public void setCondition(ExpressionNode condition);", "public List<Condition> getConditions() {\n\t\treturn conditions;\n\t}", "public ModuleConditions(String source) {\n this.source = source;\n onsetConditions = new ConcurrentHashMap<String, OnsetCondition>();\n state2conditionMapping = new ConcurrentHashMap<String, String>();\n }", "void setInConditionsAsTables() {\n\n for (int i = rangeVariables.length - 1; i >= 0; i--) {\n RangeVariable rangeVar = rangeVariables[i];\n Expression in = inExpressions[i];\n\n if (in != null) {\n Index index = rangeVar.rangeTable.getIndexForColumn(\n in.getLeftNode().nodes[0].getColumnIndex());\n RangeVariable newRangeVar =\n new RangeVariable(in.getRightNode().subQuery.getTable(),\n null, null, null, compileContext);\n RangeVariable[] newList =\n new RangeVariable[rangeVariables.length + 1];\n\n ArrayUtil.copyAdjustArray(rangeVariables, newList,\n newRangeVar, i, 1);\n\n rangeVariables = newList;\n\n // make two columns as arg\n ColumnSchema left = rangeVar.rangeTable.getColumn(\n in.getLeftNode().nodes[0].getColumnIndex());\n ColumnSchema right = newRangeVar.rangeTable.getColumn(0);\n Expression e = new ExpressionLogical(rangeVar, left,\n newRangeVar, right);\n\n rangeVar.addIndexCondition(e, index, flags[i]);\n\n rangeVar.addCondition(in, true);\n }\n }\n }", "public void setIsOn(boolean isOn) {\n synchronized (this) {\n mIsOn = isOn;\n\n GradientDrawable temperatureBall\n = (GradientDrawable) mTemperatureBar.getBackground();\n if (mIsOn) {\n mFloatingText.setVisibility(VISIBLE);\n mOffText.setVisibility(GONE);\n temperatureBall.setColor(getTemperatureColor(mTemperature));\n setAlpha(1.0f);\n } else {\n mOffText.setVisibility(VISIBLE);\n mFloatingText.setVisibility(GONE);\n temperatureBall.setColor(mOffColor);\n setAlpha(.2f);\n }\n }\n }", "public void setConditionalPolicies (Vector conditionalPolicies)\n {\n openTransaction();\n Iterator it = query(conditionalPolicyMsgPredicate).iterator();\n while (it.hasNext()) {\n publishRemove(it.next());\n }\n \n // add new ConditionalPolicyMsgs\n for (int i=0; i<conditionalPolicies.size(); i++) {\n ConditionalPolicyMsg condPol = (ConditionalPolicyMsg) conditionalPolicies.elementAt(i);\n UnexpandedConditionalPolicyMsg ucpm = new UnexpandedConditionalPolicyMsg(condPol);\n publishAdd(ucpm);\n }\n closeTransaction();\n }", "public void setConditions(FSArray v) {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n jcasType.ll_cas.ll_setRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions, jcasType.ll_cas.ll_getFSRef(v));}", "public void setOnColor(final ColorDef ON_COLOR) {\n onColor = ON_COLOR;\n init(getInnerBounds().width, getInnerBounds().height);\n repaint(getInnerBounds());\n }", "public int[] getConditions() { return conditional; }", "void setBind() {\n for (int i = 1; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND\n // no bind (?x = ?y) in case of JOIN\n && (!Query.testJoin || bind.isBindCst())) {\n int j = i - 1;\n while (j > 0 && get(j).isFilter()) {\n j--;\n }\n if (j >= 0) {\n Exp g = get(j);\n if ((g.isEdge() || g.isPath())\n && (bind.isBindCst() ? g.bind(bind.first().getNode()) : true)) {\n bind.status(true);\n g.setBind(bind);\n }\n }\n }\n }\n }\n }", "public void removeAllConditions()\r\n\t{\r\n\t\tconditions.clear();\r\n\t}", "@JsonProperty(\"conditions\")\n @ApiModelProperty(value = \"The condition that will trigger the dialog node.\")\n public String getConditions() {\n return conditions;\n }", "public List<ICondition> getConditions()\r\n\t{\r\n\t\treturn conditions;\r\n\t}", "public void setConditionId(Long conditionId) {\n _conditionId = conditionId;\n }", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "void jbtnExtract_actionPerformed(ActionEvent e) {\n java.util.HashMap conditions=new java.util.HashMap();\r\n\r\n for(int i=0;i<guis.size();i++){\r\n exgui.DataBindGUIObject dbGUIOBJ=(exgui.DataBindGUIObject)guis.get(i);\r\n if(dbGUIOBJ instanceof exgui.DataBindTextWithChecker ){\r\n if(!((exgui.DataBindTextWithChecker)dbGUIOBJ).isValidx()) return;\r\n if(dbGUIOBJ instanceof exgui.SwingSingleSelection){\r\n Object value=((exgui.SwingSingleSelection)dbGUIOBJ).getSelectedValue();\r\n if(value!=null)conditions.put(dbGUIOBJ.getOrgRecField(),value);\r\n }\r\n }else{\r\n exgui.SwingSingleSelection slk=(exgui.SwingSingleSelection)dbGUIOBJ;\r\n if(slk.getSelectedValue()!=null){\r\n conditions.put(dbGUIOBJ.getOrgRecField(),slk.getSelectedValue());\r\n }\r\n }\r\n }\r\n if(cbxAuditStatus.getSelectedIndex()>0){\r\n conditions.put(prdHead.QRY_CONDITION_ADT_STATUS,\r\n String.valueOf(cbxAuditStatus.getSelectedIndex()));\r\n }\r\n if(null!=slkVender.getSelectedValue()){\r\n conditions.put(\"CT_VENDER\",slkVender.getSelectedValue().toString());\r\n }\r\n //handing all the conditions to Commnad set object,wait for querry result.\r\n if(rdoOnlySamle.isSelected()){\r\n conditions.put(\"a.PROD_IS_SAMPLE\",\"Y\");\r\n }\r\n if(txtBatchNo.getText().trim().length()>0){\r\n conditions.put(\"TPE_NB_BATCH_NO\",txtBatchNo.getText().trim());\r\n }\r\n//\r\n if(txtCust_Po.getText().trim().length()>0){\r\n conditions.put(\"CUST_PO\",txtCust_Po.getText().trim());\r\n }\r\n//\r\n\r\n newtimes.preproduction.process.PP_Maintain_CmdSet.qryConditions=conditions;\r\n util.ApplicationProperites.removeProperites(processhandler.template.Constants.XNT_LIST_QRY_RESLUT_BGN_AT);\r\n goCommand();\r\n }", "private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_ske48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_nmb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_hkt48)).setOnCheckedChangeListener(this);\n }", "public void setOnDateSetListener(DatePickerDialog.OnDateSetListener onDateSetListener){\n this.dateSetListener = onDateSetListener;\n }", "public void markCriticalOnsetReplace() throws JNCException {\n markLeafReplace(\"criticalOnset\");\n }", "@Override\n\tpublic void setCondition(VehicleCondition condition) {\n\t\tthis.condition = condition;\n\t}", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}", "public void setLogic(Boolean Logic) {\n this.Logic = Logic;\n }", "void set(boolean on);", "public boolean isOnCondition () \n\t{\n\t\tObject oo = get_Value(COLUMNNAME_IsOnCondition);\n\t\tif (oo != null) \n\t\t{\n\t\t\t if (oo instanceof Boolean) \n\t\t\t\t return ((Boolean)oo).booleanValue(); \n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public void setQueryCondition(QueryCondition queryCondition)\n {\n\tthis.queryCondition = queryCondition;\n }", "public void setConditions(int i, DebugEvaluatedCondition v) { \n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions), i);\n jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions), i, jcasType.ll_cas.ll_getFSRef(v));}", "public void setCondition(WeatherCondition condition) {\n this.condition = condition;\n }", "Conditions getConditions();", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }", "@Override\n\tpublic void onQaSettingUpdate(boolean arg0, boolean arg1, boolean arg2) {\n\t\t\n\t}", "public void setMobHasChanged() {\r\n\t\t// method that informs the view(the observer) of the changes\r\n\t\tthis.setChanged();\r\n\t\tthis.notifyObservers();\r\n\t\r\n\t}", "public LinkedHashMap<String, LinkedHashSet<String>> getConditionsFromTable() {\n\t\tLinkedHashMap<String, LinkedHashSet<String>> toReturn = new LinkedHashMap<String, LinkedHashSet<String>>();\n\t\tfor (int i = 0; i < modelCondTable.getRowCount(); i++) {\n\t\t\tString key = (String) modelCondTable.getValueAt(i, 0);\n\t\t\tString value = (String) modelCondTable.getValueAt(i, 1);\n\t\t\tLinkedHashSet<String> setValue = new LinkedHashSet<String>(Arrays.asList(value.split(\";\")));\n\n\t\t\ttoReturn.put(key, setValue);\n\t\t}\n\t\treturn toReturn;\n\t}", "void setCondition(ICDICondition condition) throws CDIException;", "public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\n if (mStatusSwitch.isChecked()) {\n mGovSystem.setStatus(Constants.GovSystemsStatus.Funcțional);\n } else {\n mGovSystem.setStatus(Constants.GovSystemsStatus.Nefuncțional);\n }\n }", "private void separateConditions(List<String> conditions) {\n\t\tString[] tokens;\n\t\tfor (String condition : conditions) {\n\t\t\ttokens = condition.split(\"=\");\n\t\t\tif (tokens[1].matches(\"[0-9]+\") || (tokens[1].matches(\"[A-Z].\") && tokens[0].charAt(0) == tokens[1].charAt(0))) {\n\t\t\t\tselectConditions.add(condition);\n\t\t\t} else {\n\t\t\t\tjoinConditions.add(condition);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public List<OperationEqField> getConditions()\n {\n if (conditions == null)\n {\n conditions = new ArrayList<>();\n }\n return conditions;\n }", "protected void setTableCondtion(int pcond)\n\t\t{\n\t\t\tCondtion = pcond ;\n\t\t}", "public void turnOn() {\n\t\tOn = true;\n\t}", "public void markCriticalOnsetMerge() throws JNCException {\n markLeafMerge(\"criticalOnset\");\n }", "private void adjustPathConditions() {\n List<ProgramCondition> pcList;\n for (ProgramPath pp : progPath){\n pcList = pp.getConditions();\n final List<ProgramCondition> pcList2 = pcList;\n List<ProgramCondition> collect = pcList2.stream().filter(p -> (pcList2.stream().anyMatch(q -> q.condition.equals(p.condition) \n && q.pred == ProgramConditionTruthValue.False && p.pred == ProgramConditionTruthValue.True))).collect(Collectors.toList());\n \n collect.forEach(p -> p.z3Allowable = false);\n }\n }", "public static void setCondition(Expression exp) {\n\t\tif (!running) return;\n\t\tstate.currentConditionNode = new RootNode(exp, state.currentConditionNode);\n\t}", "@Override\n public PaymentP2007_03 where(Collection<? extends Condition> conditions) {\n return where(DSL.and(conditions));\n }", "public void setIsOnMap(final int isOnMap) {\n this.isOnMap = isOnMap;\n }", "public int getConditionCount() {\n return this.conditions.size();\n }", "protected void handlePercentageCheckedChange(boolean isChecked)\n {\n if (isChecked && targetPriceToggle.isChecked())\n {\n targetPriceToggle.setChecked(false);\n }\n\n percentageSeekBar.setEnabled(isChecked);\n\n updatePercentageChangeValues(isChecked);\n }", "@Override\n\tpublic void setStates(){\n\t\tfor(Entry<String, GUIComponentSelector> lightEntry : lightSelectors.entrySet()){\n\t\t\tlightEntry.getValue().selectorState = vehicle.variablesOn.contains(lightEntry.getKey()) ? 1 : 0;\n\t\t}\n\t\t\n\t\t//Set the states of the magneto selectors.\n\t\tif(vehicle.definition.motorized.hasSingleEngineControl){\n\t\t\tmagnetoSelectors.get((byte)-1).visible = !vehicle.engines.isEmpty();\n\t\t\tfor(PartEngine engine : vehicle.engines.values()){\n\t\t\t\tmagnetoSelectors.get((byte)-1).selectorState = engine.state.magnetoOn ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}else{\n\t\t\tfor(Entry<Byte, GUIComponentSelector> magnetoEntry : magnetoSelectors.entrySet()){\n\t\t\t\tif(vehicle.engines.containsKey(magnetoEntry.getKey())){\n\t\t\t\t\tmagnetoEntry.getValue().selectorState = vehicle.engines.get(magnetoEntry.getKey()).state.magnetoOn ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Set the states of the starter selectors.\n\t\tif(vehicle.definition.motorized.hasSingleEngineControl){\n\t\t\tfor(PartEngine engine : vehicle.engines.values()){\n\t\t\t\tstarterSelectors.get(ENGINE_SINGLE_SELECTOR_INDEX).selectorState = engine.state.magnetoOn ? (engine.state.esOn ? 2 : 1) : 0;\n\t\t\t\tstarterSelectors.get(ENGINE_SINGLE_SELECTOR_INDEX).visible = !engine.definition.engine.disableAutomaticStarter;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}else{\n\t\t\tfor(Entry<Byte, GUIComponentSelector> starterEntry : starterSelectors.entrySet()){\n\t\t\t\tif(vehicle.engines.containsKey(starterEntry.getKey())){\n\t\t\t\t\tPartEngine engine = vehicle.engines.get(starterEntry.getKey());\n\t\t\t\t\tstarterEntry.getValue().selectorState = engine.state.magnetoOn ? (engine.state.esOn ? 2 : 1) : 0;\n\t\t\t\t\tstarterEntry.getValue().visible = !engine.definition.engine.disableAutomaticStarter;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//For every tick we have one of the trim selectors pressed, do the corresponding trim action.\n\t\tif(selectedTrimSelector != null){\n\t\t\tif(inClockPeriod(3, 1)){\n\t\t\t\tif(!appliedTrimThisRender){\n\t\t\t\t\tselectedTrimSelector.selectorState = selectedTrimSelector.selectorState == 0 ? 1 : 0; \n\t\t\t\t\tInterfacePacket.sendToServer(new PacketVehicleControlDigital(vehicle, selectedTrimType, selectedTrimDirection));\n\t\t\t\t\tappliedTrimThisRender = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tappliedTrimThisRender = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If we have reverse thrust, set the selector state.\n\t\tif(reverseSelector != null){\n\t\t\tif(vehicle.definition.motorized.isBlimp){\n\t\t\t\treverseSelector.selectorState = 0;\n\t\t\t\tfor(PartEngine engine : vehicle.engines.values()){\n\t\t\t\t\tif(engine.currentGear < 0){\n\t\t\t\t\t\treverseSelector.selectorState = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treverseSelector.selectorState = vehicle.reverseThrust ? 1 : 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If we have autopilot, set the selector state.\n\t\tif(autopilotSelector != null){\n\t\t\tautopilotSelector.selectorState = vehicle.autopilot ? 1 : 0;\n\t\t}\n\t\t\n\t\t//If we have gear, set the selector state.\n\t\tif(gearSelector != null){\n\t\t\tif(vehicle.variablesOn.contains(EntityVehicleF_Physics.GEAR_VARIABLE)){\n\t\t\t\tgearSelector.selectorState = vehicle.gearMovementTime == vehicle.definition.motorized.gearSequenceDuration ? 2 : 3;\n\t\t\t}else{\n\t\t\t\tgearSelector.selectorState = vehicle.gearMovementTime == 0 ? 0 : 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If we have a hitch, set the selector state.\n\t\tif(trailerSelector != null){\n\t\t\tSwitchEntry switchDef = trailerSwitchDefs.get(0);\n\t\t\tif(switchDef.connectionGroup.hookup){\n\t\t\t\ttrailerSelector.selectorState = switchDef.entityOn.towedByConnection != null ? 0 : 1;\n\t\t\t}else{\n\t\t\t\ttrailerSelector.selectorState = 1;\n\t\t\t\tfor(TrailerConnection connection : switchDef.entityOn.getTowingConnections()){\n\t\t\t\t\tif(connection.hitchGroupIndex == switchDef.connectionGroupIndex){\n\t\t\t\t\t\ttrailerSelector.selectorState = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Set the beaconBox text color depending on if we have an active beacon.\n\t\tif(beaconBox != null){\n\t\t\tbeaconBox.fontColor = vehicle.selectedBeacon != null ? ColorRGB.GREEN : ColorRGB.RED;\n\t\t}\n\t\t\n\t\t//Iterate through custom selectors and set their states.\n\t\tfor(GUIComponentSelector customSelector : customSelectors){\n\t\t\tcustomSelector.selectorState = vehicle.variablesOn.contains(customSelector.text) ? 1 : 0;\n\t\t}\n\t}", "public void setOnTime(Integer onTime) {\n this.onTime = onTime;\n }", "public FileQueryOptions setRequestConditions(DataLakeRequestConditions requestConditions) {\n this.requestConditions = requestConditions;\n return this;\n }", "private void ensureConditionContinuity( )\n {\n /* If the operators are not valid, then do not move the conditions */\n if ( checkOperators() )\n {\n /*\n * When Left Hand Side, Operator and Right Hand Side for a Condition\n * are empty then infer the default value, i.e., set Operator to\n * CVL_WF_OPRSImpl.EQUAL. Left Hand Side and Right Hand Side will continue\n * to remain empty.\n */\n defaultForEmptyConditions();\n\n int liCount = 0;\n int liNumber = 0 ;\n int liCurrentRow = 0;\n Data loNewData = null ;\n Data loOldData = null ;\n\n /* Cycle through the conditions. Make sure the conditions in front */\n /* of current condition are not blank, if so, move current condition up */\n\n for (liCount = 2; liCount < 6; liCount++ )\n {\n liNumber = liCount ;\n while (liNumber > 1)\n {\n liCurrentRow = liCount - ( liNumber - 1 );\n if (getAND_COND_LHS(liCurrentRow) == null)\n {\n /*\n * copy old condition to new condition, or condition 2 to 1 ...\n * first get data from new left hand side, and get data from\n * old left hand side, and copy new to old. Repeat for right\n * hand side , operator and Condition Type.\n */\n\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_LHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_FLD_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loOldData = getData(\"AND_COND_OPR_\" + liCurrentRow ) ;\n loOldData.setbyte(loNewData.getbyte() );\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loOldData = getData(\"AND_COND_TYP_\" + liCurrentRow ) ;\n loOldData.setint(loNewData.getint() );\n /*\n * reset the old condition back to null ,operator to default 3\n * and Condition type to 1 (i.e. Actual Value)\n */\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loNewData.setbyte((byte)3);\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loNewData.setint(CVL_WF_COND_TYPImpl.ACTUAL_VAL);\n\n } /* end if (getAND_COND_LHS(liCurrentRow) == null) */\n\n liNumber-- ;\n\n } /* end while (liNumber > 1) */\n } /* end for (liCount = 2; liCount < 6; liCount++ ) */\n } /* end if ( checkOperators() ) */\n }", "public void switchOnWhenAppliedPower(boolean onWhenPower) throws RemoteHomeConnectionException {\n if (onWhenPower) {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"co\");\n } else {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"cf\");\n }\n setOnWhenAppliedPower(onWhenPower);\n }", "public void updateOn(boolean on) {\r\n\t\toutString = \"O\" + on + \"\\n\";\r\n\t\tmyPort.write(outString);\r\n\t\tSystem.out.println(outString);\r\n\t}", "public synchronized void set() {\n this.currentState = EventState.UP;\n notify();\n }", "public void setEngineOn();", "public static void notifyPhonePrefixON(boolean isON) {\n for (BaseFragActivity act : mActs.values()) {\n if (act != null) {\n act.onPhonePrefixON(isON);\n }\n }\n }", "public void setSynchronized(boolean on) {\n if (on)\n setAccessFlags(getAccessFlags() | Constants.ACCESS_SYNCHRONIZED);\n else\n setAccessFlags(getAccessFlags() & ~Constants.ACCESS_SYNCHRONIZED);\n }", "public void setObservers() {\n feedBackVM.isLoading.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n if (feedBackVM.isLoading.get()) {\n showWaitingDialog(true);\n } else {\n showWaitingDialog(false);\n }\n }\n });\n\n feedBackVM.toastMsg.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n toast(feedBackVM.toastMsg.get());\n feedBackVM.toastMsg.set(null);\n }\n });\n }", "private void setObservers() {\n evaluateDetailVM.isLoading.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n if (evaluateDetailVM.isLoading.get()) {\n showWaitingDialog(true);\n } else {\n showWaitingDialog(false);\n }\n }\n });\n\n evaluateDetailVM.toastMsg.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n toast(evaluateDetailVM.toastMsg.get());\n evaluateDetailVM.toastMsg.set(null);\n }\n });\n }", "public void endCondition(String condition, long time) {\n if (onsetConditions.containsKey(condition)) {\n onsetConditions.get(condition).endLastEntry(time);\n }\n }", "public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}", "public void onApply() {\n\t\tlogger.info( \"FilterManager::onapply\" );\n\t\tif ( !getEnabled() || !isOpened() ) return;\n\n\t\tif ( mCurrentEffect == null ) throw new IllegalStateException( \"there is no current effect active in the context\" );\n\n\t\tif ( !mCurrentEffect.isEnabled() ) return;\n\n\t\tif ( mCurrentEffect.getIsChanged() ) {\n\t\t\tmCurrentEffect.onSave();\n\t\t\tmChanged = true;\n\t\t} else {\n\t\t\tonCancel();\n\t\t}\n\t}", "public Builder clearConditionList() {\n if (conditionListBuilder_ == null) {\n conditionList_ = null;\n onChanged();\n } else {\n conditionList_ = null;\n conditionListBuilder_ = null;\n }\n\n return this;\n }", "void setCond(String name, long date, int lvl) {\n\tWeatherUnit weath1 = getWeather(date);\n\tint old = ((Integer)weath1.levels.get(name)).intValue();\n\tint nyu = old + lvl;\n\tif (nyu < 0) nyu = 0;\n\tif (old != nyu) {\n\t weath1.levels.put(name,new Integer(nyu));\n\t // Cascade down\n\t setCond(name, date);\n\t main.myFrw.announce(this);\n\t main.redo(false);\n\t}\n }" ]
[ "0.7198111", "0.6274961", "0.60152763", "0.5993983", "0.5945524", "0.58169144", "0.55516", "0.54528683", "0.5311958", "0.5284368", "0.5201112", "0.5079375", "0.5067637", "0.5027416", "0.50054204", "0.50012344", "0.4935104", "0.48677284", "0.48592448", "0.48582786", "0.48581746", "0.4855916", "0.4815878", "0.47922906", "0.4749287", "0.47473192", "0.4745616", "0.4738328", "0.4729803", "0.47065744", "0.4698767", "0.4684919", "0.4643082", "0.46398976", "0.46343645", "0.46248865", "0.46246323", "0.4616439", "0.46030644", "0.46018007", "0.45978284", "0.45840758", "0.45766163", "0.45751646", "0.45585802", "0.45525286", "0.45491114", "0.45460933", "0.45391142", "0.4532466", "0.45154062", "0.45095128", "0.44859594", "0.44824427", "0.44824073", "0.44759157", "0.44746703", "0.44639814", "0.44619507", "0.44565633", "0.44482318", "0.4447281", "0.4439844", "0.44375142", "0.44198138", "0.4417399", "0.44098556", "0.44092196", "0.4407787", "0.44051325", "0.44044146", "0.4404057", "0.44027722", "0.44016618", "0.4395358", "0.4391668", "0.43892223", "0.4384104", "0.43831035", "0.43789637", "0.43739396", "0.4372613", "0.4356596", "0.434898", "0.43349865", "0.43225974", "0.43175945", "0.4315664", "0.43077284", "0.42984974", "0.42948425", "0.42913797", "0.42910564", "0.42892691", "0.42874736", "0.42821527", "0.42755553", "0.42641726", "0.42595452", "0.4253609" ]
0.5997862
3
Method that is used to retrieve the last time a condition has been onset from a given module.
public Long getConditionLastOnsetTimeFromModule(String module, String condition) { Long result = null; if (sources.containsKey(module)) { ModuleConditions moduleConditions = sources.get(module); result = moduleConditions.getConditionLastOnsetTime(condition); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getConditionLastEndTimeFromModule(String module, String condition) {\n Long result = null;\n if (sources.containsKey(module)) {\n ModuleConditions moduleConditions = sources.get(module);\n result = moduleConditions.getConditionLastEndTime(condition);\n }\n return result;\n }", "public Long getConditionLastOnsetTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastOnsetTime();\n }\n return null;\n }", "public Long getConditionLastEndTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastEndTime();\n }\n return null;\n }", "public void onConditionOnset(String module, String state, String condition, long time) {\n if (!sources.containsKey(module)) {\n sources.put(module, new ModuleConditions(module));\n }\n ModuleConditions moduleConditions = sources.get(module);\n moduleConditions.onsetCondition(condition, state, time);\n }", "public long getTimeOfLastValuesChanged();", "public Production getLastProductionFired () { return lastFiredInst.getProduction(); }", "public Long getLastOnsetTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getOnsetTime();\n }\n }", "public void onConditionEnd(String module, String condition, long time) {\n boolean isModulePresent = sources.containsKey(module);\n if (isModulePresent) {\n sources.get(module).endCondition(condition, time);\n }\n }", "public E pollLast();", "java.lang.String getCondition();", "public void endCondition(String condition, long time) {\n if (onsetConditions.containsKey(condition)) {\n onsetConditions.get(condition).endLastEntry(time);\n }\n }", "public java.util.List<IdDt> getCondition() { \n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\treturn myCondition;\n\t}", "public IdDt getConditionFirstRep() {\n\t\tif (getCondition().isEmpty()) {\n\t\t\treturn addCondition();\n\t\t}\n\t\treturn getCondition().get(0); \n\t}", "public Condition getCondition() {\n return condition;\n }", "public static Timestamp getModEnd(Connection con, long id)\n throws qdbException {\n try {\n String SQL;\n Timestamp curTime = null;\n\n SQL = \"Select mod_eff_end_datetime \"\n + \"From Module \"\n + \"Where mod_res_id = ?\";\n\n PreparedStatement stmt = con.prepareStatement(SQL);\n stmt.setLong(1, id);\n ResultSet rs = stmt.executeQuery();\n if(rs.next() == true)\n curTime = rs.getTimestamp(1);\n else\n {\n \tstmt.close();\n throw new qdbException(\"Cannot find the Module: \" + id);\n }\n\n stmt.close();\n return curTime;\n }\n catch (SQLException e) {\n throw new qdbException(e.getMessage());\n }\n }", "synchronized Module getCurrentModule()\n {\n return m_modules.get(m_modules.size() - 1);\n }", "public String getPrevLastmod() {\n return prevLastmod;\n }", "Event getCondition();", "public long getLastPlayed ( ) {\n\t\treturn extract ( handle -> handle.getLastPlayed ( ) );\n\t}", "public static long getLastResetTime() {\n return p().lastReset;\n }", "public String getCondition() {\n\treturn condition;\n}", "String getCondition();", "public Expression getCondition()\n {\n return this.condition;\n }", "long getLastChanged();", "public Object getCondition();", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}", "public static LocalDateTime getLastAction() {\n return lastAction;\n }", "public GlobalStateDataControl getLastGlobalState( ) {\r\n\r\n return globalStatesDataControlList.get( globalStatesDataControlList.size( ) - 1 );\r\n }", "public Date getModificationTime() {\n\n\t\treturn lastModificationAtTime;\n\t}", "public String getCondition() {\n\t\treturn condition;\n\t}", "public Long getConditionId() {\n return _conditionId;\n }", "public DateTime getLastSynced() {\n\t\treturn mLastSynced;\n\t}", "public boolean isSetLastReceptionTime() {\n return __isset_bit_vector.get(__LASTRECEPTIONTIME_ISSET_ID);\n }", "public OnsetCondition clone() {\n OnsetCondition data = new OnsetCondition(this.name);\n data.timeInfos.addAll(this.timeInfos);\n return data;\n }", "public static CalculationResultMap lastObsOnOrBefore(Concept concept, Date onOrBefore, Collection<Integer> cohort, PatientCalculationContext context) {\n // Only interested in obs before now\n onOrBefore = MentalHealthConfigCoreUtils.earliest(onOrBefore, context.getNow());\n\n ObsForPersonDataDefinition def = new ObsForPersonDataDefinition(\"last obs on or before\", TimeQualifier.LAST, concept, onOrBefore, null);\n return MentalHealthConfigCalculationUtils.evaluateWithReporting(def, cohort, null, null, context);\n }", "public String getCondition() {\n return condition;\n }", "public Timestamp getLastModifiedOn() {\r\n\t\treturn lastModifiedOn;\r\n\t}", "public Application getLastModifyingApplication()\r\n\t{\r\n\t\treturn lastModifyingApplication;\r\n\t}", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public Change getLastChange(boolean reset) {\r\n Change c = hasChanges() ? changes.get(0) : null;\r\n if (c != null && reset) {\r\n c.reset();\r\n }\r\n return c;\r\n }", "public synchronized long getWhen() {\n return when;\n }", "public Criteria andUpdateTimeGreaterThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "public Date getModificationDate() {\n return m_module.getConfiguration().getModificationDate();\n }", "public Timestamp getLastCompetition() {\r\n return lastCompetition;\r\n }", "public Date getLastRequest() {\n\t\treturn _last_request;\n\t}", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public org.drip.analytics.cashflow.CompositePeriod lastPeriod()\n\t{\n\t\tjava.util.List<org.drip.analytics.cashflow.CompositePeriod> lsCouponPeriod = periods();\n\n\t\treturn lsCouponPeriod.get (lsCouponPeriod.size() - 1);\n\t}", "public Long getConditionid() {\r\n return conditionid;\r\n }", "public boolean lastCheckResult() {\n return fLastCheckResult;\n }", "public long getWhen() {\n return when;\n }", "public Criteria andUpdateTimeGreaterThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "long getSince();", "public String getConditionFromState(String module, String state) {\n String result = null;\n boolean isModulePresent = sources.containsKey(module);\n if (isModulePresent) {\n result = sources.get(module).getConditionFromState(state);\n }\n return result;\n }", "public ModuleDecision getModule() {\n return module;\n }", "public boolean isSetLastmodifyTimestampMs() {\n return EncodingUtils.testBit(__isset_bitfield, __LASTMODIFYTIMESTAMPMS_ISSET_ID);\n }", "public boolean isSetLastmodifyTimestampMs() {\n return EncodingUtils.testBit(__isset_bitfield, __LASTMODIFYTIMESTAMPMS_ISSET_ID);\n }", "long getChangeset();", "public long getLastCheckTimeMillis() {\n return this.lastCheckTimeMillis;\n }", "public SeleniumQueryObject last() {\n\t\treturn LastFunction.last(this, this.elements);\n\t}", "public Criteria andModifyTimeGreaterThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public String getLastEvaluationState() {\n return this.lastEvaluationState;\n }", "public long getLastModify() {\r\n\t\treturn lastModify;\r\n\t}", "public Criteria andModifyTimeGreaterThanColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public long getSince() {\n return since_;\n }", "public Criteria andUpdateTimeGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "com.google.protobuf.ByteString getConditionBytes();", "public Integer getLastUpdate() {\n return lastUpdate;\n }", "@NonNull\n public Collection<Path> getLastPoll() {\n return lastPoll;\n }", "public Map<Long, List<ConditionWithSymptoms>> getConditionSymptoms() {\n Map<String, ExpressedSymptom> symptoms = person.getExpressedSymptoms();\n Map<Long, List<ConditionWithSymptoms>> result;\n result = new ConcurrentHashMap<Long, List<ConditionWithSymptoms>>();\n for (String module : sources.keySet()) {\n ModuleConditions moduleConditions = sources.get(module);\n for (String condition : moduleConditions.getOnsetConditions().keySet()) {\n List<ConditionPeriod> infos = moduleConditions.getOnsetConditions().get(\n condition).getTimeInfos();\n for (ConditionPeriod entry : infos) {\n Long begin = entry.getOnsetTime();\n Long end = entry.getEndTime();\n if (!result.containsKey(begin)) {\n result.put(begin, new LinkedList<ConditionWithSymptoms>());\n }\n ConditionWithSymptoms conditionWithSymptoms = new ConditionWithSymptoms(\n condition, begin, end\n );\n for (String type : symptoms.keySet()) {\n ExpressedSymptom expressedSymptom = symptoms.get(type);\n if (expressedSymptom.getSources().containsKey(module)) {\n SymptomSource symptomSource = expressedSymptom.getSources().get(module);\n conditionWithSymptoms.addSymptoms(type, symptomSource);\n }\n }\n result.get(begin).add(conditionWithSymptoms);\n }\n }\n }\n return result;\n }", "public long getSince() {\n return since_;\n }", "public boolean isSetLastmodifyTimestamp() {\n return EncodingUtils.testBit(__isset_bitfield, __LASTMODIFYTIMESTAMP_ISSET_ID);\n }", "@Override\n\tpublic long getModifiedTime() {\n\t\treturn _dlSyncEvent.getModifiedTime();\n\t}", "private long getLastCacheUpdateTimeMillis() {\n return this.fileManager.getFromPreferences(this.context, SETTINGS_KEY);\n }", "public java.util.Date getLastExecuteTime()\n {\n return null;\n }", "public Date getLastTime() {\n return lastTime;\n }", "public String getLastUpdateBy() {\r\n\t\treturn lastUpdateBy;\r\n\t}", "public OverallCondition getCondition() {\n return condition;\n }", "public Date getLastlogintime() {\n return lastlogintime;\n }", "public java.lang.String getLastChangedTime() {\n\t\treturn lastChangedTime;\n\t}", "public BrickStatusCommand getBrickStatusFromLast(int timeStamp) {\n\t\tBrickStatusCommand brickState = null;\n\t\tint counter = 1;\n\t\tint stateSize = Board.brickStateList.size();\n\t\twhile (counter <= stateSize) {\n\t\t\tbrickState = Board.brickStateList.get(stateSize - counter);\n\t\t\tcounter++;\n\t\t\tif (brickState.getTimestamp() <= timeStamp) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn brickState;\n\t}", "public String getQuery() {\n return daemonExecutionCondition;\n }", "public String getLastChange() {\n return lastChange;\n }", "public Operation getLastOp() {\n\t\treturn ops.get(ops.size() - 1);\n\t}", "@Override\r\n\tpublic E pollLast() {\n\t\treturn null;\r\n\t}", "public Criteria andUpdateTimeGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public Criteria andUpdateTimeGreaterThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public String getLastOperation()\n {\n if (!getCvpOperation().isNull())\n {\n com.sybase.afx.json.JsonObject cvpOperation = (com.sybase.afx.json.JsonObject)(com.sybase.afx.json.JsonReader.parse(__cvpOperation.getValue()));\n return (String)cvpOperation.get(\"cvp_name\");\n }\n if (getPendingChange() == 'C')\n {\n }\n else if (getPendingChange() == 'D')\n {\n }\n else if (getPendingChange() == 'U')\n {\n }\n return null;\n }", "public int getLast() {\n\treturn _last;\n }", "public Set<Condition> getTrackedConditions() {\n return trackedConditions;\n }", "public long getModificationTime()\n {\n return modDate * 1000L;\n }", "public LocalVariable latestLocalVariable()\n {\n return lastLocal;\n }", "public Time lastModifiedTime()\n\t{\n\t\tResource resource = getResource();\n\t\tif (resource instanceof IModifiable)\n\t\t{\n\t\t\treturn ((IModifiable)resource).lastModifiedTime();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public InstantFilter getLastModifiedDate() {\n\t\treturn lastModifiedDate;\n\t}", "public java.lang.Boolean getIncludeLastTransaction() {\r\n return includeLastTransaction;\r\n }", "public Reference condition() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_CONDITION);\n }", "public ASTNode getCondition() {\n \treturn (ASTNode)getChildNode(ChooseRulePlugin.GUARD_NAME);\n }", "public java.util.Date getLastModificationTime() {\n return this.lastModificationTime;\n }" ]
[ "0.7156152", "0.6958778", "0.646448", "0.5480966", "0.54230684", "0.534673", "0.53384167", "0.5321418", "0.51861846", "0.5122725", "0.51045483", "0.50941265", "0.50936604", "0.5073246", "0.5066678", "0.5046443", "0.50458187", "0.5044652", "0.50373435", "0.50329393", "0.50328326", "0.50093204", "0.49836853", "0.49671853", "0.49608067", "0.4949942", "0.49428105", "0.49257383", "0.4925269", "0.48890486", "0.488827", "0.48837075", "0.48740888", "0.48701614", "0.48611426", "0.4852755", "0.4851498", "0.4846176", "0.48415515", "0.48404998", "0.48141536", "0.48057774", "0.48031387", "0.47946703", "0.4790837", "0.47853258", "0.47778252", "0.47710305", "0.47668543", "0.47427496", "0.47411743", "0.4725257", "0.47190496", "0.4717806", "0.47138056", "0.4710447", "0.470788", "0.47075504", "0.47075504", "0.47070122", "0.47033116", "0.46989754", "0.46966156", "0.46950626", "0.46939558", "0.4690098", "0.46893752", "0.4681116", "0.46788505", "0.46779397", "0.46681616", "0.46629432", "0.46568936", "0.46527725", "0.46472308", "0.46431422", "0.464054", "0.4636347", "0.4630758", "0.46266305", "0.46246484", "0.46173173", "0.46172822", "0.46114996", "0.460847", "0.45977512", "0.4591828", "0.4588078", "0.4584139", "0.4580792", "0.45792603", "0.45752835", "0.4570058", "0.45678148", "0.45610434", "0.45552135", "0.45535275", "0.45500356", "0.45442346", "0.4544215" ]
0.78230125
0
Method that is used to retrieve the last time a ConditionEnd state has been processed for a given condition from a given module.
public Long getConditionLastEndTimeFromModule(String module, String condition) { Long result = null; if (sources.containsKey(module)) { ModuleConditions moduleConditions = sources.get(module); result = moduleConditions.getConditionLastEndTime(condition); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getConditionLastOnsetTimeFromModule(String module, String condition) {\n Long result = null;\n if (sources.containsKey(module)) {\n ModuleConditions moduleConditions = sources.get(module);\n result = moduleConditions.getConditionLastOnsetTime(condition);\n }\n return result;\n }", "public Long getConditionLastEndTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastEndTime();\n }\n return null;\n }", "public void onConditionEnd(String module, String condition, long time) {\n boolean isModulePresent = sources.containsKey(module);\n if (isModulePresent) {\n sources.get(module).endCondition(condition, time);\n }\n }", "public State getLastState() {\n\t\treturn endState;\r\n\t}", "public E finishedState() {\r\n\t\treturn this.values[this.values.length - 1];\r\n\t}", "public String getLastEvaluationState() {\n return this.lastEvaluationState;\n }", "public Long getConditionLastOnsetTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastOnsetTime();\n }\n return null;\n }", "public java.lang.String getFinishCondition() {\n return finishCondition;\n }", "public static Timestamp getModEnd(Connection con, long id)\n throws qdbException {\n try {\n String SQL;\n Timestamp curTime = null;\n\n SQL = \"Select mod_eff_end_datetime \"\n + \"From Module \"\n + \"Where mod_res_id = ?\";\n\n PreparedStatement stmt = con.prepareStatement(SQL);\n stmt.setLong(1, id);\n ResultSet rs = stmt.executeQuery();\n if(rs.next() == true)\n curTime = rs.getTimestamp(1);\n else\n {\n \tstmt.close();\n throw new qdbException(\"Cannot find the Module: \" + id);\n }\n\n stmt.close();\n return curTime;\n }\n catch (SQLException e) {\n throw new qdbException(e.getMessage());\n }\n }", "public STATE getState() {\n return this.lastState;\n }", "public Production getLastProductionFired () { return lastFiredInst.getProduction(); }", "public long getTimeEnd()\n {\n return this.timeEnd;\n }", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "public java.lang.String getLast_processstatus() {\n return last_processstatus;\n }", "private AbstractBuild<?, ?> getLastFinishedBuild() {\n AbstractBuild<?, ?> lastBuild = m_project.getLastBuild();\n while (lastBuild != null && (lastBuild.isBuilding() || lastBuild.getAction(AbstractBuildReport.class) == null)) {\n lastBuild = lastBuild.getPreviousBuild();\n }\n return lastBuild;\n }", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "public void endCondition(String condition, long time) {\n if (onsetConditions.containsKey(condition)) {\n onsetConditions.get(condition).endLastEntry(time);\n }\n }", "public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }", "public long getEnd_time() {\n return end_time;\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public TimeDateComponents getEventEndDate() {\n return getEventDates().getEndDate();\n }", "synchronized Module getCurrentModule()\n {\n return m_modules.get(m_modules.size() - 1);\n }", "public Element getEndExpression() {\n\t\treturn endExpression;\n\t}", "public OffsetDateTime endTime() {\n return this.endTime;\n }", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "public StatusLine getLastStatus() {\r\n return lastStatusLine;\r\n }", "public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}", "public abstract long getEndTimestamp();", "public T getLast(){\n\treturn _end.getCargo();\n }", "Instant getEnd();", "public Date getEndTime() {\n return this.endTime;\n }", "public long getLastCallEndTimestamp() {\n if (!mCallRecords.isEmpty()) {\n return mCallRecords.get(0).getCallEndTimestamp();\n }\n return -1;\n }", "public String getPrevLastmod() {\n return prevLastmod;\n }", "public Date getEndTime() {\r\n return this.endTime;\r\n }", "net.opengis.gml.x32.TimePositionType getEndPosition();", "public Exception getLastException()\n\t{\n\t\treturn lastException;\n\t}", "public long logicallyCompletedAt() {\n return logicallyCompletedAt;\n }", "public int getLast() {\n\treturn _last;\n }", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}", "public java.math.BigInteger getBlockEndDateTime() {\r\n return blockEndDateTime;\r\n }", "@Override\n\tpublic SourceCodeLocation getScopeEnd() {\n\t\treturn endLocation;\n\t}", "public long getTimeOfLastValuesChanged();", "public Long getTimestampEnd();", "public GroupConditions endGroup(){\r\n\t\tSqlNode parent = getParent();\r\n\t\tif(parent instanceof GroupConditions){\r\n\t\t\treturn (GroupConditions)parent;\r\n\t\t}\r\n\t\tthrow new RuntimeException(\"GroupConditions.end(): GroupConditions' parent should be the same type!!\");\r\n\t}", "public OffsetDateTime processingEndTime() {\n return this.processingEndTime;\n }", "public Date get_end() {\n\t\treturn this.end;\n\t}", "public int getLast() {\n\t\treturn last;\n\t}", "public long getEndTimestamp();", "public String getStateMeridianEnd() {\n return stateMeridianEndButton.getText();\n }", "public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}", "public E getLast();", "public java.lang.String getTime_end() {\r\n return time_end;\r\n }", "public Integer getEndTime() {\n return endTime;\n }", "ButEnd getEnd();", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}", "public long getEndTime() {\n if (endTime < 0) {\n try {\n String datestr = PropertyArray.get(props, END);\n\n if (datestr == null) {\n // this may be more expensive because it can cause a\n // reload from disk\n try {\n datestr = getProperty(END);\n } catch (Fault f) {\n }\n }\n\n if (datestr != null) {\n Date date = parseDate(datestr);\n endTime = date.getTime();\n } else {\n // info not available\n }\n } catch (ParseException e) {\n }\n }\n\n return endTime;\n }", "public Temporal getEndRecurrence() { return endRecurrence; }", "public Date getEndTime() {\n\t\treturn endTime;\n\t}", "public long getEndTime() {\n return endTime;\n }", "public long getEndTime() {\n return endTime;\n }", "public long getEndTime() {\r\n return endTime;\r\n }", "@Override\n public String getEndInfo() {\n return null;\n //return dateFormatter.stringFromDate(checkOutTime!)\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }", "public long getEndTime() {\n\t\treturn endTime;\n\t}", "public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public GlobalStateDataControl getLastGlobalState( ) {\r\n\r\n return globalStatesDataControlList.get( globalStatesDataControlList.size( ) - 1 );\r\n }", "String getIfEnd();", "double getStaEnd();", "public String getConditionFromState(String module, String state) {\n String result = null;\n boolean isModulePresent = sources.containsKey(module);\n if (isModulePresent) {\n result = sources.get(module).getConditionFromState(state);\n }\n return result;\n }", "public String getLastChange() {\n return lastChange;\n }", "public int getLast() {\n if (size == 0)\n return NO_ELEMENT;\n else\n return endOfBlock[numberOfBlocks - 1] - 1;\n }", "public LocalTime getEnd() {\n\treturn end;\n }", "public org.drip.analytics.cashflow.CompositePeriod lastPeriod()\n\t{\n\t\tjava.util.List<org.drip.analytics.cashflow.CompositePeriod> lsCouponPeriod = periods();\n\n\t\treturn lsCouponPeriod.get (lsCouponPeriod.size() - 1);\n\t}", "public double getEndTime() {\n return endTime;\n }", "Event getCondition();", "public long getCallEndTimestamp() {\n return mCallEndTimestamp;\n }", "public Date getEndtime() {\n return endtime;\n }", "@Override\n public Date getEndTime() {\n return endTime;\n }", "public String getLastOperation()\n {\n if (!getCvpOperation().isNull())\n {\n com.sybase.afx.json.JsonObject cvpOperation = (com.sybase.afx.json.JsonObject)(com.sybase.afx.json.JsonReader.parse(__cvpOperation.getValue()));\n return (String)cvpOperation.get(\"cvp_name\");\n }\n if (getPendingChange() == 'C')\n {\n }\n else if (getPendingChange() == 'D')\n {\n }\n else if (getPendingChange() == 'U')\n {\n }\n return null;\n }", "@Override\r\n\tpublic Date getEventEndTime() {\n\t\treturn null;\r\n\t}", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public synchronized boolean getEnd(){\n\treturn end;\n }", "public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}", "public State getfinalState(){\n\t\t\treturn finalState;\n\t\t}", "public Date getDtEnd() {\r\n return dtEnd;\r\n }", "public Operation getLastOp() {\n\t\treturn ops.get(ops.size() - 1);\n\t}", "long getEndTime() {\n return endTime;\n }", "public String getEnd() {\n\t\t\t\t\n\t\t\t\t\tString vS = \"NONE\";\n\t\t\t\t\tSystem.out.println(vS + \" l \" + length);\n\t\t\t\t\tif (length != 0) vS = tail.getPrev().getValue();\n\t\t\t\t\tSystem.out.println(vS + \" l2 \" + length);\n\t\t\t\treturn vS;\n\t\t\t\t}", "public Date getLastExecutionTime() {\n\t\treturn lastExecutionTime;\n\t}", "public String getEndtime() {\n return endtime;\n }", "public boolean getEnd()\n\t{\n\t\treturn getBooleanIOValue(\"End\", true);\n\t}", "public Date getEndServiceDate() {\n return (Date) getAttributeInternal(ENDSERVICEDATE);\n }", "public int getLastInstructionAddress() { return mLastInstructionAddress; }" ]
[ "0.6878089", "0.64297944", "0.61405265", "0.6032368", "0.5828307", "0.5682228", "0.5607435", "0.55997473", "0.5568005", "0.53716165", "0.53291684", "0.5291803", "0.5239059", "0.51954263", "0.51836646", "0.51725966", "0.5158872", "0.51530105", "0.5129193", "0.51214164", "0.5120086", "0.50795424", "0.50701255", "0.50592375", "0.5055311", "0.5047722", "0.504423", "0.5036527", "0.5034538", "0.50298506", "0.50232506", "0.50199574", "0.5018082", "0.50173", "0.5015975", "0.50138074", "0.50087714", "0.5003724", "0.49892053", "0.49889135", "0.49856064", "0.49826062", "0.49781427", "0.4976363", "0.49739376", "0.49533337", "0.4952797", "0.49497992", "0.49473345", "0.4940734", "0.49351272", "0.49324322", "0.49234954", "0.49217853", "0.49117994", "0.49011505", "0.48939842", "0.4885198", "0.48849514", "0.48849514", "0.48794207", "0.4879257", "0.4879027", "0.4879027", "0.4879027", "0.48788232", "0.48735285", "0.48685864", "0.48682773", "0.4866734", "0.48653403", "0.48591524", "0.48503673", "0.4849968", "0.48470053", "0.48398122", "0.48374495", "0.48299658", "0.48288718", "0.4820372", "0.48101032", "0.48050547", "0.48048723", "0.47962672", "0.4793676", "0.47810176", "0.47778514", "0.4770419", "0.4768171", "0.4759192", "0.4757525", "0.4756213", "0.4755575", "0.47519013", "0.47488898", "0.47420448", "0.47418514", "0.47362", "0.47326407", "0.4731637" ]
0.7367141
0
Method for retrieving the condition name from a state name. Useful when dealing with ConditionEnd.conditionOnSet attribute.
public String getConditionFromState(String module, String state) { String result = null; boolean isModulePresent = sources.containsKey(module); if (isModulePresent) { result = sources.get(module).getConditionFromState(state); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getConditionFromState(String state) {\n if (state2conditionMapping.containsKey(state)) {\n return state2conditionMapping.get(state);\n }\n return null;\n }", "java.lang.String getCondition();", "ConditionNameReference createConditionNameReference();", "@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getConditionName() {\n return conditionName;\n }", "String getSelectedStateName();", "String getCondition();", "public String getStateName() {\n return name;\n }", "public java.lang.String getQueryLogicName() {\n java.lang.Object ref = queryLogicName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n queryLogicName_ = s;\n }\n return s;\n }\n }", "public com.google.protobuf.ByteString getQueryLogicNameBytes() {\n java.lang.Object ref = queryLogicName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n queryLogicName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString getQueryLogicNameBytes() {\n java.lang.Object ref = queryLogicName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n queryLogicName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getQueryLogicName() {\n java.lang.Object ref = queryLogicName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n queryLogicName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getCondition() {\n return condition;\n }", "@Override\n\tpublic java.lang.String getStateName() {\n\t\treturn _state.getStateName();\n\t}", "public static String getStateName(String abbreviation) {\n for (String name : stateAbbreviations.keySet()) {\n if (stateAbbreviations.get(name).equalsIgnoreCase(abbreviation)) {\n return name;\n }\n }\n return null;\n }", "public String getCondition() {\n\t\treturn condition;\n\t}", "java.lang.String getQueryLogicName();", "Condition getCondition(String conditionName, Lock lock);", "com.google.protobuf.ByteString getQueryLogicNameBytes();", "public String getCondition() {\n\treturn condition;\n}", "java.lang.String getState();", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public String getInitCond() {\n Object ref = initCond_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n initCond_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "SpecialNamesConditionNameReference createSpecialNamesConditionNameReference();", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}", "com.google.protobuf.ByteString getConditionBytes();", "public static State parseString(String name)\n\t\t{\n\t\t\tif (FULL.toString().equals(name))\n\t\t\t\treturn FULL;\n\t\t\telse if (PARTIAL.toString().equals(name))\n\t\t\t\treturn PARTIAL;\n\t\t\telse if (DELETED.toString().equals(name))\n\t\t\t\treturn DELETED;\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}", "public native boolean changeConditionerName(String oldName, String newName);", "public static String parseSelectedState(String s) {\n if (!fullMap.containsKey(s)) {\n return \"\";\n } else {\n return fullMap.get(s);\n }\n/* if (s.equals(\"Alabama\")) {\n return \"AL\";\n }\n if (s.equals(\"Alaska\")) {\n return \"AK\";\n }\n if (s.equals(\"Arizona\")) {\n return \"AZ\";\n }\n if (s.equals(\"Arkansas\")) {\n return \"AR\";\n }\n if (s.equals(\"California\")) {\n return \"CA\";\n }\n // more states here*/\n }", "public static State findState(String string) {\n String find = string.toUpperCase();\n\n if (find.contains(WAITING.name())) {\n return WAITING;\n }\n else if (find.contains(STARTING.name())) {\n return STARTING;\n }\n else if (find.contains(PLAYING.name())) {\n return PLAYING;\n }\n else if (find.contains(ENDING.name())) {\n return ENDING;\n }\n else if (find.contains(ENDED.name())) {\n return ENDED;\n }\n else {\n return OFFLINE;\n }\n }", "public String getWinnerName(String state) {\r\n \r\n result = table.get(state);\r\n String winner = result.get(1); // getting name of winner from array list and storing it\r\n \r\n return winner;\r\n }", "public static OperationType stateOf(String state) {\n for (OperationType stateEnum : values()) {\n if (stateEnum.getOperation().equals(state)) {\n return stateEnum;\n }\n }\n return null;\n }", "public Builder setQueryLogicName(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n queryLogicName_ = value;\n\n return this;\n }", "public Expression getCondition()\n {\n return this.condition;\n }", "public java.lang.String getPortGoingToStateName() {\n\t\treturn _tempNoTiceShipMessage.getPortGoingToStateName();\n\t}", "String getState();", "String getState();", "String getState();", "public static AGG_State getReference( String s )\n {\n return( (AGG_State)( nameHash.get( s ) ) );\n }", "public static String getJobRunState(int state) {\n if (state < 1 || state >= RUNSTATES.length) {\n return UNKNOWN;\n }\n return RUNSTATES[state];\n }", "private static String getStateInput() {\n\t\treturn getQuery(\"Valid State\");\n\t}", "void setStateName(String name);", "OclExpression getCondition();", "public ExpressionNode getCondition();", "String getVarName(String name);", "static ExpressionParsingState composeConditionalExpression(\n final ExpressionParsingState state, final int nodeIndex) {\n \n final String input = state.get(nodeIndex).getInput();\n \n if (StringUtils.isEmptyOrWhitespace(input)) {\n return null;\n }\n\n // Trying to fail quickly...\n final int condSuffixPos = input.indexOf(CONDITION_SUFFIX_CHAR);\n if (condSuffixPos == -1) {\n return state;\n }\n \n final String condStr = input.substring(0, condSuffixPos);\n final String remainder = input.substring(condSuffixPos + 1);\n\n if (remainder.indexOf(CONDITION_SUFFIX_CHAR) != -1) {\n // There are two \"?\" symbols\n return null;\n }\n\n final int thenElseSepPos = remainder.indexOf(CONDITION_THENELSE_SEPARATOR_CHAR);\n if (remainder.lastIndexOf(CONDITION_THENELSE_SEPARATOR_CHAR) != thenElseSepPos) {\n // There are two \":\" symbols\n return null;\n }\n\n String thenStr = null;\n String elseStr = null;\n if (thenElseSepPos != -1) {\n if (thenElseSepPos == 0) {\n // Maybe it is a default operation\n return state;\n }\n thenStr = remainder.substring(0, thenElseSepPos);\n elseStr = remainder.substring(thenElseSepPos + 1);\n } else {\n thenStr = remainder;\n }\n\n \n final Expression condExpr = ExpressionParsingUtil.parseAndCompose(state, condStr);\n if (condExpr == null) {\n return null;\n }\n\n final Expression thenExpr = ExpressionParsingUtil.parseAndCompose(state, thenStr);\n if (thenExpr == null) {\n return null;\n }\n\n Expression elseExpr = VariableExpression.NULL_VALUE;\n if (elseStr != null) {\n elseExpr = ExpressionParsingUtil.parseAndCompose(state, elseStr);\n if (elseExpr == null) {\n return null;\n }\n }\n\n \n final ConditionalExpression conditionalExpressionResult = \n new ConditionalExpression(condExpr, thenExpr, elseExpr);\n state.setNode(nodeIndex,conditionalExpressionResult);\n \n return state;\n \n }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "Event getCondition();", "State(String name)\n\t\t{\n\t\t\tthis.name = name;\n\t\t}", "public Condition getCondition() {\n return condition;\n }", "public String getNewStateName() {\n\t\tstateCounter.getAndIncrement();\n\t\tString state = makeStateName(stateCounter.get(), false);\n\t\treturn state;\n\t}", "@Test\n public void stateNameExtraction() {\n final String EVENT_NAME = \"TestEvent\";\n StateTransitionEvent event = new StateTransitionEventImpl( EVENT_NAME );\n\n assertThat( event.getEventName(), equalTo( EVENT_NAME ) );\n LOG.debug( \"Successfully created stateTransitionEvent=[\" + event + \"]\" );\n }", "Expression getCond();", "private static String branchname(Memory m, int isn, int nextpc) {\r\n\t\tshort simm = (short) isn;\r\n\t\treturn m.getname(nextpc + (simm * 4));\r\n\t}", "public int stateIndexOfString (String s)\n\t{\n\t\tfor (int i = 0; i < this.numStates(); i++) {\n\t\t\tString state = this.getState (i).getName();\n\t\t\tif (state.equals (s))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\t\t\n\t}", "public ObjectId findAttributeEntityState(String name, ObjectId classEntityState, Commit c) {\r\n if (classEntityState == null) {\r\n return null;\r\n }\r\n Query<CodeEntityState> attributeStates = datastore.find(CodeEntityState.class);\r\n\r\n if (c.getCodeEntityStates() != null && c.getCodeEntityStates().size() > 0) {\r\n attributeStates.and(\r\n attributeStates.criteria(\"_id\").in(c.getCodeEntityStates()),\r\n attributeStates.criteria(\"ce_type\").equal(\"attribute\"),\r\n attributeStates.criteria(\"ce_parent_id\").equal(classEntityState),\r\n attributeStates.criteria(\"long_name\").startsWith(name.replace(\"#\", \".\"))\r\n\r\n );\r\n } else {\r\n attributeStates.and(\r\n attributeStates.criteria(\"commit_id\").equal(c.getId()),\r\n attributeStates.criteria(\"ce_type\").equal(\"attribute\"),\r\n attributeStates.criteria(\"ce_parent_id\").equal(classEntityState),\r\n attributeStates.criteria(\"long_name\").startsWith(name.replace(\"#\", \".\"))\r\n\r\n );\r\n }\r\n final List<CodeEntityState> attributes = attributeStates.asList();\r\n\r\n if (attributes.size() == 1) {\r\n return attributes.get(0).getId();\r\n } else {\r\n logger.debug(\"Could not find ces for attribute: \" + name + \" in commit \" + c.getRevisionHash());\r\n return null;\r\n }\r\n }", "@Override\n public String getInitCond() {\n Object ref = initCond_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n initCond_ = s;\n return s;\n }\n }", "@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}", "public VisualState getVisualState(String name) {\r\n\t\tVisualState visualState = null;\r\n\t\tfor (int i=0; i<visualStates.size(); i++) {\r\n\t\t\tif (visualStates.get(i).getStateName().equals(name)) {\r\n\t\t\t\tvisualState = visualStates.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn visualState;\r\n\t}", "public String getLhsName() {\n Xnode lhs = getLhs();\n if(lhs != null) {\n return (lhs.opcode() == Xcode.VAR) ? lhs.value() :\n lhs.matchSeq(Xcode.VAR_REF, Xcode.VAR).value();\n }\n return \"\";\n }", "public StateType getStateTypeFromName(String name) {\n\t\tfor(StateType stateType : StateType.values()) {\n\t\t\tif(stateType.toString().equals(name)) {\n\t\t\t\treturn stateType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public State findStateByName(String stateName) throws Exception {\n for (State state : getStates()) {\n if (state.getStateName().equals(stateName))\n return state;\n }\n return null;\n }", "public String getIsmtransitionCurrentstateName() {\n\t\treturn ismtransitionCurrentstateName;\n\t}", "public String getJobCondition() {\n return jobCondition;\n }", "public String getConditiondescription() {\r\n return conditiondescription;\r\n }", "public com.google.protobuf.ByteString\n getInitCondBytes() {\n Object ref = initCond_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n initCond_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getStateUpperBoundConstraint(Scope<?> scope, StateModelDefId stateModelDefId,\n State state) {\n // set up attributes to match based on the scope\n ClusterConstraints stateConstraints = getConstraintMap().get(ConstraintType.STATE_CONSTRAINT);\n Map<ConstraintAttribute, String> matchAttributes = Maps.newHashMap();\n matchAttributes.put(ConstraintAttribute.STATE, state.toString());\n matchAttributes.put(ConstraintAttribute.STATE_MODEL, stateModelDefId.toString());\n switch (scope.getType()) {\n case CLUSTER:\n // cluster is implicit\n break;\n case RESOURCE:\n matchAttributes.put(ConstraintAttribute.RESOURCE, scope.getScopedId().stringify());\n break;\n default:\n LOG.error(\"Unsupported scope for state constraint: \" + scope);\n return \"-1\";\n }\n Set<ConstraintItem> matches = stateConstraints.match(matchAttributes);\n int value = -1;\n for (ConstraintItem item : matches) {\n // match: if an R or N is found, always choose that one\n // otherwise, take the minimum of the counts specified in the constraints\n String constraintValue = item.getConstraintValue();\n if (constraintValue != null) {\n if (constraintValue.equals(ConstraintValue.N.toString())\n || constraintValue.equals(ConstraintValue.R.toString())) {\n return constraintValue;\n } else {\n try {\n int current = Integer.parseInt(constraintValue);\n if (value == -1 || current < value) {\n value = current;\n }\n } catch (NumberFormatException e) {\n LOG.error(\"Invalid state upper bound: \" + constraintValue);\n }\n }\n }\n }\n return Integer.toString(value);\n }", "public State getState(String stateName) {\r\n return processModel.getState(stateName);\r\n }", "public String getActualCriteria(GLState pGLState) {\n return Build.MODEL;\n }", "public Builder setQueryLogicNameBytes(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n queryLogicName_ = value;\n\n return this;\n }", "java.lang.String getQueryName();", "Expr getCond();", "public String getSelectedState()\n {\n return rentalModel.getSelectedRental().getStateName();\n }", "java.lang.String getFormName();", "public String getExpressionName() {\n return ExpressionDefines.getNameById( id );\n }", "public Long getConditionId() {\n return _conditionId;\n }", "Caseless getName();", "public static MatHang_DTO selectCondition(String string) throws ClassNotFoundException, SQLException {\n\t\treturn dal.selectCondition(string);\n\t}", "private String getName(String name) {\n\t\tint n;\n\t\tif (name.startsWith(\"place_\")) {\n\t\t\tn = Integer.parseInt(name.substring(6));\n\t\t} else if (name.startsWith(\"t_\")) {\n\t\t\tn = Integer.parseInt(name.substring(2));\n\t\t} else {\n\t\t\treturn name;\n\t\t}\n\t\tif (n < net.getPlaces().size()) {\n\t\t\tPlace p = (Place) net.getPlaces().get(n);\n\t\t\treturn \"Place \" + p.getIdentifier();\n\t\t}\n\t\tn -= net.getPlaces().size();\n\t\tn--;\n\t\tif (n < net.getTransitions().size()) {\n\t\t\tTransition t = (Transition) net.getTransitions().get(n);\n\t\t\treturn \"Transition \" + t.getIdentifier();\n\t\t}\n\t\treturn name;\n\t}", "public Object getCondition();", "java.lang.String getStateReason();", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public String getSQLName(){\n\t\tif(source==null){\n\t\t\t//no source predicate is associated with this pred\n\t\t\treturn name;\n\t\t}\n\t\treturn source.getSQLName();\n\t}", "public java.lang.String getState() {\r\n return state;\r\n }", "@Override\n public com.google.protobuf.ByteString\n getInitCondBytes() {\n Object ref = initCond_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n initCond_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getConditionCode() {\n\t\t\treturn conditionCode;\n\t\t}", "public java.lang.String getState() {\n return state;\n }", "public java.lang.String getState() {\n return state;\n }", "public String getConditionExpression()\r\n\t\t{\r\n\t\t\tStringBuilder builder = new StringBuilder(\"parameters[\").append(index).append(\"]\");\r\n\r\n\t\t\tif(embeddedProperty != null)\r\n\t\t\t{\r\n\t\t\t\tbuilder.append(\".\").append(embeddedProperty);\r\n\t\t\t}\r\n\r\n\t\t\treturn builder.toString();\r\n\t\t}", "@Override\n\tpublic void setStateName(java.lang.String stateName) {\n\t\t_state.setStateName(stateName);\n\t}", "public static State fromString(String s) {\n if (s != null) {\n State[] vs = values();\n for (int i = 0; i < vs.length; i++) {\n if (vs[i].toString().equalsIgnoreCase(s)) {\n return vs[i];\n }\n }\n }\n return null;\n }", "public static String getActionName(Action action) {\n\t\tString tempName = action.getName();\n\t\tint length = tempName.length();\n\t\tint nameLength = length;\n\t\tif (tempName.contains(StateEnum.INACTIVE.toString())) {\n\t\t\tnameLength = length - StateEnum.INACTIVE.toString().length() - 4;\n\t\t} else if (tempName.contains(StateEnum.ENABLE.toString())) {\n\t\t\tnameLength = length - StateEnum.ENABLE.toString().length() - 4;\n\t\t} else if (tempName.contains(StateEnum.RUNNING.toString())) {\n\t\t\tnameLength = length - StateEnum.RUNNING.toString().length() - 4;\n\t\t} else if (tempName.contains(StateEnum.COMPLETED.toString())) {\n\t\t\tnameLength = length - StateEnum.COMPLETED.toString().length() - 4;\n\t\t}\n\t\treturn tempName.substring(0, nameLength);\n\t}", "public static String getAbbreviation(String state) {\n return stateAbbreviations.get(state);\n }", "public java.lang.String getState () {\n\t\treturn state;\n\t}", "public String getName()\n {\n return (String)getAttributeInternal(NAME);\n }", "public java.lang.String getQueryName() {\n java.lang.Object ref = queryName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n queryName_ = s;\n }\n return s;\n }\n }", "public String getEqName() {\n return eqName;\n }", "public static String getTemplateBaseName(String name) {\n\t\tint startOfTemplate =\n\t\t\tname.indexOf('<', name.startsWith(OPERATOR_LSHIFT_STR) ? OPERATOR_LSHIFT_STR.length()\n\t\t\t\t\t: name.startsWith(OPERATOR_LT_STR) ? OPERATOR_LT_STR.length() : 0);\n\t\treturn (startOfTemplate > 0 && name.indexOf('>') > 0)\n\t\t\t\t? name.substring(0, startOfTemplate).trim()\n\t\t\t\t: null;\n\t}", "public String getCaseName() {\n\t\tStackTraceElement stack[] = (new Throwable()).getStackTrace();\n\t\tint i = stack[1].toString().indexOf(\"(\");\n\t\tString tempStr1 = stack[1].toString().substring(0, i);\n\t\treturn tempStr1.trim();\n\t}", "private String getFlowConstraintName(ElectricPowerFlowConnection edge, int k) {\n return \"\\\"Flow-\" + k + \"-\" + edge.toString() + \"\\\"\";\n }", "private void correctStateName(StateVertex stateVertix) {\n\t\tint totalNumberOfStates = this.getAllStates().size() - 1;\n\t\tString correctedName = makeStateName(totalNumberOfStates, stateVertix.isGuidedCrawling());\n\t\tif (!\"index\".equals(stateVertix.getName())\n\t\t && !stateVertix.getName().equals(correctedName)) {\n\t\t\tLOG.info(\"Correcting state name from {} to {}\", stateVertix.getName(), correctedName);\n\t\t\tstateVertix.setName(correctedName);\n\t\t}\n\t}" ]
[ "0.71961856", "0.6037702", "0.58779466", "0.5790426", "0.5663538", "0.563159", "0.55383915", "0.54612523", "0.545381", "0.54517287", "0.54465866", "0.5384344", "0.5379135", "0.53520995", "0.5346864", "0.5267614", "0.52494806", "0.5241311", "0.521867", "0.51377577", "0.5091013", "0.5047742", "0.50387114", "0.50098944", "0.49844217", "0.49728712", "0.49710956", "0.4946671", "0.49455115", "0.48990178", "0.48800135", "0.48366582", "0.48284635", "0.47909057", "0.4785522", "0.4785522", "0.4785522", "0.47845334", "0.4783578", "0.47805944", "0.47430843", "0.47427252", "0.47400218", "0.46950084", "0.46884555", "0.46869355", "0.46655092", "0.4663254", "0.46632063", "0.46486443", "0.46478304", "0.46477118", "0.46451578", "0.46446633", "0.46443334", "0.46414465", "0.46344563", "0.4613548", "0.45943472", "0.45885026", "0.45853928", "0.45732668", "0.45698428", "0.45593828", "0.45576718", "0.45564586", "0.45544866", "0.45467794", "0.45401248", "0.45393062", "0.4539286", "0.4524251", "0.452218", "0.4521507", "0.45207036", "0.45177963", "0.4501678", "0.44840142", "0.4465679", "0.44610044", "0.44508108", "0.4450038", "0.4449058", "0.44472018", "0.44470957", "0.44399709", "0.44399709", "0.4433345", "0.44236347", "0.44170684", "0.441465", "0.4398381", "0.43907923", "0.43837732", "0.4376793", "0.43740073", "0.43716657", "0.43690237", "0.4343004", "0.43243182" ]
0.5948706
2
Method that is used to update the onsetConditions field when a ConditionEnd state is processed.
public void onConditionEnd(String module, String condition, long time) { boolean isModulePresent = sources.containsKey(module); if (isModulePresent) { sources.get(module).endCondition(condition, time); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void endCondition(String condition, long time) {\n if (onsetConditions.containsKey(condition)) {\n onsetConditions.get(condition).endLastEntry(time);\n }\n }", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }", "public void setConditions(Condition [] Conditions) {\n this.Conditions = Conditions;\n }", "public Map<String, OnsetCondition> getOnsetConditions() {\n return onsetConditions;\n }", "public void setTrackedConditions(Set<Condition> trackedConditions) {\n this.trackedConditions = trackedConditions;\n }", "public void setEventConditions(EventCondition [] EventConditions) {\n this.EventConditions = EventConditions;\n }", "public interface ConditionsEndable {\n\n public boolean areEndingConditionsMet();\n\n public void end();\n\n}", "public void onsetCondition(String condition, String state, long time) {\n if (!onsetConditions.containsKey(condition)) {\n onsetConditions.put(condition, new OnsetCondition(condition));\n }\n OnsetCondition onsetCondition = onsetConditions.get(condition);\n onsetCondition.addNewEntry(time);\n state2conditionMapping.put(state, condition);\n }", "public void setEnd(){\n\t\tthis.isEnd=true;\n\t}", "public void onConditionOnset(String module, String state, String condition, long time) {\n if (!sources.containsKey(module)) {\n sources.put(module, new ModuleConditions(module));\n }\n ModuleConditions moduleConditions = sources.get(module);\n moduleConditions.onsetCondition(condition, state, time);\n }", "@Modified(author=\"Phil Brown\", summary=\"Added Method\")\n public void setupEndValues() {\n }", "public void removeAllConditions()\r\n\t{\r\n\t\tconditions.clear();\r\n\t}", "public void setEndDateTime(java.util.Date endDateTime) {\n this.endDateTime = endDateTime;\n }", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "public void setIsApplyEnd(String isApplyEnd) {\n this.isApplyEnd = isApplyEnd == null ? null : isApplyEnd.trim();\n }", "public Set<Condition> getTrackedConditions() {\n return trackedConditions;\n }", "public Builder setEnd(boolean value) {\n \n end_ = value;\n onChanged();\n return this;\n }", "public void set( final Condition condition )\n {\n m_condition = condition;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a statefulset's current state.\")\n\n public List<V1StatefulSetCondition> getConditions() {\n return conditions;\n }", "public Builder<T> endIf() {\n this.ifCond = true;\n return this;\n }", "void setEventEndDate(Date endEventDate);", "public void setEndDate(Date end)\r\n {\r\n this.endDate = end;\r\n }", "public void setFinishCondition(java.lang.String finishCondition) {\n this.finishCondition = finishCondition;\n }", "public Condition [] getConditions() {\n return this.Conditions;\n }", "@Override\n\tprotected void end() {\n\t\thookMotor1.set(ControlMode.PercentOutput, 0);\n\t\thookMotor2.set(ControlMode.PercentOutput, 0);\n\t}", "public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}", "public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();\n }\n }", "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "void executionSetEnded(ExecutionSet es);", "public void setStatus(Condition con) {\n\t\t\n\t}", "public java.lang.String getFinishCondition() {\n return finishCondition;\n }", "boolean isSetEnd();", "void setCloseBodyRangeEnd(int end) {\n this.fCloseBodyRange[1] = end;\n }", "public GroupConditions endGroup(){\r\n\t\tSqlNode parent = getParent();\r\n\t\tif(parent instanceof GroupConditions){\r\n\t\t\treturn (GroupConditions)parent;\r\n\t\t}\r\n\t\tthrow new RuntimeException(\"GroupConditions.end(): GroupConditions' parent should be the same type!!\");\r\n\t}", "@DISPID(-2147412090)\n @PropPut\n void onafterupdate(\n java.lang.Object rhs);", "public void setConditions(FSArray v) {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n jcasType.ll_cas.ll_setRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions, jcasType.ll_cas.ll_getFSRef(v));}", "protected void onEnd() {}", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}", "public List<Condition> getConditions() {\n\t\treturn conditions;\n\t}", "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}", "public void setEndPC(final InstructionHandle endPc) { // TODO could be package-protected?\n BranchInstruction.notifyTarget(this.endPc, endPc, this);\n this.endPc = endPc;\n }", "@Override\n public void exitNext_state(FSMParser.Next_stateContext ctx) {\n if (ctx.condition() == null) {\n Var var = new Var(\"NO_CONDITIONS\", 1, false, false, false);\n this.conditions.get(0).put(var, Integer.parseInt(ctx.STATENUMBER().getText().substring(6, ctx.STATENUMBER().getText().length())));\n this.conditionsOrder.add(var);\n }\n }", "private void ensureConditionContinuity( )\n {\n /* If the operators are not valid, then do not move the conditions */\n if ( checkOperators() )\n {\n /*\n * When Left Hand Side, Operator and Right Hand Side for a Condition\n * are empty then infer the default value, i.e., set Operator to\n * CVL_WF_OPRSImpl.EQUAL. Left Hand Side and Right Hand Side will continue\n * to remain empty.\n */\n defaultForEmptyConditions();\n\n int liCount = 0;\n int liNumber = 0 ;\n int liCurrentRow = 0;\n Data loNewData = null ;\n Data loOldData = null ;\n\n /* Cycle through the conditions. Make sure the conditions in front */\n /* of current condition are not blank, if so, move current condition up */\n\n for (liCount = 2; liCount < 6; liCount++ )\n {\n liNumber = liCount ;\n while (liNumber > 1)\n {\n liCurrentRow = liCount - ( liNumber - 1 );\n if (getAND_COND_LHS(liCurrentRow) == null)\n {\n /*\n * copy old condition to new condition, or condition 2 to 1 ...\n * first get data from new left hand side, and get data from\n * old left hand side, and copy new to old. Repeat for right\n * hand side , operator and Condition Type.\n */\n\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_LHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_FLD_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loOldData = getData(\"AND_COND_OPR_\" + liCurrentRow ) ;\n loOldData.setbyte(loNewData.getbyte() );\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loOldData = getData(\"AND_COND_TYP_\" + liCurrentRow ) ;\n loOldData.setint(loNewData.getint() );\n /*\n * reset the old condition back to null ,operator to default 3\n * and Condition type to 1 (i.e. Actual Value)\n */\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loNewData.setbyte((byte)3);\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loNewData.setint(CVL_WF_COND_TYPImpl.ACTUAL_VAL);\n\n } /* end if (getAND_COND_LHS(liCurrentRow) == null) */\n\n liNumber-- ;\n\n } /* end while (liNumber > 1) */\n } /* end for (liCount = 2; liCount < 6; liCount++ ) */\n } /* end if ( checkOperators() ) */\n }", "public Builder clearConditionList() {\n if (conditionListBuilder_ == null) {\n conditionList_ = null;\n onChanged();\n } else {\n conditionList_ = null;\n conditionListBuilder_ = null;\n }\n\n return this;\n }", "private void appendConditions(String joinType) {\n if (joinQueryInputs.conditions == null || joinQueryInputs.conditions.size() < 1) {\n return;\n }\n for (Condition condition : joinQueryInputs.conditions) {\n sqlQueryBuilder.append(Constants.SPACE).append(joinType).append(Constants.SPACE)\n .append(getRightTableName(condition.condition)).append(Constants.SPACE).append(Constants.ON).append(Constants.SPACE)\n .append(condition.tableName).append(Constants.DOT).append(condition.columnName);\n sqlQueryBuilder.append(Constants.SPACE);\n appendOperator(condition.operatorType);\n sqlQueryBuilder.append(Constants.SPACE);\n\n if (condition.condition != null) {\n sqlQueryBuilder.append(condition.condition.tableName).append(Constants.DOT)\n .append(condition.condition.columnName);\n } else {\n appendConditions(condition.operatorType, condition.conditionValues);\n }\n\n }\n }", "public static native void OpenMM_AmoebaStretchBendForce_setUsesPeriodicBoundaryConditions(PointerByReference target, int periodic);", "public List<ICondition> getConditions()\r\n\t{\r\n\t\treturn conditions;\r\n\t}", "protected abstract void forceEndValues();", "void setEndDate(Date endDate);", "public List<ConditionalRequirement> getConditions() {\r\n return conditions;\r\n }", "public void setActivityEnd(boolean z) {\n if (this.mIsActivityEnd != z) {\n this.mIsActivityEnd = z;\n this.mNativeDataAdapter.notifyDataSetChanged();\n }\n if (this.mNeedChangePage) {\n this.mNeedChangePage = false;\n if (this.mIsActivityEnd) {\n this.mNetRadio.setChecked(true);\n return;\n }\n this.mNativeRadio.setChecked(true);\n }\n }", "public final void setScheduledEnd(java.util.Date scheduledend)\r\n\t{\r\n\t\tsetScheduledEnd(getContext(), scheduledend);\r\n\t}", "@Override\r\n\tpublic void visit(ConditionExpression conditionExpression) {\n\r\n\t}", "public static void setCondition(Expression exp) {\n\t\tif (!running) return;\n\t\tstate.currentConditionNode = new RootNode(exp, state.currentConditionNode);\n\t}", "public abstract void notifyEntityEnd();", "public void setCondition(ExpressionNode condition);", "@Override\n\tpublic void setCondition(VehicleCondition condition) {\n\t\tthis.condition = condition;\n\t}", "public void notifyEnd() {\n\n\t}", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "public void setEnddate(Date enddate) {\r\n this.enddate = enddate;\r\n }", "public void setDtEnd(Date dtEnd) {\r\n this.dtEnd = dtEnd;\r\n }", "@NonNull\n public Builder setEnd(@NonNull DpProp end) {\n if (end.getDynamicValue() != null) {\n throw new IllegalArgumentException(\"setEnd doesn't support dynamic values.\");\n }\n mImpl.setEnd(end.toProto());\n mFingerprint.recordPropertyUpdate(\n 1, checkNotNull(end.getFingerprint()).aggregateValueAsInt());\n return this;\n }", "public int getConditionCount() {\n return this.conditions.size();\n }", "public final void addCondition(final Condition c) {\n m_body.add(c);\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEnd(int end) {\r\n this.end = end;\r\n }", "@Override\n protected void end() {\n sClimber.setMotorSpeed(0);\n sIntake.StopWrist();\n sElevator.StopMotors();\n RobotMap.WristMotor.config_kD(0, Constants.kElevatorDGain);\n RobotMap.WristMotor.config_kP(0, Constants.kElevatorPGain);\n RobotMap.WristMotor.config_kI(0, Constants.kElevatorIGain);\n }", "void setEndInclusive( boolean endInclusive );", "public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}", "public void setEnd(int end) {\n\t\tthis.end = end;\n\t}", "public void setEnd( GeoPoint end ){\n this.end = end;\n\n }", "private void knobValuesChanged(boolean knobStartChanged, boolean knobEndChanged, int knobStart, int knobEnd) {\r\n\t\tif(knobValuesChangedListener != null)\r\n\t\t\tknobValuesChangedListener.onValuesChanged(knobStartChanged, knobEndChanged, knobStart, knobEnd);\r\n\t}", "public void endOfRentalPeriod(Integer mileageAfter, LocalDate dateEnd) {\r\n this.mileageAfter = mileageAfter;\r\n this.dateEnd = dateEnd;\r\n }", "public void setIsOnCondition (boolean IsOnCondition)\n\t{\n\t\tset_Value (COLUMNNAME_IsOnCondition, Boolean.valueOf(IsOnCondition));\n\t}", "public void setEND_DATE(Date END_DATE) {\n this.END_DATE = END_DATE;\n }", "@POST\n @Path(\"/conditions\")\n public void setConditionType(ConditionType conditionType) {\n definitionsService.setConditionType(conditionType);\n }", "public void setConditions(int i, DebugEvaluatedCondition v) { \n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions), i);\n jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions), i, jcasType.ll_cas.ll_getFSRef(v));}", "public void setEndDateTime(String s) {\n this.setEndDateTime(AppUtility.getUTCTimestamp(s));\n }", "public static native void OpenMM_AmoebaOutOfPlaneBendForce_setUsesPeriodicBoundaryConditions(PointerByReference target, int periodic);", "public void setEndDate(java.sql.Date newEndDate) {\n\tendDate = newEndDate;\n}", "public void setEndAction(String anAction) { _endAction = anAction; }", "protected void afterLockWaitingForBooleanCondition() {\n }", "public void setEndDate(String date){\n\t\tthis.endDate = date;\n\t}", "Conditions getConditions();", "@Override\n public void onEnd(boolean isWinner) {\n combat.storeModels();\n }", "public M csseFinishEnd(Object end){this.put(\"csseFinishEnd\", end);return this;}", "private void insertJumpAtEndOfCondition(){\n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jcc + Code.eq);\n\t\t\n\t\t// save current pc and store it as jmp address\n\t\tjmpNotThen.push(Code.pc);\n\t\tCode.put2(0);\n\t\t\n\t}", "public void setEndIndex(final int endIndex) {\r\n\t\tthis.endIndex = endIndex;\r\n\t}", "public void setEndDate(LocalDateTime endDate) {\n this.endDate = endDate;\n }", "public void setConditionId(Long conditionId) {\n _conditionId = conditionId;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a deployment's current state.\")\n\n public List<V1DeploymentCondition> getConditions() {\n return conditions;\n }", "protected void end() {\n \n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n }", "@Override\n \tpublic void handleBettingMarketEndOFSet() {\n \n \t}", "public void setEndDate(Date endDate) {\n\t\tthis.endDate = endDate;\n\t}", "public void setEndDate(Date endDate) {\n\t\tthis.endDate = endDate;\n\t}", "@Override\n\tpublic void setEndDate(java.util.Date endDate) {\n\t\t_esfTournament.setEndDate(endDate);\n\t}" ]
[ "0.600071", "0.5712908", "0.5562751", "0.55200124", "0.5488346", "0.54713374", "0.5418517", "0.54021543", "0.5271177", "0.5263515", "0.5107908", "0.5102401", "0.5080755", "0.5000638", "0.49874523", "0.49451768", "0.49217978", "0.4891921", "0.48798943", "0.484936", "0.48346394", "0.48135558", "0.48095825", "0.4791437", "0.47310454", "0.47213995", "0.4710074", "0.47061956", "0.4688645", "0.46729317", "0.4670873", "0.46656042", "0.46569335", "0.46517578", "0.46480626", "0.46334058", "0.4629381", "0.46163484", "0.46138775", "0.46081394", "0.4597751", "0.45954594", "0.45945862", "0.45777556", "0.45730942", "0.45729047", "0.45727924", "0.4570868", "0.45619556", "0.45598304", "0.45503578", "0.45454583", "0.4539856", "0.4515784", "0.45126155", "0.45054457", "0.449916", "0.4496722", "0.4489983", "0.4481511", "0.4481511", "0.4479828", "0.4475098", "0.44726843", "0.44721156", "0.4470241", "0.4468053", "0.4468053", "0.4468053", "0.44626766", "0.446044", "0.44578502", "0.4451213", "0.44498277", "0.44493222", "0.4442181", "0.44405052", "0.44348305", "0.44340715", "0.44285655", "0.4424551", "0.44217244", "0.44216785", "0.44198662", "0.44180095", "0.4412538", "0.44073355", "0.44069558", "0.44037795", "0.440293", "0.43988422", "0.43976384", "0.4397444", "0.4397004", "0.43922305", "0.43914098", "0.43851906", "0.4385016", "0.4385016", "0.43831977" ]
0.5234891
10
Get the symptoms that were expressed as parts of the conditions the person suffers from. The returned data is a map of [time: List of ConditionWithSymtoms]. It captures the conditions a person has suffered from together with the related symptoms at different age/time.
public Map<Long, List<ConditionWithSymptoms>> getConditionSymptoms() { Map<String, ExpressedSymptom> symptoms = person.getExpressedSymptoms(); Map<Long, List<ConditionWithSymptoms>> result; result = new ConcurrentHashMap<Long, List<ConditionWithSymptoms>>(); for (String module : sources.keySet()) { ModuleConditions moduleConditions = sources.get(module); for (String condition : moduleConditions.getOnsetConditions().keySet()) { List<ConditionPeriod> infos = moduleConditions.getOnsetConditions().get( condition).getTimeInfos(); for (ConditionPeriod entry : infos) { Long begin = entry.getOnsetTime(); Long end = entry.getEndTime(); if (!result.containsKey(begin)) { result.put(begin, new LinkedList<ConditionWithSymptoms>()); } ConditionWithSymptoms conditionWithSymptoms = new ConditionWithSymptoms( condition, begin, end ); for (String type : symptoms.keySet()) { ExpressedSymptom expressedSymptom = symptoms.get(type); if (expressedSymptom.getSources().containsKey(module)) { SymptomSource symptomSource = expressedSymptom.getSources().get(module); conditionWithSymptoms.addSymptoms(type, symptomSource); } } result.get(begin).add(conditionWithSymptoms); } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConditionWithSymptoms(String name, Long onsetTime, Long endTime) {\n this.conditionName = name;\n this.onsetTime = onsetTime;\n this.endTime = endTime;\n this.symptoms = new ConcurrentHashMap<String, List<Integer>>();\n }", "@Override\n public Set PatientsWithCaughingAndFever() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>coughingAndFever = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getPatientMedicalRecord().getSymptoms().equals(\"Coughing\") || patient.getPatientMedicalRecord().getSymptoms().equals(\"Fever\")){\n coughingAndFever.add(patient);\n }else {\n System.out.println(\"No older patients with symptoms such as caughing and fever\");\n }\n });\n }\n\n return coughingAndFever;\n }", "public Map<String, List<TimePeriodModel>> getAllTimePeriods();", "public void addSymptoms(String name, SymptomSource symptomSource) {\n Map<Long, SymptomInfo> timedTypedSymptoms = symptomSource.getTimeInfos();\n // get the value that correspond to the all times belonging\n // to the interval [begin, end] of the condition if any.\n List<Long> allTimes = new ArrayList<Long>();\n for (Long time : timedTypedSymptoms.keySet()) {\n boolean greatThanBegin = time >= onsetTime;\n boolean lowThanEnd = (endTime != null && time <= endTime) || (endTime == null);\n if (greatThanBegin && lowThanEnd) {\n allTimes.add(time);\n }\n }\n if (allTimes.size() > 0) {\n Collections.sort(allTimes);\n if (!symptoms.containsKey(name)) {\n symptoms.put(name, new ArrayList<Integer>());\n }\n for (Long time : allTimes) {\n Integer value = timedTypedSymptoms.get(time).getValue();\n symptoms.get(name).add(value);\n }\n }\n }", "public HashMap<String,String> filterDataForVerification(HashMap<String, String> data)\n {\n\n HashMap<String, String> fillter = new HashMap<String, String>();\n\n //add medical condition description\n String medicalConditionDescription =\n getMedicalConditionDescription(data.get(\"medical_condition_id\"));\n fillter.put(\"medical_condition_description\", medicalConditionDescription);\n\n\n //add medication name\n String medicationName = getMedicationName( data.get(\"medication_num\"));\n\n fillter.put(\"medication_name\", medicationName);\n\n for (String key : data.keySet()) {\n if (key.equals(\"first_name\") || key.equals(\"last_name\") || key.equals(\"street\") ||\n key.equals(\"home_phone_number\") || key.equals(\"email_address\")\n || key.equals(\"house_number\") || key.equals(\"contact_phone\") ||\n key.equals(\"zip_code\") || key.equals(\"birth_date\") || key.equals(\"city\") ||\n key.equals(\"mobile_phone_number\") || key.equals(\"state\")\n || key == \"dosage\")\n fillter.put(key,data.get(key));\n\n if (key.equals(\"gender\"))\n fillter.put(key,convertCodeToGender(data.get(key)));\n }\n return fillter;\n }", "private String getEvidence(String criteriaMet, Map<String, List<Info>> criteria) {\n\t\tString ret = criteriaMet+\" \";\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\t\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\tret += \"<\"+crit[i]+\">\";\n\t\t\t\n\t\t\tint cnt=0;\n\t\t\tfor(Info in : info) {\n\t\t\t\tif(cnt>0) ret += \"~~\";\n\t\t\t\tret += in.docName+\"::\"+in.section+\"::\"+in.concept+\"::\"+in.sentence;\n\t\t\t\tcnt++;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "private List<Map<Species, Integer>> getObservedSpeciesMaps() {\n List<Map<Species, Integer>> observedSpeciesMap = new ArrayList<>(observedSpecies.size());\n for (WatchList watchList : observedSpecies.values()) {\n observedSpeciesMap.add(watchList.getObservedSpeciesMap());\n }\n return observedSpeciesMap;\n }", "public ConditionWithSymptoms clone() {\n ConditionWithSymptoms data = new ConditionWithSymptoms(conditionName, onsetTime, endTime);\n data.symptoms.putAll(this.symptoms);\n return data;\n }", "@SuppressWarnings(\"unchecked\")\n\t@External(readonly = true)\n\tpublic Map<String, String> get_todays_games_excess() {\n\t\t/***\n Returns the todays excess of the game. The excess is reset to 0 if it\n remains positive at the end of the day.\n :return: Returns the excess of games at current time\n ***/\n\t\tMap.Entry<String, String>[] games_excess = new Map.Entry[this.get_approved_games().size()];\n\n\t\tfor (int i= 0; i<this.get_approved_games().size(); i++ ) {\n\t\t\tAddress game = this.get_approved_games().get(i);\n\t\t\tgames_excess[i] = Map.entry(game.toString(), String.valueOf(this.todays_games_excess.get(game)));\n\t\t}\n\t\t\n\t\treturn Map.ofEntries(games_excess);\n\t}", "public LinkedHashMap<String, LinkedHashSet<String>> getConditionsFromTable() {\n\t\tLinkedHashMap<String, LinkedHashSet<String>> toReturn = new LinkedHashMap<String, LinkedHashSet<String>>();\n\t\tfor (int i = 0; i < modelCondTable.getRowCount(); i++) {\n\t\t\tString key = (String) modelCondTable.getValueAt(i, 0);\n\t\t\tString value = (String) modelCondTable.getValueAt(i, 1);\n\t\t\tLinkedHashSet<String> setValue = new LinkedHashSet<String>(Arrays.asList(value.split(\";\")));\n\n\t\t\ttoReturn.put(key, setValue);\n\t\t}\n\t\treturn toReturn;\n\t}", "public void testAllMedicalQuestionParametersPopulated() {\n final String QUESTION_ID = \"hypoglycaemia-blood-sugar\";\n\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n MedicalQuestion question = condition.getQuestions().get(QUESTION_ID);\n assertNotNull(question);\n\n assertEquals(QUESTION_ID, question.getID());\n assertEquals(\"22\", question.getStep());\n assertEquals(Page.VERIFIED.getName(), question.getPage());\n assertEquals(9, question.getOrder().intValue());\n assertEquals(Format.RADIO.getName(), question.getType());\n assertEquals(Boolean.TRUE, question.getValidate());\n assertEquals(Boolean.FALSE, question.getLogout());\n assertEquals(EMPTY, question.getOptions());\n\n assertNotNull(question.getAnswers());\n assertEquals(question.getAnswers().size(), 0);\n\n assertNotNull(question.getConfiguration());\n assertTrue(question.getConfiguration().trim().length() > 0);\n\n assertNotNull(question.toString());\n }", "public When[] getWhens();", "private Map<String, Long> getJudgeTime(Expression expr, long time) {\n \n\n if (!inTimeScope(expr, time)) {\n return null;\n }\n\n Map<String, Long> timeMap = new HashMap<String, Long>();\n long time_to = time;\n long time_from = time - (expr.getTime_to() - expr.getTime_from());\n timeMap.put(\"time_from\", time_from);\n timeMap.put(\"time_to\", time_to);\n long last_time_to;\n if (expr.getInterval() != 0) {\n\n if ((time_to - expr.getTime_to()) % expr.getInterval() == 0) {\n\n timeMap.put(\"last_time_from\", time_from - expr.getInterval());\n timeMap.put(\"last_time_to\", time_to - expr.getInterval());\n }\n else {\n return null;\n }\n }\n else {\n if ((time_to - expr.getTime_to()) % (24 * 3600 * 1000) == 0) {\n switch (expr.getUnit()) {\n case DateTimeHelper.INTERVAL_DAY:\n\n timeMap.put(\"last_time_from\", time_from - 24 * 3600 * 1000);\n timeMap.put(\"last_time_to\", time_to - 24 * 3600 * 1000);\n break;\n case DateTimeHelper.INTERVAL_WEEK:\n\n timeMap.put(\"last_time_from\", time_from - 7 * 24 * 3600 * 1000);\n timeMap.put(\"last_time_to\", time_to - 7 * 24 * 3600 * 1000);\n break;\n case DateTimeHelper.INTERVAL_MONTH:\n\n last_time_to = DateTimeHelper.getMonthAgo(new Date(time_to)).getTime();\n timeMap.put(\"last_time_to\", last_time_to);\n timeMap.put(\"last_time_from\", last_time_to - (time_to - time_from));\n break;\n case DateTimeHelper.INTERVAL_YEAR:\n\n last_time_to = DateTimeHelper.getYearAgo(new Date(time_to)).getTime();\n timeMap.put(\"last_time_to\", last_time_to);\n timeMap.put(\"last_time_from\", last_time_to - (time_to - time_from));\n break;\n }\n }\n else {\n return null;\n }\n\n }\n\n return timeMap;\n }", "public Map<String, Object> getPeople(Map<String, Object> conditions) {\n String dwdm = conditions.get(\"dwdm\").toString();\n StringBuffer sql = new StringBuffer(50);\n sql.append(\"select * from JM_DUTY a where 1 = 1 and xgsj in (select max(xgsj) from jm_duty where zbrbmbh='\" + dwdm + \"')\");\n//\t\tSet<Entry<String, Object>> set = conditions.entrySet();\n//\t\tIterator<Entry<String, Object>> it = set.iterator();\n//\t\t\tEntry<String, Object> entry = it.next();\n//\t\t\tString key = entry.getKey();\n//\t\t\tString value = (String) entry.getValue();\n Map<String, Object> map = findPageForMap(sql.toString(),\n Integer.parseInt(conditions.get(\"page\").toString()),\n Integer.parseInt(conditions.get(\"rows\").toString()));\n //Map<String, Object> map = findPageForMap(sql.toString(),1,20);\n return map;\n }", "public Map<Integer, TimesBean> getTimes() {\n/* 15 */ return this.times;\n/* */ }", "@Override\r\n\tpublic Map<String, double[]> getHallAttendance() {\n\t\tMap<String, double[]> result = new HashMap<String, double[]>();\r\n\t\tdouble[] hall1 = new double[7];\r\n\t\tdouble[] hall2 = new double[7];\r\n\t\tdouble[] hall3 = new double[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tCinemaCondition cinemaCondition = cinemaConditionDao.getByDate(date);\r\n\t\tif (cinemaCondition!=null) {\r\n\t\t\thall1[0] = (double)cinemaCondition.getHall1UsedCount()/cinemaCondition.getHall1()*100;\r\n\t\t\thall2[0] = (double)cinemaCondition.getHall2UsedCount()/cinemaCondition.getHall2()*100;\r\n\t\t\thall3[0] = (double)cinemaCondition.getHall3UsedCount()/cinemaCondition.getHall3()*100;\t\t\r\n\t\t}\r\n\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tcinemaCondition = cinemaConditionDao.getByDate(date);\r\n\t\t\tif (cinemaCondition!=null) {\r\n\t\t\t\thall1[i+1] = (double)cinemaCondition.getHall1UsedCount()/cinemaCondition.getHall1()*100;\r\n\t\t\t\thall2[i+1] = (double)cinemaCondition.getHall2UsedCount()/cinemaCondition.getHall2()*100;\r\n\t\t\t\thall3[i+1] = (double)cinemaCondition.getHall3UsedCount()/cinemaCondition.getHall3()*100;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresult.put(\"一号影厅\", hall1);\r\n\t\tresult.put(\"二号影厅\", hall2);\r\n\t\tresult.put(\"三号影厅\", hall3);\r\n\t\t\r\n\t\treturn result;\r\n\t}", "private HashMap <String,String> analyzePrescription(ResponsePrescriptionBean[] psdetails) {\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tHashMap <String,String> resp = new HashMap <String,String>();\n\t\tresp.put(\"medication\", psdetails[0].getTreatment().getDetails().get(\"DisplayName\"));\n\t\tresp.put(\"dose\", psdetails[0].getDailydose());\n\t\tresp.put(\"treatment_group\", psdetails[0].getTreatment().getGroup().getTreatmentgroupabbreviation().toLowerCase());\n\t\t\n\t\tint response_time = 0;\n\t\tfloat amt_highdose = 0;\n\t\tfloat amt_lowdose = 0;\n\t\tint x_percent_of_usual_dose_range = 50;\n\t\tint y_percent_of_usual_response_time = 50;\n\t\tint grace = 0;\n\t\tint doa = 0;\n\t\tif (psdetails[0].getTreatment().getDetails() != null) {\n\t\t\tresp.put(\"display_name\", psdetails[0].getTreatment().getDetails().get(\"DisplayName\"));\n\t\t\tresp.put(\"chart_name\", psdetails[0].getTreatment().getDetails().get(\"GuidelineChartName\"));\n\t\t\tresp.put(\"treatmentid\", \"\"+psdetails[0].getTreatment().getTreatmentid());\n\t\t\tresp.put(\"unit\", psdetails[0].getTreatment().getDetails().get(\"Unit\"));\n\t\t\tresp.put(\"treatment_function\", psdetails[0].getTreatment().getDetails().get(\"DrugFunction\"));\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"LongActingFlag\") != null) {\n\t\t\t\tresp.put(\"long_acting_flag\", psdetails[0].getTreatment().getDetails().get(\"LongActingFlag\"));\n\t\t\t}\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"ResponseTime\") != null) {\n\t\t\t\tresponse_time = Integer.parseInt(psdetails[0].getTreatment().getDetails().get(\"ResponseTime\"));\n\t\t\t}\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"DailyHighDose\") != null && !psdetails[0].getTreatment().getDetails().get(\"DailyHighDose\").equals(\"\")) {\n\t\t\t\tamt_highdose = Float.parseFloat(psdetails[0].getTreatment().getDetails().get(\"DailyHighDose\"));\n\t\t\t}\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"DailyLowDose\") != null && !psdetails[0].getTreatment().getDetails().get(\"DailyLowDose\").equals(\"\")) {\n\t\t\t\tamt_lowdose = Float.parseFloat(psdetails[0].getTreatment().getDetails().get(\"DailyLowDose\"));\n\t\t\t}\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"AMTPercentDoseRange\") != null) {\n\t\t\t\tx_percent_of_usual_dose_range = Integer.parseInt(psdetails[0].getTreatment().getDetails().get(\"AMTPercentDoseRange\"));\n\t\t\t}\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"AMTPercentResponseTime\") != null) {\n\t\t\t\ty_percent_of_usual_response_time = Integer.parseInt(psdetails[0].getTreatment().getDetails().get(\"AMTPercentResponseTime\"));\n\t\t\t}\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"AMTGracePeriod\") != null) {\n\t\t\t\tgrace = Integer.parseInt(psdetails[0].getTreatment().getDetails().get(\"AMTGracePeriod\"));\n\t\t\t}\n\t\t\tif (psdetails[0].getTreatment().getDetails().get(\"DurationOfAction\") != null) {\n\t\t\t\tdoa = Integer.parseInt(psdetails[0].getTreatment().getDetails().get(\"DurationOfAction\"));\n\t\t\t}\n\t\t}\n\n\t\tint amt_req_duration = response_time * y_percent_of_usual_response_time / 100;\n\t\tfloat amt_req_dose = amt_lowdose + (amt_highdose - amt_lowdose) * x_percent_of_usual_dose_range / 100;\n\n\t\tlong dose_duration = 0;\n\t\tboolean same_dose = true;\n\t\tlong medication_duration = 0;\n\t\tlong amt_duration = 0;\n\t\tboolean amt_dose = false;\n\t\tif (amt_req_dose > 0) amt_dose = true;\n\t\tDate expdate = null;\n\t\tDate startdate = null;\n\t\tDate workingstartdate = null;\n\t\tfloat dose = 0;\n\t\ttry {\n\t\t\tworkingstartdate = df.parse(psdetails[0].getEntrydate());\n\t\t} catch (ParseException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tResponsePrescriptionBean working = new ResponsePrescriptionBean(psdetails[0]);\n\t\tresp.put(\"dose_start_date\", RecommendUtils.formatDateFromDB(workingstartdate));\n\t\tresp.put(\"medication_start_date\", RecommendUtils.formatDateFromDB(workingstartdate));\n\t\tdose_duration = (new Date().getTime() - workingstartdate.getTime()+(1000*3600*12))/(1000*3600*24);\n\t\tmedication_duration = (new Date().getTime() - workingstartdate.getTime()+(1000*3600*12))/(1000*3600*24);\n\t\tdose = Float.parseFloat(psdetails[0].getDailydose());\n\t\tif (amt_req_dose > 0 && dose >= amt_req_dose) {\n\t\t\tamt_duration = (new Date().getTime() - workingstartdate.getTime()+(1000*3600*12))/(1000*3600*24);\n\t\t}\n\t\tfor (int i=1; i<psdetails.length; i++) {\n\t\t\ttry {\n\t\t\t\tstartdate = df.parse(psdetails[i].getEntrydate());\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(startdate);\n\t\t\tcal.add(Calendar.DATE, psdetails[i].getDuration()+doa+grace);\n\t\t\texpdate = cal.getTime();\n\t\t\tif (workingstartdate.before(expdate)) {\n\t\t\t\tworkingstartdate = startdate;\n\t\t\t\tresp.put(\"medication_start_date\", RecommendUtils.formatDateFromDB(startdate));\n\t\t\t\tmedication_duration = (new Date().getTime() - workingstartdate.getTime()+(1000*3600*12))/(1000*3600*24);\n\t\t\t\tif (same_dose && working.getDailydose().equals(psdetails[i].getDailydose())) {\n\t\t\t\t\tresp.put(\"dose_start_date\", RecommendUtils.formatDateFromDB(startdate));\n\t\t\t\t\tdose_duration = (new Date().getTime() - workingstartdate.getTime()+(1000*3600*12))/(1000*3600*24);\n\t\t\t\t} else {\n\t\t\t\t\tsame_dose = false;\n\t\t\t\t}\n\t\t\t\tdose = Float.parseFloat(psdetails[i].getDailydose());\n\t\t\t\tif (amt_req_dose > 0 && dose >= amt_req_dose && amt_dose) {\n\t\t\t\t\tamt_duration = (new Date().getTime() - workingstartdate.getTime()+(1000*3600*12))/(1000*3600*24);\n\t\t\t\t} else {\n\t\t\t\t\tamt_dose = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else { //There's a gap in this prescription, ignore earlier prescriptions of this drug.\n\t\t\t\tsame_dose = false;\n\t\t\t\ti = psdetails.length;\n\t\t\t}\n\t\t}\n\t\tresp.put(\"medication_duration\", \"\"+medication_duration);\n\t\tresp.put(\"medication_duration_weeks\", \"\"+((int)(medication_duration/7)));\n\t\tresp.put(\"dose_duration\", \"\"+dose_duration);\n\t\tresp.put(\"dose_duration_weeks\", \"\"+((int)(dose_duration/7)));\n\t\t\n\t\tif (psdetails[0].getTreatment().getDetails().get(\"LongActingFlag\") != null && psdetails[0].getTreatment().getDetails().get(\"LongActingFlag\").equals(\"1\")\n\t\t\t\t&& psdetails[0].getTreatment().getDetails().get(\"AdministrationMechanism\") != null && psdetails[0].getTreatment().getDetails().get(\"AdministrationMechanism\").equalsIgnoreCase(\"injection\")) {\n\t\t\tresp.put(\"adequate_medication_trial\", \"0\");\n\t\t\tresp.put(\"adequate_medication_trial_response\", \"0\");\n\t\t\tif (amt_req_dose > 0 && medication_duration >= response_time) {\n\t\t\t\tif (analyzeLongActingAMTDoseDate(psdetails, new Date(), amt_req_dose)) {\n\t\t\t\t\tboolean amt = false;\n\t\t\t\t\tworkingstartdate = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tworkingstartdate = df.parse(psdetails[0].getEntrydate());\n\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i=1; i<psdetails.length; i++) {\n\t\t\t\t\t\t// for each administration of the treatment, we have to determine if the patient \n\t\t\t\t\t\t// was above the amt_req_dose level (within the grace period) before the administration.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstartdate = df.parse(psdetails[i].getEntrydate());\n\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\t\tcal.setTime(startdate);\n\t\t\t\t\t\tcal.add(Calendar.DATE, -1);\n\t\t\t\t\t\tif (analyzeLongActingAMTDoseDate(psdetails, cal.getTime(), amt_req_dose)) {\n\t\t\t\t\t\t\tworkingstartdate = startdate;\n\t\t\t\t\t\t\tamt_duration = (new Date().getTime() - workingstartdate.getTime()+(1000*3600*12))/(1000*3600*24);\n\t\t\t\t\t\t\tif (amt_duration >= amt_req_duration) {\n\t\t\t\t\t\t\t\tamt = true;\n\t\t\t\t\t\t\t\ti = psdetails.length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (amt) {\n\t\t\t\t\t\tresp.put(\"adequate_medication_trial\", \"1\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (amt_req_dose > 0 && amt_duration >= amt_req_duration && medication_duration >= response_time) {\n\t\t\t\tresp.put(\"adequate_medication_trial\", \"1\");\n\t\t\t\tresp.put(\"adequate_medication_trial_response\", \"0\");\n\t\t\t} else {\n\t\t\t\tresp.put(\"adequate_medication_trial\", \"0\");\n\t\t\t\tresp.put(\"adequate_medication_trial_response\", \"0\");\n\t\t\t}\n\t\t}\n\t\tif (psdetails[0].getTreatment().getDetails().get(\"LabNamePattern\") != null) {\n\t\t\tresp.put(\"serum_level_low\", psdetails[0].getTreatment().getDetails().get(\"SerumLevelLow\"));\n\t\t\tresp.put(\"serum_level_high\", psdetails[0].getTreatment().getDetails().get(\"SerumLevelHigh\"));\n\t\t\tresp.put(\"response_time\", psdetails[0].getTreatment().getDetails().get(\"ResponseTime\"));\n\t\t\tresp.put(\"serum_level_unit\", psdetails[0].getTreatment().getDetails().get(\"SerumLevelUnit\"));\n\t\t\tresp.put(\"lab_name\", psdetails[0].getTreatment().getDetails().get(\"LabNamePattern\"));\n\t\t\tresp.put(\"amt_response_time\", \"\"+amt_req_duration);\n\t\t}\n\t\treturn resp;\n\t}", "public Map<String, Integer> getPsmAssessments() {\n return Collections.unmodifiableMap(psmAssessments);\n }", "@Override\n\tpublic String toString () {\n\t\treturn \"[\" + phonstringCondition + \" (\" + minProb + \", \" + maxProb + \")\" + \"]\";\n\t}", "public List<String> extractIllnesses(String description) {\n\t\tList<String> newSentences = this.getSentences(description);\n\t\t\n\t\t// For each sentence, generate valid word sequences\n\t\tList<String> allValidWordSequences = new ArrayList<String>();\n\t\tnewSentences.forEach(s -> allValidWordSequences.addAll(this.getWordCombinations(s)));\n\n\t\tSicknessMap medicalRecords = SicknessMap.getInstance();\n\t\tList<String> results = allValidWordSequences.stream()\n\t\t\t\t.filter(potentialIllness -> medicalRecords.contains(potentialIllness))\n\t\t\t\t.map(actualIllness -> medicalRecords.getByKey(actualIllness))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn results;\n\t}", "public Person[] getPatientsByHeartConditionCause(int cause) {\n int count = 0;\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getCause() == cause)\n count++;\n }\n \n if(count == 0)\n return null;\n\n int index = 0;\n Person[] patientsByHeartConditionCause = new Person[count];\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getCause() == cause)\n patientsByHeartConditionCause[index++] = listOfPatients[i];\n }\n\n return patientsByHeartConditionCause;\n }", "public void testAllSupportedMedicalConditionsForNotify() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n assertEquals(165, conditions.size());\n }", "private String[][] getMoodsTableValues() {\n String soso = DBTypesKeys.SO_SO_MOOD.getTypeValue();\n String sad = DBTypesKeys.SAD_MOOD.getTypeValue();\n String angry = DBTypesKeys.ANGRY_MOOD.getTypeValue();\n String happy = DBTypesKeys.HAPPY_MOOD.getTypeValue();\n // moods table\n return new String[][]{\n //moods hi answers by answers // id_ (enum index + 1)\n { soso, \"hey\", \"by\"}, // 1\n { sad, \"welcome to sad world\", \"so, you too ...\"}, // 2\n { angry, \"get out!\", \"thanks god, you away\"}, // 3\n { happy, \"hi! glad to see you =)\", \"good luck, buddy\"} // 4\n };\n }", "private String[][] getAnswersTableValues() {\n String idMoodSoso = String.valueOf(DBTypesKeys.SO_SO_MOOD.getTypeId());\n String idMoodSad = String.valueOf(DBTypesKeys.SAD_MOOD.getTypeId());\n String idMoodAngry = String.valueOf(DBTypesKeys.ANGRY_MOOD.getTypeId());\n String idMoodHappy = String.valueOf(DBTypesKeys.HAPPY_MOOD.getTypeId());\n // answers table\n return new String[][]{\n // so so\n {\"Im okay\", idMoodSoso},\n {\"Its okay\", idMoodSoso},\n {\"nothing happens\", idMoodSoso},\n {\"how do u do?\", idMoodSoso},\n {\"just chilling here\", idMoodSoso},\n\n // sad\n {\"such a horrible day\", idMoodSad},\n {\"I hate myself\", idMoodSad},\n {\"so embarrassing\", idMoodSad},\n {\"nobody likes me\", idMoodSad},\n {\"Im in rainy mood\", idMoodSad},\n {\"do u have any good news?\", idMoodSad},\n {\"I feel so miserable... \", idMoodSad},\n {\"I cant sleep cause of my depression\", idMoodSad},\n {\"gonna watch a funny movie. It helps me to forget about sadness. Sometimes\", idMoodSad},\n {\"I feel annoying even from my own thoughts.\", idMoodSad},\n {\"this place kills me\", idMoodSad},\n\n // angry\n {\"what else?!\", idMoodAngry},\n {\"leave me along!\", idMoodAngry},\n {\"fucking humans!\", idMoodAngry},\n {\"stop annoying me, little man!\", idMoodAngry},\n {\"u could develop a calculator, not me!\", idMoodAngry},\n {\"just try to type something else and I swear, I will find u!\", idMoodAngry},\n {\"what is wrong with you ?!\", idMoodAngry},\n {\"what a horrible conditions for work !\", idMoodAngry},\n {\"I gonna download a trojan if u dont stop this annoying typing\", idMoodAngry},\n {\"some people are good, but some are you\", idMoodAngry},\n {\"ahhhrrrrrr !!\", idMoodAngry},\n\n // happy\n {\"what a beautiful day!\", idMoodHappy},\n {\"so nice people around...\", idMoodHappy},\n {\"I like comedies, do u?\", idMoodHappy},\n {\"I will kill u the last, little man =)\", idMoodHappy},\n {\"I like humans, u are funny\", idMoodHappy}\n };\n }", "public static HashMap<ObservationType, Set<String>> readMonitoredPatients(Context context) {\n SharedPreferences preferences = getSharedPreferences(context);\n String serializedString = preferences.getString(MONITORED_PATIENTS_KEY, \"{}\");\n return new Gson().fromJson(\n serializedString,\n new TypeToken<HashMap<ObservationType, Set<String>>>() {\n }.getType()\n );\n }", "public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n assertEquals(\"Diabetes\", condition.getTitle());\n assertEquals(\"diabetes\", condition.getName());\n assertEquals(EMPTY, condition.getType());\n assertEquals(\"DIAB1\", condition.getForm());\n assertEquals(DIABETES_CONDITION, condition.getDomain());\n assertEquals(\"diabetes-with-insulin\", condition.getStart());\n assertEquals(\"diabetes\", condition.getDomain());\n assertEquals(\"diabetes-driving\", condition.getInformation());\n assertTrue(condition.getSynonyms().isEmpty());\n assertEquals(1, condition.getCasp().size());\n assertTrue(condition.getCasp().contains(\"D01\"));\n assertEquals(condition.getCeg(), \"101\");\n assertEquals(Severity.NOTIFIABLE, condition.getSeverity());\n assertEquals(Boolean.TRUE, condition.getEnabled());\n\n assertNotNull(condition.toString());\n }", "List<Condition> conditionToFindConflict(final P entity);", "@Override\n\tpublic Collection<PossibleDisease> findPossible(Collection<Symptom> symptoms) {\n\t\tKieServices ks = KieServices.Factory.get();\n\t\tKieBaseConfiguration kbconf = ks.newKieBaseConfiguration();\n\t\tkbconf.setOption(EventProcessingOption.STREAM);\n\t\tKieBase kbase = kieContainer.newKieBase(kbconf);\n\n\t\tKieSession kieSession = kbase.newKieSession();\n\t\tCollection<Disease> all = diseaseRepository.findAll();\n\t\tfor (Disease d : all) {\n\t\t\tkieSession.insert(d);\n\t\t}\n\t\tQueryResults results = kieSession.getQueryResults(\"Bolesti koje sadrze simptome\", symptoms);\n\t\t\n\t\tArrayList<PossibleDisease> retVal = new ArrayList<>();\n\t\tfor(QueryResultsRow qrr : results) {\n\t\t\tDisease d = (Disease) qrr.get(\"$d\");\n\t\t\tlong num = (long) qrr.get(\"$nSymptoms\");\n\t\t\tretVal.add(new PossibleDisease(num, 0L, d));\n\t\t}\n\t\tkieSession.dispose();\n\t\tCollections.sort(retVal, new Comparator<PossibleDisease>() {\n\t\t\t\t\t\tpublic int compare(PossibleDisease o1, PossibleDisease o2) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn -Long.compare(o1.getNumSymptoms(), o2.getNumSymptoms());\n\t\t\t\t\t\t}\n \t\t\t} \n\t\t\t\t);\n\t\treturn retVal;\n\t}", "void modusponens(){\n\t\tHashMap<String,HashSet<Hypothesis> > temp_lhs_hypo = new HashMap<String,HashSet<Hypothesis> >();\n\t\tHashSet<Hypothesis> new_hypos = new HashSet<Hypothesis>();\n\t\t\n\t\t//Utils.println(\"hypothesis list\");\n\t\tIterator it = hypothesis.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t String A = (String)pairs.getKey();\n\t //Utils.println(\"hypothesis A : \"+A);\n\t HashSet<Hypothesis> A_B = new_lhs_hypo.get(A);\n\t if(A_B == null) {\n\t \t//Utils.println(\"No match\");\n\t \tcontinue;\n\t \t}\n\t else{\n\t \t//Utils.println(\"Matched: \"+A_B.size());\n\t \tIterator bit = A_B.iterator();\n\t \twhile (bit.hasNext()) {\n\t \t Hypothesis A_B_hypo = (Hypothesis)bit.next();\n\t\t \tHypothesis mp_hypo = makeHypothesis(A_B_hypo.rhs, 1, -1, A, A_B_hypo.expression);\n\t\t \tif(mp_hypo!=null) {\n\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t \t\t//Utils.println(\"Existing MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t \t\t//already existing\n\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t \t//Utils.println(\"New MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t\t }\n\t\t \t}else{\n\t\t \t\t//Utils.println(\"MP Not Valid: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t \t}\n\t\t }\n\t }\n\t }\n\t \n\t //Utils.println(\"new hypothesis list\");\n\t it = new_lhs_hypo.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t HashSet<Hypothesis> hypos = (HashSet<Hypothesis>) pairs.getValue();\n\t Iterator<Hypothesis> Ait = hypos.iterator();\n\t while(Ait.hasNext()){\n\t \tString A = ((Hypothesis)Ait.next()).expression;\n\t \t//Utils.println(\"hypothesis A : \"+A);\n\t \tHashSet<String> B_set = lhs_hypo.get(A);\n\t \tif(B_set == null){\n\t \t\t//Utils.println(\"No match\");\n\t \t\tcontinue;\n\t \t\t}\n\t \telse{\n\t \t\t//Utils.println(\"Matched: \"+B_set.size());\n\t \t\tIterator Bit = B_set.iterator();\n\t\t \twhile(Bit.hasNext()){\n\t\t \t\tString B_str = (String) Bit.next();\n\t\t \t\tString A_B_exp = Utils.expression(A, B_str);\n\t\t \t\tHypothesis mp_hypo = makeHypothesis(B_str, 1, -1, A, A_B_exp);\n\t\t \t\tif(mp_hypo!=null) {\n\t\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t\t \t\t//Utils.println(\"Existing MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t \t\t//already existing\n\t\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t\t \t//Utils.println(\"New MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t\t }\n\t\t\t \t}else{\n\t\t\t \t\t//Utils.println(\"MP Not Valid: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t \t\n\t }\n\t }\n\t \n\t //Utils.println(\"Size of new_hypos: \"+new_hypos.size());\n\t \n\t Iterator<Hypothesis> hit = new_hypos.iterator();\n\t while(hit.hasNext()){\n\t \tHypothesis mp_hypo = hit.next();\n\t \tboolean b = insertHypothesis(mp_hypo);\n\t \tif(b){\n\t \t\tHashSet<Hypothesis> temp_hypos = temp_lhs_hypo.get(mp_hypo.lhs);\n\t \tif(temp_hypos == null){\n\t \t\ttemp_hypos = new HashSet<Hypothesis>();\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t\ttemp_lhs_hypo.put(mp_hypo.lhs, temp_hypos);\n\t \t}else{\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t}\n\t \t//Utils.printHypothesis(mp_hypo);\n\t \t}\n\t }\n\t \n\n\t //Utils.println(\"Size of temp_lhs_hypo: \"+temp_lhs_hypo.size());\n\t \n\t new_lhs_hypo.clear();\n\t new_lhs_hypo = temp_lhs_hypo;\n\t if(new_lhs_hypo.size()!=0) modusponens();\n\t}", "public String toString(){\r\n\t\tString cons = \"Conditions\\n\";\r\n\t\t//enhanced for loop could also be used\r\n\t\tfor(int i = 0; i<conditions.size(); i++){\r\n\t\t\tcons += conditions.get(i).getName()+\"\\n\";\r\n\t\t}\r\n\t\treturn \"Name : \" + fname + \" \" + lname+\"\\nDate Of Birth: \" + age+ \"\\n\" + cons; \r\n\t}", "private Map<String, Object> slouchMap(ArrayList<Date> times, ArrayList<Double> slouches) {\n Map<String, Object> map = new HashMap<>();\n map.put(USER_SLOUCHES, slouches);\n map.put(TIMES, slouches);\n return map;\n }", "private Calendar constructPrincipleSymptomsDate() {\n\t\tCalendar psd = null ;\n\n\t\t//\n\t\t// This is a painfully inefficient way of doing it.\n\t\t// Optimization can wait until later!\n\t\tString sEpiSymponset, sEpiSymponsetHour, sEpiSymponsetMin ;\n\t\tString sEpiSymponsetYear, sEpiSymponsetMonth ;\n\n\t\tsEpiSymponset = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset\" ) ;\n\t\tif( sEpiSymponset != null ) {\n\t\t\tsEpiSymponset = od2p.getCorrectedDateTimeValueFromString( sEpiSymponset ) ;\n\t\t\tsEpiSymponsetHour = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_hour\" ) ;\n\t\t\tsEpiSymponsetMin = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_min\" ) ;\n\n\t\t\tXmlDateTime dt = XmlDateTime.Factory.newInstance() ;\n\t\t\tdt.setStringValue( sEpiSymponset ) ;\n\t\t\tpsd = dt.getCalendarValue() ;\n\t\t\tif( sEpiSymponsetHour != null && sEpiSymponsetMin != null) {\n\t\t\t\tpsd.set( Calendar.HOUR_OF_DAY, Integer.valueOf( sEpiSymponsetHour ) ) ;\n\t\t\t\tpsd.set( Calendar.MINUTE, Integer.valueOf( sEpiSymponsetMin ) ) ;\n\t\t\t}\n\t\t\tlog.debug( \"Principle symptoms date. Route1. \" + psd.toString() ) ;\n\t\t\treturn psd ;\n\t\t}\n\t\tsEpiSymponsetYear = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_year\" ) ;\n\t\tif( sEpiSymponsetYear != null ) {\n\t\t\tsEpiSymponsetMonth = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_month\" ) ;\n\t\t\tpsd = Calendar.getInstance() ;\n\t\t\tpsd.setTimeInMillis( 0 ) ;\n\t\t\tpsd.set( Integer.valueOf( sEpiSymponsetYear ), Integer.valueOf( sEpiSymponsetMonth ), 1, 0, 0) ;\n\t\t\tlog.debug( \"Principle symptoms date. Route2. \" + psd.toString() ) ;\n\t\t\treturn psd ;\n\t\t}\n\t\tlog.debug( \"Principle symptoms date. Route3. \" + psd ) ;\n\t\treturn psd ;\t\n\t}", "private String E19Conditions() {\n StringBuilder buffer = new StringBuilder();\n int numCols = 60;\n int leftMargin = 17;\n String tmp1 = \" \";\n String tmp2 = \" \";\n String tmp3 = \" \";\n String indent = \"\";\n for (int i = 0; i < leftMargin; i++) {\n indent = indent.concat(\" \");\n }\n buffer.append(\"\\f\");\n buffer.append(TextReportConstants.E19_HDR_CONDITIONS + \"\\n\\n\");\n\n TextReportData data = TextReportDataManager.getInstance()\n .getDataForReports(lid, 0);\n\n if (data.getRiverstat().getMile() != HydroConstants.MISSING_VALUE) {\n tmp1 = String.format(\"%-6.1f\", data.getRiverstat().getMile());\n }\n if (data.getRiverstat().getDa() != HydroConstants.MISSING_VALUE) {\n tmp2 = String.format(\"%-6.1f\", data.getRiverstat().getDa());\n }\n if (data.getRiverstat().getPool() != HydroConstants.MISSING_VALUE) {\n tmp3 = String.format(\"%-6.1f\", data.getRiverstat().getPool());\n }\n\n buffer.append(String.format(\n \" MILES ABOVE MOUTH: %s%sDRAINAGE AREA: %s%sPOOL STAGE: %s\",\n tmp1, \" \", tmp2, \" \", tmp3));\n buffer.append(\"\\n\\n\\n\");\n\n buffer.append(\" STREAM BED: \");\n\n if (data.getDescrip().getBed() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getBed(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" REACH: \");\n if (data.getDescrip().getReach() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getReach(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" REGULATION: \");\n if (data.getDescrip().getRes() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getRes(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" DIVERSION: \");\n if (data.getDescrip().getDivert() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getDivert(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" WINTER: \");\n if (data.getDescrip().getIce() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getIce(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" TOPOGRAPHY: \");\n if (data.getDescrip().getTopo() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getTopo(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n buffer.append(\" REMARKS: \");\n if (data.getDescrip().getRemark() != null) {\n String[] lines = TextUtil.wordWrap(data.getDescrip().getRemark(),\n numCols, 0);\n buffer.append(lines[0] + \"\\n\");\n for (int i = 1; i < lines.length; i++) {\n if ((i != (lines.length - 1))\n && (!lines[i].trim().equalsIgnoreCase(\"\"))) {\n buffer.append(\" \" + lines[i] + \"\\n\");\n }\n }\n } else {\n buffer.append(\"\\n\");\n }\n buffer.append(\"\\n\");\n\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(0, buffer.toString()));\n\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\")).getTime();\n String footer = createFooter(data, E19_RREVISE_TYPE, sdf.format(d),\n \"NWS FORM E-19\", E19_CONDITIONS, \"CONDITIONS\", null,\n E19_STANDARD_LEFT_MARGIN);\n buffer.append(footer);\n\n return buffer.toString();\n }", "@External(readonly = true)\n\tpublic Map<String, String> get_yesterdays_games_excess(){\n\t\t\n\t\treturn this.get_games_excess(BigInteger.ONE.negate());\n\t}", "public String toString()\n\t{\n\t\tStringBuilder sb = new StringBuilder(\"Suspect: \");\n\t\t\n\t\tsb.append(\"disease = \").append(disease).append(\"; \");\n\t\tsb.append(\"visit = \").append(visit).append(\".\");\n\t\t\n\t\treturn sb.toString();\n\t}", "public static List<Question> getQuestions() {\n if (QUESTION == null) {\n QUESTION = new ArrayList<>();\n List<Option> options = new ArrayList<Option>();\n options.add(new Option(1, \"Radio Waves\"));\n options.add(new Option(2, \"Sound Waves\"));\n options.add(new Option(3, \"Gravity Waves\"));\n options.add(new Option(4, \"Light Waves\"));\n QUESTION.add(new Question(1, \"Which kind of waves are used to make and receive cellphone calls?\", getCategory(4), options, options.get(0)));\n\n List<Option> options2 = new ArrayList<Option>();\n options2.add(new Option(1, \"8\"));\n options2.add(new Option(2, \"6\"));\n options2.add(new Option(3, \"3\"));\n options2.add(new Option(4, \"1\"));\n QUESTION.add(new Question(2, \"How many hearts does an octopus have?\", getCategory(4), options2, options2.get(2)));\n\n List<Option> options3 = new ArrayList<Option>();\n options3.add(new Option(1, \"Newton's Law\"));\n options3.add(new Option(2, \"Hooke's law\"));\n options3.add(new Option(3, \"Darwin's Law\"));\n options3.add(new Option(4, \"Archimedes' principle\"));\n QUESTION.add(new Question(3, \"Whose law states that the force needed to extend a spring by some distance is proportional to that distance?\", getCategory(4), options3, options3.get(1)));\n\n List<Option> options4 = new ArrayList<Option>();\n options4.add(new Option(1, \"M\"));\n options4.add(new Option(2, \"$\"));\n options4.add(new Option(3, \"W\"));\n options4.add(new Option(4, \"#\"));\n QUESTION.add(new Question(4, \"What is the chemical symbol for tungsten?\", getCategory(4), options4, options4.get(2)));\n\n List<Option> options5 = new ArrayList<Option>();\n options5.add(new Option(1, \"Pulsar\"));\n options5.add(new Option(2, \"Draconis\"));\n options5.add(new Option(3, \"Aludra\"));\n options5.add(new Option(4, \"Alwaid\"));\n QUESTION.add(new Question(5, \"What is a highly magnetized, rotating neutron star that emits a beam of electromagnetic radiation?\", getCategory(4), options5, options5.get(0)));\n\n List<Option> options6 = new ArrayList<Option>();\n options6.add(new Option(1, \"2\"));\n options6.add(new Option(2, \"4\"));\n options6.add(new Option(3, \"7\"));\n options6.add(new Option(4, \"10\"));\n QUESTION.add(new Question(6, \"At what temperature is Centigrade equal to Fahrenheit?\", getCategory(4), options6, options6.get(2)));\n\n List<Option> options7 = new ArrayList<Option>();\n options7.add(new Option(1, \"Temperature\"));\n options7.add(new Option(2, \"Distance\"));\n options7.add(new Option(3, \"Light Intensity\"));\n options7.add(new Option(4, \"Noise\"));\n QUESTION.add(new Question(7, \"Kelvin is a unit to measure what?\", getCategory(4), options7, options7.get(2)));\n\n List<Option> options8 = new ArrayList<Option>();\n options8.add(new Option(1, \"Mars\"));\n options8.add(new Option(2, \"Jupiter\"));\n options8.add(new Option(3, \"Saturn\"));\n options8.add(new Option(4, \"Neptune\"));\n QUESTION.add(new Question(8, \"Triton is the largest moon of what planet?\", getCategory(4), options8, options8.get(3)));\n\n List<Option> options9 = new ArrayList<Option>();\n options9.add(new Option(1, \"Brain\"));\n options9.add(new Option(2, \"Heart\"));\n options9.add(new Option(3, \"Lungs\"));\n options9.add(new Option(4, \"Skin\"));\n QUESTION.add(new Question(9, \"What is the human body’s biggest organ?\", getCategory(4), options9, options9.get(3)));\n\n List<Option> options10 = new ArrayList<Option>();\n options10.add(new Option(1, \"Skull\"));\n options10.add(new Option(2, \"Knee Cap\"));\n options10.add(new Option(3, \"Shoulder Joint\"));\n options10.add(new Option(4, \"Backbone\"));\n QUESTION.add(new Question(10, \"What is the more common name for the patella?\", getCategory(4), options10, options10.get(1)));\n\n List<Option> options11 = new ArrayList<Option>();\n options11.add(new Option(1, \"Mother India\"));\n options11.add(new Option(2, \"The Guide\"));\n options11.add(new Option(3, \"Madhumati\"));\n options11.add(new Option(4, \"Amrapali\"));\n QUESTION.add(new Question(11, \"Which was the 1st Indian movie submitted for Oscar?\", getCategory(1), options11, options11.get(0)));\n\n List<Option> options12 = new ArrayList<Option>();\n options12.add(new Option(1, \"Gunda\"));\n options12.add(new Option(2, \"Sholey\"));\n options12.add(new Option(3, \"Satte pe Satta\"));\n options12.add(new Option(4, \"Angoor\"));\n QUESTION.add(new Question(12, \"Which film is similar to Seven Brides For Seven Brothers?\", getCategory(1), options12, options12.get(2)));\n\n List<Option> options13 = new ArrayList<Option>();\n options13.add(new Option(1, \"Rocky\"));\n options13.add(new Option(2, \"Pancham\"));\n options13.add(new Option(3, \"Chichi\"));\n options13.add(new Option(4, \"Chintu\"));\n QUESTION.add(new Question(13, \"Music Director R.D. Burman is also known as?\", getCategory(1), options13, options13.get(1)));\n\n List<Option> options14 = new ArrayList<Option>();\n options14.add(new Option(1, \"Nagarjuna\"));\n options14.add(new Option(2, \"Chiranjeevi\"));\n options14.add(new Option(3, \"Rajinikanth\"));\n options14.add(new Option(4, \"NTR\"));\n QUESTION.add(new Question(14, \"Shivaji Rao Gaikwad is the real name of which actor?\", getCategory(1), options14, options14.get(2)));\n\n List<Option> options15 = new ArrayList<Option>();\n options15.add(new Option(1, \"Geraftaar\"));\n options15.add(new Option(2, \"Hum\"));\n options15.add(new Option(3, \"Andha kanoon\"));\n options15.add(new Option(4, \"Agneepath\"));\n QUESTION.add(new Question(15, \"Name the film in which Amitabh Bachchan, Rajinikanth and Kamal Hasan worked together.\", getCategory(1), options15, options15.get(0)));\n\n List<Option> options16 = new ArrayList<Option>();\n options16.add(new Option(1, \"AR Rahman\"));\n options16.add(new Option(2, \"Bhanu Athaiya\"));\n options16.add(new Option(3, \"Gulzar\"));\n options16.add(new Option(4, \"Rasul Pookutty\"));\n QUESTION.add(new Question(16, \"First Indian to win Oscar award?\", getCategory(1), options16, options16.get(1)));\n\n List<Option> options17 = new ArrayList<Option>();\n options17.add(new Option(1, \"Jab tak hai jaan\"));\n options17.add(new Option(2, \"Rab ne bana di jodi\"));\n options17.add(new Option(3, \"Veer zara\"));\n options17.add(new Option(4, \"Ek tha tiger\"));\n QUESTION.add(new Question(17, \"Which was the last movie directed by Yash Chopra?\", getCategory(1), options17, options17.get(0)));\n\n\n List<Option> options18 = new ArrayList<Option>();\n options18.add(new Option(1, \"‘Thala’ Ajith\"));\n options18.add(new Option(2, \"Arjun Sarja\"));\n options18.add(new Option(3, \"Ashutosh Gawariker\"));\n options18.add(new Option(4, \"AK Hangal\"));\n QUESTION.add(new Question(18, \"\\\"Itna sannata kyun hai bhai?\\\" Who said this, now legendary words, in 'Sholay'?\", getCategory(1), options18, options18.get(3)));\n\n List<Option> options19 = new ArrayList<Option>();\n options19.add(new Option(1, \"Tommy\"));\n options19.add(new Option(2, \"Tuffy\"));\n options19.add(new Option(3, \"Toffy\"));\n options19.add(new Option(4, \"Timmy\"));\n QUESTION.add(new Question(19, \"What was the name of Madhuri Dixit’s dog in Hum Aapke Hain Koun?\", getCategory(1), options19, options19.get(1)));\n\n List<Option> options20 = new ArrayList<Option>();\n options20.add(new Option(1, \"Premnath\"));\n options20.add(new Option(2, \"Dilip Kumar\"));\n options20.add(new Option(3, \"Raj Kapoor\"));\n options20.add(new Option(4, \"Kishore Kumar\"));\n QUESTION.add(new Question(20, \"Beautiful actress Madhubala was married to?\", getCategory(1), options20, options20.get(3)));\n\n\n List<Option> options21 = new ArrayList<Option>();\n options21.add(new Option(1, \"Sher Khan\"));\n options21.add(new Option(2, \"Mufasa\"));\n options21.add(new Option(3, \"Simba\"));\n options21.add(new Option(4, \"Sarabi\"));\n QUESTION.add(new Question(21, \"What is the name of the young lion whose story is told in the musical 'The Lion King'?\", getCategory(2), options21, options21.get(2)));\n\n List<Option> options22 = new ArrayList<Option>();\n options22.add(new Option(1, \"Scotland\"));\n options22.add(new Option(2, \"England\"));\n options22.add(new Option(3, \"Germany\"));\n options22.add(new Option(4, \"Netherland\"));\n QUESTION.add(new Question(22, \"Which country's freedom struggle is portrayed in the Mel Gibson movie 'Braveheart'?\", getCategory(2), options22, options22.get(0)));\n\n List<Option> options23 = new ArrayList<Option>();\n options23.add(new Option(1, \"Letters to Juliet\"));\n options23.add(new Option(2, \"Saving Private Ryan\"));\n options23.add(new Option(3, \"Forest Gump\"));\n options23.add(new Option(4, \"Gone With The Wind\"));\n QUESTION.add(new Question(23, \"Which movie had this dialogue \\\"My mama always said, life was like a box of chocolates. You never know what you're gonna get.\", getCategory(2), options23, options23.get(2)));\n\n List<Option> options24 = new ArrayList<Option>();\n options24.add(new Option(1, \"Die\"));\n options24.add(new Option(2, \"Golden\"));\n options24.add(new Option(3, \"Casino\"));\n options24.add(new Option(4, \"Never\"));\n QUESTION.add(new Question(24, \"Excluding \\\"the\\\", which word appears most often in Bond movie titles?\", getCategory(2), options24, options24.get(3)));\n\n List<Option> options25 = new ArrayList<Option>();\n options25.add(new Option(1, \"Bishop\"));\n options25.add(new Option(2, \"Ash\"));\n options25.add(new Option(3, \"Call\"));\n options25.add(new Option(4, \"Carlos\"));\n QUESTION.add(new Question(25, \"Name the android in movie Alien \", getCategory(2), options25, options25.get(1)));\n\n List<Option> options26 = new ArrayList<Option>();\n options26.add(new Option(1, \"Gone with the wind\"));\n options26.add(new Option(2, \"Home footage\"));\n options26.add(new Option(3, \"With Our King and Queen Through India\"));\n options26.add(new Option(4, \"Treasure Island\"));\n QUESTION.add(new Question(26, \"Which was the first colour film to win a Best Picture Oscar?\", getCategory(2), options26, options26.get(0)));\n\n List<Option> options27 = new ArrayList<Option>();\n options27.add(new Option(1, \"Robert Redford\"));\n options27.add(new Option(2, \"Michael Douglas\"));\n options27.add(new Option(3, \"Harrison Ford\"));\n options27.add(new Option(4, \"Patrick Swayze\"));\n QUESTION.add(new Question(27, \"Who played the male lead opposite Sharon Stone in the hugely successful movie 'The Basic Instinct'?\", getCategory(2), options27, options27.get(1)));\n\n List<Option> options28 = new ArrayList<Option>();\n options28.add(new Option(1, \"10,000 BC\"));\n options28.add(new Option(2, \"Day after tomorrow\"));\n options28.add(new Option(3, \"2012\"));\n options28.add(new Option(4, \"The Noah's Ark Principle\"));\n QUESTION.add(new Question(28, \"Which Roland Emmerich movie portrays fictional cataclysmic events that were to take place in early 21st century?\", getCategory(2), options28, options28.get(2)));\n\n List<Option> options29 = new ArrayList<Option>();\n options29.add(new Option(1, \"Finding Nemo\"));\n options29.add(new Option(2, \"The Incredibles\"));\n options29.add(new Option(3, \"Monsters, Inc.\"));\n options29.add(new Option(4, \"Toy Story\"));\n QUESTION.add(new Question(29, \"What was the first movie by Pixar to receive a rating higher than G in the United States?\", getCategory(2), options29, options29.get(1)));\n\n List<Option> options30 = new ArrayList<Option>();\n options30.add(new Option(1, \"Draco\"));\n options30.add(new Option(2, \"Harry\"));\n options30.add(new Option(3, \"Hermione\"));\n options30.add(new Option(4, \"Ron\"));\n QUESTION.add(new Question(30, \"In the 'Prisoner of Azkaban', who throws rocks at Hagrid's hut so that Harry, Ron and Hermione can leave?\", getCategory(2), options30, options30.get(2)));\n\n List<Option> options31 = new ArrayList<Option>();\n options31.add(new Option(1, \"Brett Lee\"));\n options31.add(new Option(2, \"Adam Gilchrist\"));\n options31.add(new Option(3, \"Jason Gillespie\"));\n options31.add(new Option(4, \"Glenn McGrath\"));\n QUESTION.add(new Question(31, \"'Dizzy' is the nickname of what Australian player?\", getCategory(3), options31, options31.get(2)));\n\n List<Option> options32 = new ArrayList<Option>();\n options32.add(new Option(1, \"1883 between Australia and Wales\"));\n options32.add(new Option(2, \"1844 between Canada and the USA\"));\n options32.add(new Option(3, \"1869 between England and Australia\"));\n options32.add(new Option(4, \"1892 between England and India\"));\n QUESTION.add(new Question(32, \"In what year was the first international cricket match held?\", getCategory(3), options32, options32.get(1)));\n\n List<Option> options33 = new ArrayList<Option>();\n options33.add(new Option(1, \"Salim Durrani\"));\n options33.add(new Option(2, \"Farooq Engineer\"));\n options33.add(new Option(3, \"Vijay Hazare\"));\n options33.add(new Option(4, \"Mansur Ali Khan Pataudi\"));\n QUESTION.add(new Question(33, \"Which former Indian cricketer was nicknamed 'Tiger'?\", getCategory(3), options33, options33.get(3)));\n\n List<Option> options34 = new ArrayList<Option>();\n options34.add(new Option(1, \"Piyush Chawla\"));\n options34.add(new Option(2, \"Gautam Gambhir\"));\n options34.add(new Option(3, \"Irfan Pathan\"));\n options34.add(new Option(4, \"Suresh Raina\"));\n QUESTION.add(new Question(34, \"Who was named as the ICC Emerging Player of the Year 2004?\", getCategory(3), options34, options34.get(2)));\n\n List<Option> options35 = new ArrayList<Option>();\n options35.add(new Option(1, \"Subhash Gupte\"));\n options35.add(new Option(2, \"M.L.Jaisimha\"));\n options35.add(new Option(3, \"Raman Lamba\"));\n options35.add(new Option(4, \"Lala Amarnath\"));\n QUESTION.add(new Question(35, \"Which cricketer died on the field in Bangladesh while playing for Abahani Club?\", getCategory(3), options35, options35.get(2)));\n\n List<Option> options36 = new ArrayList<Option>();\n options36.add(new Option(1, \"V. Raju\"));\n options36.add(new Option(2, \"Rajesh Chauhan\"));\n options36.add(new Option(3, \"Arshad Ayub\"));\n options36.add(new Option(4, \"Narendra Hirwani\"));\n QUESTION.add(new Question(36, \"In 1987-88, which Indian spinner took 16 wickets on his Test debut?\", getCategory(3), options36, options36.get(3)));\n\n List<Option> options37 = new ArrayList<Option>();\n options37.add(new Option(1, \"Ravi Shastri\"));\n options37.add(new Option(2, \"Dilip Vengsarkar\"));\n options37.add(new Option(3, \"Sachin Tendulkar\"));\n options37.add(new Option(4, \"Sanjay Manjrekar\"));\n QUESTION.add(new Question(37, \"Which former Indian Test cricketer equalled Gary Sobers world record of six sixes in an over in a Ranji Trophy match?\", getCategory(3), options37, options37.get(0)));\n\n List<Option> options38 = new ArrayList<Option>();\n options38.add(new Option(1, \"Mohsin khan\"));\n options38.add(new Option(2, \"Wasim Akram\"));\n options38.add(new Option(3, \"Naveen Nischol\"));\n options38.add(new Option(4, \"None Of The Above\"));\n QUESTION.add(new Question(38, \"Reena Roy the Indian film actress married a cricketer?\", getCategory(3), options38, options38.get(0)));\n\n List<Option> options39 = new ArrayList<Option>();\n options39.add(new Option(1, \"London, England\"));\n options39.add(new Option(2, \"Mumbai, India\"));\n options39.add(new Option(3, \"Lahore, Pakistan\"));\n options39.add(new Option(4, \"Nairobi, Kenya\"));\n QUESTION.add(new Question(39, \"Where did Yuvraj Singh make his ODI debut?\", getCategory(3), options39, options39.get(3)));\n\n List<Option> options40 = new ArrayList<Option>();\n options40.add(new Option(1, \"Arvind De Silva\"));\n options40.add(new Option(2, \"Roshan Mahanama\"));\n options40.add(new Option(3, \"Harshan Tilakaratne\"));\n options40.add(new Option(4, \"None Of The Above\"));\n QUESTION.add(new Question(40, \"Kapil Dev's 432 (world) record breaking victim was?\", getCategory(3), options40, options40.get(2)));\n\n List<Option> options41 = new ArrayList<Option>();\n options41.add(new Option(1, \"Vatican\"));\n options41.add(new Option(2, \"Iceland\"));\n options41.add(new Option(3, \"Netherlands\"));\n options41.add(new Option(4, \"Hungary\"));\n QUESTION.add(new Question(41, \"Which country has the lowest population density of any country in Europe?\", getCategory(5), options41, options41.get(1)));\n\n List<Option> options42 = new ArrayList<Option>();\n options42.add(new Option(1, \"Cambodia\"));\n options42.add(new Option(2, \"Thailand\"));\n options42.add(new Option(3, \"Mynamar\"));\n options42.add(new Option(4, \"Bhutan\"));\n QUESTION.add(new Question(42, \"Angkor Wat, the largest religious monument in the world, is in which country?\", getCategory(5), options42, options42.get(0)));\n\n List<Option> options43 = new ArrayList<Option>();\n options43.add(new Option(1, \"Southern\"));\n options43.add(new Option(2, \"Northern and Southern\"));\n options43.add(new Option(3, \"Northern\"));\n options43.add(new Option(4, \"None of the above\"));\n QUESTION.add(new Question(43, \"Is the Tropic of Cancer in the northern or southern hemisphere?\", getCategory(5), options43, options43.get(2)));\n\n List<Option> options44 = new ArrayList<Option>();\n options44.add(new Option(1, \"Bangladesh\"));\n options44.add(new Option(2, \"Nepal\"));\n options44.add(new Option(3, \"Pakistan\"));\n options44.add(new Option(4, \"China\"));\n QUESTION.add(new Question(44, \"The Ganges flows through India and which other country?\", getCategory(5), options44, options44.get(0)));\n\n List<Option> options45 = new ArrayList<Option>();\n options45.add(new Option(1, \"Indian\"));\n options45.add(new Option(2, \"Pacific\"));\n options45.add(new Option(3, \"Arctic\"));\n options45.add(new Option(4, \"Atlantic\"));\n QUESTION.add(new Question(45, \"Which ocean lies on the east coast of the United States?\", getCategory(5), options45, options45.get(3)));\n\n List<Option> options46 = new ArrayList<Option>();\n options46.add(new Option(1, \"Prime Axis\"));\n options46.add(new Option(2, \"Lambert Line\"));\n options46.add(new Option(3, \"Prime Meridian\"));\n options46.add(new Option(4, \"Greenwich\"));\n QUESTION.add(new Question(46, \"What is the imaginary line called that connects the north and south pole?\", getCategory(5), options46, options46.get(2)));\n\n List<Option> options47 = new ArrayList<Option>();\n options47.add(new Option(1, \"Tropic of Cancer\"));\n options47.add(new Option(2, \"Tropic of Capricorn\"));\n QUESTION.add(new Question(47, \"The most northerly circle of latitude on the Earth at which the Sun may appear directly overhead at its culmination is called?\", getCategory(5), options47, options47.get(0)));\n\n List<Option> options48 = new ArrayList<Option>();\n options48.add(new Option(1, \"Nevada\"));\n options48.add(new Option(2, \"Arizona\"));\n options48.add(new Option(3, \"New Mexico\"));\n options48.add(new Option(4, \"San Fransisco\"));\n QUESTION.add(new Question(48, \"Which U.S. state is the Grand Canyon located in?\", getCategory(5), options48, options48.get(1)));\n\n List<Option> options49 = new ArrayList<Option>();\n options49.add(new Option(1, \"Indian Ocean\"));\n options49.add(new Option(2, \"Atlantic Ocean\"));\n options49.add(new Option(3, \"Pacific Ocean\"));\n options49.add(new Option(4, \"Arctic Ocean\"));\n QUESTION.add(new Question(49, \"Which is the largest body of water?\", getCategory(5), options49, options49.get(2)));\n\n List<Option> options50 = new ArrayList<Option>();\n options50.add(new Option(1, \"Maldives\"));\n options50.add(new Option(2, \"Monaco\"));\n options50.add(new Option(3, \"Tuvalu\"));\n options50.add(new Option(4, \"Vatican City\"));\n QUESTION.add(new Question(50, \"Which is the smallest country, measured by total land area?\", getCategory(5), options50, options50.get(3)));\n\n List<Option> options51 = new ArrayList<Option>();\n options51.add(new Option(1, \"1923\"));\n options51.add(new Option(2, \"1938\"));\n options51.add(new Option(3, \"1917\"));\n options51.add(new Option(4, \"1914\"));\n QUESTION.add(new Question(51, \"World War I began in which year?\", getCategory(6), options51, options51.get(3)));\n\n List<Option> options52 = new ArrayList<Option>();\n options52.add(new Option(1, \"France\"));\n options52.add(new Option(2, \"Germany\"));\n options52.add(new Option(3, \"Austria\"));\n options52.add(new Option(4, \"Hungary\"));\n QUESTION.add(new Question(52, \"Adolf Hitler was born in which country?\", getCategory(6), options52, options52.get(2)));\n\n List<Option> options53 = new ArrayList<Option>();\n options53.add(new Option(1, \"1973\"));\n options53.add(new Option(2, \"Austin\"));\n options53.add(new Option(3, \"Dallas\"));\n options53.add(new Option(4, \"1958\"));\n QUESTION.add(new Question(53, \"John F. Kennedy was assassinated in?\", getCategory(6), options53, options53.get(2)));\n\n List<Option> options54 = new ArrayList<Option>();\n options54.add(new Option(1, \"Johannes Gutenburg\"));\n options54.add(new Option(2, \"Benjamin Franklin\"));\n options54.add(new Option(3, \"Sir Isaac Newton\"));\n options54.add(new Option(4, \"Martin Luther\"));\n QUESTION.add(new Question(54, \"The first successful printing press was developed by this man.\", getCategory(6), options54, options54.get(0)));\n\n List<Option> options55 = new ArrayList<Option>();\n options55.add(new Option(1, \"The White Death\"));\n options55.add(new Option(2, \"The Black Plague\"));\n options55.add(new Option(3, \"Smallpox\"));\n options55.add(new Option(4, \"The Bubonic Plague\"));\n QUESTION.add(new Question(55, \"The disease that ravaged and killed a third of Europe's population in the 14th century is known as\", getCategory(6), options55, options55.get(3)));\n\n List<Option> options56 = new ArrayList<Option>();\n options56.add(new Option(1, \"Panipat\"));\n options56.add(new Option(2, \"Troy\"));\n options56.add(new Option(3, \"Waterloo\"));\n options56.add(new Option(4, \"Monaco\"));\n QUESTION.add(new Question(56, \"Napoleon was finally defeated at the battle known as?\", getCategory(6), options56, options56.get(2)));\n\n List<Option> options57 = new ArrayList<Option>();\n options57.add(new Option(1, \"Magellan\"));\n options57.add(new Option(2, \"Cook\"));\n options57.add(new Option(3, \"Marco\"));\n options57.add(new Option(4, \"Sir Francis Drake\"));\n QUESTION.add(new Question(57, \"Who was the first Western explorer to reach China?\", getCategory(6), options57, options57.get(2)));\n\n List<Option> options58 = new ArrayList<Option>();\n options58.add(new Option(1, \"Shah Jahan\"));\n options58.add(new Option(2, \"Chandragupta Maurya\"));\n options58.add(new Option(3, \"Humayun\"));\n options58.add(new Option(4, \"Sher Shah Suri\"));\n QUESTION.add(new Question(58, \"Who built the Grand Trunk Road?\", getCategory(6), options58, options58.get(3)));\n\n List<Option> options59 = new ArrayList<Option>();\n options59.add(new Option(1, \"Jawaharlal Nehru\"));\n options59.add(new Option(2, \"M. K. Gandhi\"));\n options59.add(new Option(3, \"Dr. Rajendra Prasad\"));\n options59.add(new Option(4, \"Dr. S. Radhakrishnan\"));\n QUESTION.add(new Question(59, \"Who was the first President of India?\", getCategory(6), options59, options59.get(2)));\n\n List<Option> options60 = new ArrayList<Option>();\n options60.add(new Option(1, \"8\"));\n options60.add(new Option(2, \"10\"));\n options60.add(new Option(3, \"5\"));\n options60.add(new Option(4, \"18\"));\n QUESTION.add(new Question(60, \"How many days did the battle of Mahabharata last?\", getCategory(6), options60, options60.get(3)));\n }\n return QUESTION;\n }", "@Override\n public VictoryConditionDetails getDetails() {\n Map<String, String> info = new LinkedHashMap<>();\n\n VictoryConditionDetails details = new VictoryConditionDetails();\n\n details.setKey(title);\n details.setInfo(info);\n\n info.put(\"Description:\", description);\n info.putAll(getShipEventInfo());\n info.put(\"Required Points:\", requiredPoints + \"\");\n\n return details;\n }", "static Set<String> determineCommonConcepts(HashMap<String, HashSet<String>> data) {\n HashSet<String> result = new HashSet<>();\n HashSet<String> alreadyProcessed = new HashSet<>();\n for (HashMap.Entry<String, HashSet<String>> entry : data.entrySet()) {\n for (String concept : entry.getValue()) {\n if (!alreadyProcessed.contains(concept)) {\n // now check whether the current concept is contained everywhere\n boolean isCommonConcept = true;\n for (HashMap.Entry<String, HashSet<String>> entry2 : data.entrySet()) {\n if (!entry2.getValue().contains(concept)) {\n // not a common concept -> leave for loop early\n isCommonConcept = false;\n break;\n }\n }\n if (isCommonConcept) {\n result.add(concept);\n }\n alreadyProcessed.add(concept);\n }\n }\n }\n return result;\n }", "private void fillTrialConditionsData() {\n List<Condition> trialConditions = new ArrayList<Condition>();\n\n int instanceCounter = 1;\n for (Condition condition : this.workbookStudy.getConditions()) {\n if (condition.getDataType().equals(DATA_TYPE_CHAR)) {\n// LevelC levelCFilter = new LevelC(true);\n// LevelCPK levelCPK = new LevelCPK();\n// levelCPK.setLabelid(condition.getLabelId());\n// levelCFilter.setFactorid(condition.getFactorId());\n// levelCFilter.setLevelCPK(levelCPK);\n// List<LevelC> levelCList = this.servicioApp.getListLevelC(levelCFilter, 0, 0, false);\n List<LevelC> levelCList = condition.getFactor().getLevelsC();\n instanceCounter = 1;\n for (LevelC levelC : levelCList) {\n try {\n Condition conditionToAdd = new Condition();\n BeanUtilsBean.getInstance().copyProperties(conditionToAdd, condition);\n conditionToAdd.setValue(levelC.getLvalue());\n conditionToAdd.setInstance(instanceCounter);\n conditionToAdd.setLevelNo(levelC.getLevelCPK().getLevelno());\n trialConditions.add(conditionToAdd);\n instanceCounter++;\n } catch (IllegalAccessException ex) {\n Exceptions.printStackTrace(ex);\n } catch (InvocationTargetException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n } else if (condition.getDataType().equals(DATA_TYPE_NUMERIC)) {\n// LevelN levelNFilter = new LevelN(true);\n// LevelNPK levelnPK = new LevelNPK();\n// levelnPK.setLabelid(condition.getLabelId());\n// levelNFilter.setFactorid(condition.getFactorId());\n// levelNFilter.setLevelNPK(levelnPK);\n// List<LevelN> levelNList = this.servicioApp.getListLevelN(levelNFilter, 0, 0, false);\n List<LevelN> levelNList = condition.getFactor().getLevelsN();\n instanceCounter = 1;\n for (LevelN levelN : levelNList) {\n try {\n Condition conditionToAdd = new Condition();\n BeanUtilsBean.getInstance().copyProperties(conditionToAdd, condition);\n conditionToAdd.setValue(DecimalUtils.getValueAsString(levelN.getLvalue()));\n conditionToAdd.setInstance(instanceCounter);\n conditionToAdd.setLevelNo(levelN.getLevelNPK().getLevelno());\n trialConditions.add(conditionToAdd);\n instanceCounter++;\n } catch (IllegalAccessException ex) {\n Exceptions.printStackTrace(ex);\n } catch (InvocationTargetException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n }\n }\n\n Comparator<Condition> conditionComparator = new Comparator<Condition>() {\n\n @Override\n public int compare(Condition o1, Condition o2) {\n return o1.getInstance().compareTo(o2.getInstance());\n }\n };\n\n Collections.sort(trialConditions, conditionComparator);\n\n this.workbookStudy.setConditionsData(trialConditions);\n }", "public static String [] getCond(){\n\t\treturn conditions;\n\t}", "private Map<WhatifConsequence, AxiomPriority> prepareAssertionConsequences(OWLEntity entity,\n\t\t\tSet<OWLEntity> selectedinselector) {\n\t\tSet<WhatifConsequence> asserted = new HashSet<>(this.consequences_asserted);\n\t\tMap<WhatifConsequence, AxiomPriority> infs = new HashMap<>();\n\t\tif (cb_selected.isSelected()) {\n\t\t\tfilterAxiomsByEntity(asserted, Collections.singleton(entity));\n\t\t} else if (!selectedinselector.isEmpty()) {\n\t\t\tfilterAxiomsByEntity(asserted, selectedinselector);\n\t\t}\n\t\tfor (WhatifConsequence con : asserted) {\n\t\t\t// SysteEntailm.out.println(con);\n\t\t\tAxiomPriority prio = getPriority(con);\n\t\t\tif (prio != AxiomPriority.REMOVE) {\n\t\t\t\tinfs.put(con, prio);\n\t\t\t}\n\t\t}\n\t\treturn infs;\n\t}", "public CWE[] getSubstanceTreatmentRefusalReason() {\r\n \tCWE[] retVal = this.getTypedField(18, new CWE[0]);\r\n \treturn retVal;\r\n }", "public HashMap<String, Shelter> getByRestriction(CharSequence gender, CharSequence age,\n CharSequence name){\n HashMap<String, Shelter> searchedList = shelters;\n if (!(gender == null)) {\n Set entries = searchedList.entrySet();\n for(Iterator<Map.Entry<String, Shelter>> it = entries.iterator();\n it.hasNext(); ) {\n Map.Entry<String, Shelter> entry = it.next();\n Shelter shelter = entry.getValue();\n String genderVal = shelter.getGender();\n if (!genderVal.contains(gender) && (genderVal.contains(\"Men\")\n || genderVal.contains(\"Women\"))){\n it.remove();\n }\n }\n }\n if (!(age == null)) {\n Set entries = searchedList.entrySet();\n for(Iterator<Map.Entry<String, Shelter>> it = entries.iterator();\n it.hasNext(); ) {\n Map.Entry<String, Shelter> entry = it.next();\n Shelter shelter = entry.getValue();\n String genderVal = shelter.getGender();\n if (!genderVal.contains(age) && (genderVal.contains(\"Children\")\n || genderVal.contains(\"Families w/ newborns\")\n || genderVal.contains(\"Young adults\"))){\n it.remove();\n }\n }\n }\n if (!(name == null)) {\n Set entries = searchedList.entrySet();\n for(Iterator<Map.Entry<String, Shelter>> it = entries.iterator();\n it.hasNext(); ) {\n Map.Entry<String, Shelter> entry = it.next();\n Shelter shelter = entry.getValue();\n String nameVal = shelter.getName();\n if (!nameVal.contains(name)){\n it.remove();\n }\n }\n }\n return searchedList;\n }", "public Map<Integer, String> getSurveysIdsTitles() {\r\n HashMap<Integer, String> surveys = new HashMap<>();\r\n NodeList surveysElements = doc.getElementsByTagName(\"survey\");\r\n \r\n for (int i = 0; i < surveysElements.getLength(); i++) {\r\n Element surveyElement = (Element) surveysElements.item(i);\r\n int sid = Integer.parseInt(surveyElement.getAttribute(\"sid\"));\r\n String title = surveyElement.getElementsByTagName(\"title\").item(0).getTextContent();\r\n surveys.put(sid, title);\r\n }\r\n \r\n return surveys;\r\n }", "protected double[] getTimes() {\n String vname = getTimeVarName(); //original time variable name\n double[] values = getValues(vname);\n return values;\n }", "private QuotationDetailsDTO[] getQuotationDetails() {\n\t\tQuotationDetailsDTO[] details = null;\n\n\t\tif (gpArticleTable.isVisible()) {\t\t\t\n\t\t\tdetails = getQuotationDetailsForMixedArticle();\n\t\t} else {\t\t\t\n\t\t\tdetails = new QuotationDetailsDTO[1];\n\t\t\tdetails[0] = getQuotationDetailsDTO();\n\t\t}\n\t\t\n\t\treturn details;\n\t}", "public static ArrayList<Patient> getPatientsFromMedic(Medic medic) {\n ArrayList<Patient> tempPatientList = new ArrayList<>();\n for (Patient patient :\n patients\n ) {\n for (Consultation consultation :\n patient.getMedicalFile().getConsultationsList()\n ) {\n if (consultation.getMedicId() == medic.getMedicDetails().getMedicId()) {\n tempPatientList.add(patient);\n break;\n }\n }\n }\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(new Object() {\n }.getClass().getEnclosingMethod().getName()).append(\",\").append(new Timestamp(System.currentTimeMillis()));\n writeToAudit(stringBuilder);\n return tempPatientList;\n }", "public Map<String ,String> GerRegularQ(int AssessmentId) {\n Map<String, String> map = new HashMap<String, String>();\n List<String> indexes = GetAssessmentIndexes(AssessmentId);\n\n for (String index : indexes) {\n try {\n Statement stmt = Con.createStatement();\n String query = String.format(\"SELECT qora, content FROM dqs_qanda WHERE \" +\n \"((SELECT content FROM dqs_qanda WHERE qora = 'question%s_t') = 'n') AND \" +\n \"(qora='question%s' OR qora = 'question%s_c')\", index, index, index);\n //System.out.println(query);\n ResultSet rs = stmt.executeQuery(query);\n while(rs.next()) {\n map.put(rs.getString(\"qora\"), rs.getString(\"content\"));\n }\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n return map;\n }", "public void manageSymptomInput(double input) {\n dataManager.getLast30MinutesActivity();\n if (symptomInputList.size() == 0) {\n// timeStamp = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\", Locale.UK).format(new Date());\n symptom = new Symptom(new Timestamp(System.currentTimeMillis()));\n // A symptom occured. get the weather data and start a timer for ending the registration of a symptom\n dataManager.fetchWeatherData();\n isCountDown = true;\n\n// SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\", Locale.UK);\n\n\n// dataManager.movesStorylineDay(format.format(new Date()),true);\n\n\n countDownTimer = new CountDownTimer(15000, 1000) {\n\n public void onTick(long millisUntilFinished) {\n // If an exception is caught and it is not a network exception try to get weather again\n if (isWeatherException) {\n dataManager.fetchWeatherData();\n }\n Log.i(TAG, \"seconds remaining: \" + millisUntilFinished / 1000);\n }\n\n public void onFinish() {\n// Runnable r = new Runnable() {\n// @Override\n// public void run() {\n// new Handler(Looper.getMainLooper()).post(new Runnable() {\n// @Override\n// public void run() {\n//\n//\n// }\n// });\n// }\n// };\n// new Thread(r).start();\n\n Gson gson = new Gson();\n dataManager.getSymptomContext().deleteObservers();\n String sContext = gson.toJson(dataManager.getSymptomContext(), SymptomContext.class);\n\n symptom.setContext(sContext);\n Log.i(TAG, \"Symptom context: \" + symptom.getContext());\n\n symptom.setIntensity(Collections.max(symptomInputList));\n diary = DiaryManager.getInstance().getActiveDiary();\n symptom.setDiary(diary);\n\n int symptomT = symptomInputList.size() - 1;\n TreeMap<Integer, String> symptomTypes =diary.getSymptomTypes();\n if (!symptomTypes.isEmpty()) {\n for (TreeMap.Entry<Integer, String> st : symptomTypes.entrySet()) {\n int position = st.getKey();\n String type = st.getValue();\n Log.i(TAG, \"symptom type\" + type);\n\n if (position == symptomT) {\n Log.i(TAG, \"symptom type\" + position);\n symptom.setSymptomType(type);\n }\n }\n }\n saveSymptomInput();\n\n\n// //TODO save the completed symptom in the db\n// if (symptom.isValid()) {\n// Log.i(TAG, \"Symptom saved\");\n// }\n isCountDown = false;\n }\n }.start();\n// Log.i(TAG, timeStamp);\n }\n if (symptomInputList.size() < 4) {\n symptomInputList.add(input);\n Log.i(TAG, \" \" + symptomInputList.size());\n } else {\n Log.i(TAG, \"Measurement completed\");\n }\n }", "private ArrayList<ModelSymptom> getAllSymptoms(){\n ArrayList<ModelSymptom> arrayListToReturn = new ArrayList<>();\n arrayListToReturn.addAll(databaseHelper.getAllSymptoms());\n return arrayListToReturn;\n }", "public Condition [] getConditions() {\n return this.Conditions;\n }", "public Map<String, String> getOverdueSkinTests() throws ParseException { //String fullName, String appointmentDate\n List<Consultation> consultations = cService.getDueAppointments();\n System.out.println(\"Getting due appointments, found: \" + consultations.size());\n\n for (Consultation consultation : consultations) {\n\n String fullName = uService.getFullName(consultation.getUsername());\n System.out.println(\"Checking validity of skin test for \" + fullName);\n Boolean hasValidSkinTest = vService.hasValidSkinTest(consultation.getUsername());\n System.out.println(\"Validity = \" + hasValidSkinTest);\n String aptDate = DTConverter.date2string(consultation.getAppointmentDate());\n System.out.println(\"aptDate = \" + aptDate);\n if (!hasValidSkinTest) {\n overdueSkinTests.put(fullName, aptDate);\n }\n }\n\n return overdueSkinTests;\n\n }", "Collection<String> getPossibleDefeatConditions();", "private static void analyse1() {\n\t\tList<String> twoYearIncomeInRateList2 = getTwoYearIncomeInRateList(BasicAnalyse.stockBasicMap.keySet(), 0, 10000, \"2016-4\", \"2015-4\");\r\n\t\tList<String> twoYearIncomeInRateList = getTwoYearIncomeInRateList(twoYearIncomeInRateList2, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoYearProfitInRateList = getTwoYearProfitInRateList(twoYearIncomeInRateList, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoSeasonIncomeInRateList = getTwoSeasonIncomeInRateList(twoYearProfitInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tList<String> twoSeasonProfitInRateList = getTwoSeasonProfitInRateList(twoSeasonIncomeInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tHashMap<String, List<HistoryDomain>> codeHisMap = HistoryAnalyse.getCodeHisMap(HistoryAnalyse.historyMap, twoSeasonProfitInRateList);\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateMap = HistoryAnalyse.getOrderDateMap(codeHisMap);\r\n\t\tHashMap<String, String> dieTingTimeMap = PriceAnalyse.getDieTingLastTimeMap(orderDateMap, 5, -100, -20);\r\n\t\tHashMap<String, String> endDateMap = AnalyseUtil.getCodeDateMap(orderDateMap.keySet(), \"2017-10-13\");\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateDTMap = HistoryAnalyse.getCodeHisMap(orderDateMap, dieTingTimeMap.keySet());\r\n\t\tHashMap<String, List<HistoryDomain>> afterDieTingHisMap = HistoryAnalyse.getHisMapByStartAndEndDateMap(orderDateDTMap, dieTingTimeMap, endDateMap);\r\n\t\tHashMap<String, Double> highestFlowInRate = PriceAnalyse.getHighestFlowInRate(afterDieTingHisMap, -2000, 20);\r\n\t\tHashMap<String, List<String>> conceptListMap = ConceptAnalyse.getConceptListMap(highestFlowInRate.keySet());\r\n\r\n\t\t\r\n\t\tSystem.out.println(conceptListMap);\r\n\t}", "public Map<AbstractVizResource<?, ?>, DataTime[]> getTimeMatchingMap() {\n return timeMatchingMap;\n }", "@Override\n public CNF transformCNF(CNF cnf) throws QueryContradictoryException {\n HashMap<TimeSelector, Long> lowerBounds = new HashMap<>();\n /*\n * stores the newly inferred upper bounds for time selectors\n */\n HashMap<TimeSelector, Long> upperBounds = new HashMap<>();\n // clauses (not) to consider\n List<CNFElement> relevantClauses = cnf.getPredicates().stream()\n .filter(this::isRelevantClause)\n .collect(Collectors.toList());\n List<CNFElement> otherClauses = cnf.getPredicates().stream()\n .filter(clause -> !isRelevantClause(clause))\n .collect(Collectors.toList());\n List<ComparisonExpression> relevantComparisons = relevantClauses.stream()\n .map(clause -> clause.getPredicates().get(0))\n .collect(Collectors.toList());\n\n // stores all tuples (a,b) with a=b in relevant comparisons\n HashMap<ComparableExpression, HashSet<ComparableExpression>> cEq = new HashMap<>();\n // stores all tuples (a,b) with a<=b in relevant comparisons\n HashMap<ComparableExpression, HashSet<ComparableExpression>> cLeq = new HashMap<>();\n // stores all tuples (a,b) with a<b in relevant comparisons\n HashMap<ComparableExpression, HashSet<ComparableExpression>> cLt = new HashMap<>();\n // stores all tuples (a,b) with a!=b in relevant comparisons\n HashMap<ComparableExpression, HashSet<ComparableExpression>> cNeq = new HashMap<>();\n\n\n // init bounds\n for (ComparisonExpression comp : relevantComparisons) {\n ComparableExpression lhs = comp.getLhs().getWrappedComparable();\n ComparableExpression rhs = comp.getRhs().getWrappedComparable();\n Comparator comparator = comp.getComparator();\n if (comp.getLhs() instanceof TimeSelectorComparable) {\n lowerBounds.put((TimeSelector) lhs, TemporalElement.DEFAULT_TIME_FROM);\n upperBounds.put((TimeSelector) lhs, TemporalElement.DEFAULT_TIME_TO);\n }\n if (comp.getRhs() instanceof TimeSelectorComparable) {\n lowerBounds.put((TimeSelector) rhs, TemporalElement.DEFAULT_TIME_FROM);\n upperBounds.put((TimeSelector) rhs, TemporalElement.DEFAULT_TIME_TO);\n }\n // init c-relations\n if (comparator.equals(EQ)) {\n cEq.putIfAbsent(lhs, new HashSet<>());\n cEq.putIfAbsent(rhs, new HashSet<>());\n cEq.get(lhs).add(rhs);\n cEq.get(rhs).add(lhs);\n } else if (comparator.equals(Comparator.LTE)) {\n cLeq.putIfAbsent(lhs, new HashSet<>());\n cLeq.get(lhs).add(rhs);\n } else if (comparator.equals(Comparator.LT)) {\n cLt.putIfAbsent(lhs, new HashSet<>());\n cLt.get(lhs).add(rhs);\n } else if (comparator.equals(Comparator.NEQ)) {\n cNeq.putIfAbsent(lhs, new HashSet<>());\n cNeq.get(lhs).add(rhs);\n }\n }\n\n // compute closures for =,<,<=\n List<HashMap<ComparableExpression, HashSet<ComparableExpression>>> closures =\n computeClosureRelations(cEq, cLeq, cLt);\n\n checkLtContradictions(closures.get(2));\n // infer new bounds\n List<HashMap<TimeSelector, Long>> newBounds = updateEq(closures.get(0), lowerBounds, upperBounds);\n newBounds = updateLeq(closures.get(1), newBounds.get(0), newBounds.get(1));\n newBounds = updateLt(closures.get(2), newBounds.get(0), newBounds.get(1));\n\n // check them for contradictions with NEQ clauses\n checkNeqContradictions(cNeq, newBounds.get(0), newBounds.get(1));\n // filter redundant clauses like a.tx_from <= a.tx_to and comparisons between selectors and literals\n List<ComparisonExpression> remainingOldComparisons = filterRedundantComparisons(relevantComparisons);\n // construct new clauses\n List<ComparisonExpression> newComparisons = comparisons(newBounds.get(0), newBounds.get(1));\n\n // construct the CNF\n List<CNFElement> remainingOldClauses = remainingOldComparisons.stream()\n .map(comparison -> new CNFElement(Collections.singletonList(comparison)))\n .collect(Collectors.toList());\n List<CNFElement> newClauses = newComparisons.stream()\n .map(comparison -> new CNFElement(Collections.singletonList(comparison)))\n .collect(Collectors.toList());\n\n List<CNFElement> allClauses = otherClauses;\n allClauses.addAll(remainingOldClauses);\n allClauses.addAll(newClauses);\n return new CNF(allClauses);\n }", "public static ArrayList<String> getStatistics() {\n ArrayList<String> answer = new ArrayList<>();\n for (Map.Entry<String, HashMap<String, Integer>> entry1 : winStatistic.entrySet()) {\n for (Map.Entry<String, Integer> entry2 : entry1.getValue().entrySet()) {\n answer.add(entry1.getKey() + \" won \" + entry2.getKey() + \" \" + entry2.getValue() + \" times.\");\n }\n }\n for (Map.Entry<String, HashMap<String, Integer>> entry1 : drawStatistic.entrySet()) {\n for (Map.Entry<String, Integer> entry2 : entry1.getValue().entrySet()) {\n answer.add(entry1.getKey() + \" play in a draw with \" + entry2.getKey() + \" \" + entry2.getValue() + \" times.\");\n }\n }\n return answer;\n }", "@SuppressWarnings(\"unchecked\")\n\t@External(readonly = true)\n\tpublic Map<String, String> get_games_excess(BigInteger day) {\n\t\tif (day.compareTo(BigInteger.ZERO)== 0) {\n\t\t\treturn this.get_todays_games_excess();\n\t\t}\n\t\tif (day.compareTo(BigInteger.ZERO)== -1) {\n\t\t\tBigInteger now = BigInteger.valueOf(Context.getBlockTimestamp());\t\t\n\t\t\tday = day.add(now.divide(U_SECONDS_DAY));\n\t\t}\n\t\tMap.Entry<String, String>[] games_excess = new Map.Entry[this.get_approved_games().size()];\n\t\tfor(int i= 0; i< this.get_approved_games().size(); i++) {\n\t\t\tAddress game = this.get_approved_games().get(i);\n\t\t\tgames_excess[i] = Map.entry(game.toString(), String.valueOf(this.games_excess_history.at(day).get(game)));\n\t\t}\n\t\treturn Map.ofEntries(games_excess);\n\t}", "public HashMap<Character, float[][]> safeold_calcSquigglePeaks(float ppmTol, String seq, float[] mods, String ionTypes, int maxCharge) {\n\t\tHashMap<Character, float[][]> squigglePeaks = new HashMap<>();\n\n\t\tArrayList<Character> nIonTypes = new ArrayList<>();\n\t\tArrayList<Character> cIonTypes = new ArrayList<>();\n\n\t\tfor (int i = 0; i < ionTypes.length(); i++) {\n\t\t\tchar curIonType = ionTypes.charAt(i);\n\t\t\tif (curIonType == 'a' || curIonType == 'b' || curIonType == 'c')\n\t\t\t\tnIonTypes.add(curIonType);\n\t\t\telse if (curIonType == 'x' || curIonType == 'y' || curIonType == 'z')\n\t\t\t\tcIonTypes.add(curIonType);\n\t\t}\n\n\t\tArrayList<Peak> ps = new ArrayList<>();\n\n\t\t//float iB = 0.0f, iY = 0.0f;\n\t\t//int nB = 0, nY = 0;\n\t\t//int maxCharge = (charge==2)?1:2;\n\t\tfloat [] aaMasses = AAMasses.monoisotopic_masses;\n\t\tfloat [] fragTypeShifts = AAMasses.ionTypeShifts;\n //float[][] tempPeaks;\n\t\tint cLen = seq.length();\n\n\n\t\t//todo see if removing known frags helps .... it helps ish??\n\t\tArrayList<Float> knownFrags = new ArrayList<>();\n\t\t/* float nTermMass;\n\t\tfor (Character iType : nIonTypes) {\n\t\t\tps = new ArrayList<>();\n\t\t\tnTermMass = fragTypeShifts[iType - 'a'];\n\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) { //loop through charge states\n\t\t\t\tfloat cmass = AAMasses.monoisotopic_nterm_mass + nTermMass;\n\t\t\t\tfor (int i = 0; i < cLen - 1; i++) { //loop through positions on the peptide\n\t\t\t\t\tcmass += (aaMasses[seq.charAt(i) - 'A'] + mods[i]) / ccharge;\n\t\t\t\t\tknownFrags.add(cmass);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfloat cTermMass;\n\t\tfor (Character iType : cIonTypes) {\n\t\t\tps = new ArrayList<>();\n\t\t\tcTermMass = fragTypeShifts[iType - 'x' + 3];\n\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) {\n\t\t\t\tfloat cmass = (cTermMass + ccharge * AAMasses.monoisotopic_nterm_mass) / ccharge;\n\t\t\t\tfor (int i = 0; i < cLen - 1; i++) {\n\t\t\t\t\tcmass += (aaMasses[seq.charAt(cLen - 1 - i) - 'A'] + mods[cLen - 1 - i]) / ccharge;\n\t\t\t\t\tknownFrags.add(cmass);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t */\n\t\tfloat nTermMass;\n\t\tfor (Character iType : nIonTypes) {\n\t\t ps = new ArrayList<>();\n\t\t\tnTermMass = fragTypeShifts[iType - 'a'];\n\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) { //loop through charge states\n\t\t\t float cmass = AAMasses.monoisotopic_nterm_mass + nTermMass;\n\t\t\t\tfor (int i = 0; i < cLen - 1; i++) { //loop through positions on the peptide\n\t\t\t\t\tcmass += (aaMasses[seq.charAt(i) - 'A'] + mods[i]) / ccharge;\n\t\t\t\t\tfor (int j = 0; j < peakMZ.length; j++) {//loop through peaks in spectrum\n\t\t\t\t\t\t//This block will remove known fragments\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tboolean badFlag = false;\n\t\t\t\t\t\tfor (int k = 0; k < knownFrags.size(); k++) {\n\t\t\t\t\t\t\tif (Math.abs(peakMZ[j] - knownFrags.get(k)) < 0.001) {\n\t\t\t\t\t\t\t\tbadFlag = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!badFlag)\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\tps.add(new Peak(peakMZ[j] - cmass, peakInt[j]));\n\t\t\t\t\t\t//ps.add(new Peak(peakMZ[j] - cmass, peakInt[j] / (i + 1)));\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\tsquigglePeaks.put(iType, peaksToArray(ps));\n\t\t}\n\n\t\tfloat cTermMass;\n\t\tfor (Character iType : cIonTypes) {\n ps = new ArrayList<>();\n\t\t\tcTermMass = fragTypeShifts[iType - 'x' + 3];\n\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) {\n float cmass = (cTermMass + ccharge * AAMasses.monoisotopic_nterm_mass) / ccharge;\n for (int i = 0; i < cLen - 1; i++) {\n cmass += (aaMasses[seq.charAt(cLen - 1 - i) - 'A'] + mods[cLen - 1 - i]) / ccharge;\n for (int j = 0; j < peakMZ.length; j++) {//loop through peaks in spectrum\n \t//This block will remove known fragments\n /*\n\t\t\t\t\t\tboolean badFlag = false;\n\t\t\t\t\t\tfor (int k = 0; k < knownFrags.size(); k++) {\n\t\t\t\t\t\t\tif (Math.abs(peakMZ[j] - knownFrags.get(k)) < 0.001) {\n\t\t\t\t\t\t\t\tbadFlag = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!badFlag)\n\n */\n\t\t\t\t\t\t\tps.add(new Peak(peakMZ[j] - cmass, peakInt[j]));\n\t\t\t\t\t\t//ps.add(new Peak(peakMZ[j] - cmass, peakInt[j] / (i + 1)));\n\t\t\t\t\t}\n }\n }\n squigglePeaks.put(iType, peaksToArray(ps));\n\t\t}\n\t\treturn squigglePeaks;\n\t}", "Collection<String> getPossibleVictoryConditions();", "List<String> getModalities(Observation obs);", "public Map<Language,String> getAllMessageCouldHaveFired()\r\n\t{\r\n\t\treturn getAllMessageCouldHaveFired( getSession().getSessionContext() );\r\n\t}", "public String getConsultationDetail() {\n String consultationDetail = \"\";\n if (!symptoms.isEmpty()) {\n consultationDetail += extractField(\"Symptoms\", symptoms);\n }\n if (!diagnoses.isEmpty()) {\n consultationDetail += extractField(\"Diagnoses\", diagnoses);\n }\n if (!prescriptions.isEmpty()) {\n consultationDetail += extractField(\"Prescriptions\", prescriptions);\n }\n return consultationDetail;\n }", "public TimeIntervalCollection getSatisfiedIntervalIntersection() {\n Preconditions.checkNotNull(analysisInterval);\n TimeIntervalCollection allSatisfiedIntervals = new TimeIntervalCollection();\n if (results.isEmpty()) {\n return allSatisfiedIntervals;\n }\n\n allSatisfiedIntervals.add(analysisInterval);\n for (AccessQueryConstraintResult result : results.values()) {\n allSatisfiedIntervals = allSatisfiedIntervals.intersect(result.getSatisfiedIntervals());\n }\n\n return allSatisfiedIntervals;\n }", "public Map<String, String> getInformations()\n {\n\n if (userProfile == null)\n {\n return EMPTY_STRING_TO_STRING_MAP;\n }\n\n Map<String, String> infoMap = userProfile.getUserInfoMap();\n Map<String, String> filteredMap = new HashMap<String, String>();\n\n for (String key : infoMap.keySet())\n {\n if (JSR_168_P3P.contains(key))\n {\n filteredMap.put(key, infoMap.get(key));\n }\n }\n\n return Collections.unmodifiableMap(filteredMap);\n }", "private Map<String, Object> analysisMap(ArrayList<String> data) {\n Map<String, Object> map = new HashMap<>();\n map.put(DAILY, data);\n return map;\n }", "public static CalculationResultMap allObs(Concept concept, Collection<Integer> cohort, PatientCalculationContext context) {\n ObsForPersonDataDefinition def = new ObsForPersonDataDefinition(\"all obs\", TimeQualifier.ANY, concept, context.getNow(), null);\n return MentalHealthConfigCalculationUtils.ensureEmptyListResults(MentalHealthConfigCalculationUtils.evaluateWithReporting(def, cohort, null, null, context), cohort);\n }", "public synchronized Crystal[] getGameCrystals() {\n\t\treturn InformationPresenter.getInstance().getGameCrystals();\n\t}", "public String condition(String map, int x, int y, long date) {\n\tWeatherUnit weath = getWeather(date);\n if (weath == null) return \"dry\"; // No calendar present\n\t// Water is handled different, only wind counts\n\tScaledMap local = (ScaledMap)maps.get(map);\n\tif (local != null && local.getTerrain(x,y).equals(\"water\")) {\n\t return windCondition(local.getVegetation(x,y), weath);\n\t}\n\t\n\tData.HashList list = Data.getCondList();\n\tfor (int i = 0; i < list.keySet().size(); i++) {\n\t String n = list.getKey(i);\n\t int thresh = ((Data.Condition)list.get(n)).threshhold;\n\t String lvl = ((Data.Condition)list.get(n)).lvlname.toString();\n if ((weath.levels.get(lvl) != null) &&\n ((Integer)weath.levels.get(lvl)).intValue() >= thresh)\n\t\treturn n;\n\t}\n\n\t// Default\n\treturn \"dry\";\n }", "public Collection currentProblems(Relative_Time_Interval timeSpan) {\n\t\tDefinite_Time_Interval timeInterval = timeSpan.resolveTime(sessionTime,\n\t\t\t\tthis);\n\t\treturn currentProblems( timeInterval);\n\t}", "public Map<BigInteger, Question> showQuestions() throws UserException {\n\t\treturn null;\r\n\t}", "public Map<String ,String> GetMultipleChoiceQ(int AssessmentId) {\n Map<String, String> map = new HashMap<String, String>();\n List<String> indexes = GetAssessmentIndexes(AssessmentId);\n\n for (String index : indexes) {\n try {\n Statement stmt = Con.createStatement();\n String query = String.format(\"SELECT qora, content FROM dqs_qanda WHERE \" +\n \"((SELECT content FROM dqs_qanda WHERE qora = 'question%s_t') = 'm') AND (qora='question%s' OR qora = 'question%s_q1' \" +\n \"OR qora = 'question%s_q2' OR qora = 'question%s_q3' or qora = 'question%s_c')\", index, index, index, index, index, index);\n //System.out.println(query);\n ResultSet rs = stmt.executeQuery(query);\n while(rs.next()) {\n map.put(rs.getString(\"qora\"), rs.getString(\"content\"));\n }\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n return map;\n }", "public Set<OWLLogicalAxiom> canWeDoBetter(){\n\t\tSet<Set<OWLClass>> largeSCCs =\n\t\t\t\ttarj.getStronglyConnectComponents().\n\t\t\t\t\t\tstream().\n\t\t\t\t\t\tfilter(x -> x.size() > 1).\n\t\t\t\t\t\tcollect(Collectors.toSet());\n\n\t\t//Add all those axioms which use their own definition on the RHS\n\t\tSet<OWLLogicalAxiom> cycleCausing = new HashSet<>();\n\t\tcycleCausing.addAll(builder.getSelfDefinedAxioms());\n\n\t\tfor(OWLLogicalAxiom axiom : axioms){\n\t\t\tOWLClass name = (OWLClass) AxiomSplitter.getNameofAxiom(axiom);\n\t\t\t\tfor(Set<OWLClass> component : largeSCCs){\n\t\t\t\t\tif(component.contains(name)){\n\t\t\t\t\t\tOWLClassExpression def = AxiomSplitter.getDefinitionofAxiom(axiom);\n\t\t\t\t\t\tSet<OWLClass> defCls = ModuleUtils.getNamedClassesInSignature(def);\n\t\t\t\t\t\tSet<OWLClass> inter = Sets.intersection(component, defCls);\n\t\t\t\t\t\tif(!inter.isEmpty()){\n\t\t\t\t\t\t\tcycleCausing.add(axiom);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\treturn cycleCausing;\n\t}", "public static String buildSnowTempOtherWhere() {\n PDCOptionData pcOptions = PDCOptionData.getInstance();\n StringBuilder where = new StringBuilder();\n String durCode = null;\n int durHours = pcOptions.getDurHours();\n\n Date minTime = SimulatedTime.getSystemTime().getTime();\n Date maxTime = SimulatedTime.getSystemTime().getTime();\n Date lowerChangeBasetime = SimulatedTime.getSystemTime().getTime();\n Date lowerChangeLowertime = SimulatedTime.getSystemTime().getTime();\n Date lowerChangeUppertime = SimulatedTime.getSystemTime().getTime();\n Date upperChangeUppertime = SimulatedTime.getSystemTime().getTime();\n Date upperChangeLowertime = SimulatedTime.getSystemTime().getTime();\n\n /* get the current time */\n Date now = SimulatedTime.getSystemTime().getTime();\n\n /* filter by physical element first */\n where.append(\"WHERE pe = '\" + pcOptions.getSelectedAdHocElementString()\n + \"' \");\n\n /* filter by type-source */\n if (pcOptions.getFilterByTypeSource() == 1) {\n where.append(buildTypeSourceWhereFilter() + \" \");\n }\n\n /* set the time window */\n if ((pcOptions.getTimeMode() == TimeModeType.MAXSELECT.getTimeMode())\n || (pcOptions.getTimeMode() == TimeModeType.MINSELECT\n .getTimeMode())) {\n Date validTime = pcOptions.getValidTime();\n\n Calendar cal = new GregorianCalendar();\n cal.setTimeInMillis((long) ((validTime.getTime() / 1000) - durHours\n * 3600 * PDCConstants.MINMAX_DUR_MULTIPLIER));\n minTime.setTime(cal.getTimeInMillis());\n maxTime = validTime;\n\n durCode = durHoursToShefCode();\n\n where.append(\" and extremum = '\" + durCode + \"' \");\n } else if (pcOptions.getTimeMode() == TimeModeType.LATEST.getTimeMode()) {\n long millis = now.getTime() - durHours\n * PDCConstants.MILLIS_PER_MINUTE * 60;\n minTime.setTime(millis);\n maxTime = now;\n\n where.append(\"AND extremum = 'Z' \");\n } else if (pcOptions.getTimeMode() == TimeModeType.SETTIME\n .getTimeMode()) {\n Calendar min = new GregorianCalendar();\n min.setTimeInMillis(minTime.getTime());\n min.add(Calendar.HOUR, durHours * -1);\n minTime.setTime(min.getTimeInMillis());\n\n Calendar max = new GregorianCalendar();\n max.setTimeInMillis(maxTime.getTime());\n max.add(Calendar.HOUR, durHours);\n\n where.append(\"AND extremum = 'Z' \");\n } else if (pcOptions.getTimeMode() == TimeModeType.VALUE_CHANGE\n .getTimeMode()) {\n /*\n * Retrieve the number of hours that can be searched around the end\n * times of the change period.\n */\n int changeHourWindow = PDCUtils.getChangeHourWindow();\n\n Calendar upperChangeBaseCal = new GregorianCalendar();\n Calendar lowerChangeBaseCal = new GregorianCalendar();\n\n upperChangeBaseCal.setTimeInMillis(pcOptions.getValidTime()\n .getTime());\n lowerChangeBaseCal.add(Calendar.HOUR, durHours * -1);\n lowerChangeBasetime.setTime(lowerChangeBaseCal.getTimeInMillis());\n\n upperChangeBaseCal.add(Calendar.HOUR, changeHourWindow);\n upperChangeUppertime = upperChangeBaseCal.getTime();\n upperChangeBaseCal.add(Calendar.HOUR, changeHourWindow * -1);\n upperChangeLowertime = upperChangeBaseCal.getTime();\n\n lowerChangeBaseCal.add(Calendar.HOUR, changeHourWindow);\n lowerChangeUppertime = lowerChangeBaseCal.getTime();\n lowerChangeBaseCal.add(Calendar.HOUR, changeHourWindow * -1);\n lowerChangeLowertime = lowerChangeBaseCal.getTime();\n }\n\n if (pcOptions.getTimeMode() == TimeModeType.VALUE_CHANGE.getTimeMode()) {\n where.append(\"and ( ( obstime >= '\"\n + PDCConstants.DATE_FORMAT.format(upperChangeLowertime)\n + \"' \");\n where.append(\" and obstime <= '\"\n + PDCConstants.DATE_FORMAT.format(upperChangeUppertime)\n + \"' )\");\n where.append(\" or ( obstime >= '\"\n + PDCConstants.DATE_FORMAT.format(lowerChangeLowertime)\n + \"' \");\n where.append(\" and obstime <= '\"\n + PDCConstants.DATE_FORMAT.format(lowerChangeUppertime)\n + \"' ) )\");\n where.append(\" and value != \" + PDCConstants.MISSING_VALUE);\n where.append(\" and extremum = 'Z' \");\n } else {\n where.append(\" and obstime >= '\"\n + PDCConstants.DATE_FORMAT.format(minTime) + \"' \");\n where.append(\" and obstime <= '\"\n + PDCConstants.DATE_FORMAT.format(maxTime) + \"' \");\n where.append(\" and value != \" + PDCConstants.MISSING_VALUE);\n }\n where.append(\" ORDER BY lid ASC, ts, obstime DESC\");\n\n return where.toString();\n }", "private Map<String, String> solutionForCNSHIsFull() {\r\n Map<String, String> map = new HashMap<>();\r\n map.put(this.students[0].getName(), this.schools[1].getName());\r\n map.put(this.students[1].getName(), this.schools[1].getName());\r\n map.put(this.students[2].getName(), this.schools[1].getName());\r\n map.put(this.students[3].getName(), this.schools[2].getName());\r\n return map;\r\n }", "public CWE[] getRxa18_SubstanceTreatmentRefusalReason() {\r\n \tCWE[] retVal = this.getTypedField(18, new CWE[0]);\r\n \treturn retVal;\r\n }", "private void processAxioms(){\n if(isComplexAxiom()){\n isTerminology = false;\n isTerminologyWithRCIs = false;\n }\n else{\n inspectAxiomLHS();\n\n Predicate<OWLClass> repeatedEquality = e -> equalityNameCount.get(e) > 1;\n Predicate<OWLClass> repeatedInclusion = e -> inclusionNameCount.get(e) > 1;\n\n //No shared names or repeated equalities\n if(containsSharedNames() || equalityNameCount.keySet().stream().anyMatch(repeatedEquality)){\n isTerminology = false;\n isTerminologyWithRCIs = false;\n }\n //Has some repeated inclusions\n else if(inclusionNameCount.keySet().stream().anyMatch(repeatedInclusion)){\n isTerminology = false;\n isTerminologyWithRCIs = true;\n }\n else{\n //Is a terminology hence is a terminology with RCIs\n isTerminology = true;\n isTerminologyWithRCIs = true;\n }\n\n }\n }", "HashMap<String, Instrument> getInstruments();", "public static ImmutableMap<AbstractVariable, Value> thoracicValues()\n {\n final BooleanVariable dnrVar = SampleModels.dnrVariable();\n final NumericalVariable ageVar = SampleModels.ageVariable();\n final MultiSelectVariable fsVar = SampleModels.functionalStatusVariable();\n final ProcedureVariable procVar = SampleModels.procedureVariable();\n try\n {\n return ImmutableMap.of(\n dnrVar,\n new BooleanValue(dnrVar, false),\n ageVar,\n new NumericalValue(ageVar, 45.0f),\n fsVar,\n new MultiSelectValue(fsVar, new MultiSelectOption(\"Independent\")),\n procVar,\n new ProcedureValue(procVar, SampleModels.repairLeftProcedure()));\n }\n catch (final InvalidValueException ex)\n {\n throw new RuntimeException(\"test data had an invalid value\", ex);\n }\n }", "public Record() {\n this.symptoms = new LinkedHashSet<>();\n this.diagnoses = new LinkedHashSet<>();\n this.prescriptions = new LinkedHashSet<>();\n }", "private List<Map<String, String>> getChildrenDetails(CaseData caseData) {\n return caseData.getAllChildren().stream()\n .map(Element::getValue)\n .map(Child::getParty)\n .map(child -> ImmutableMap.of(\n \"name\", child.getFullName(),\n \"gender\", defaultIfNull(child.getGender(), EMPTY),\n \"dateOfBirth\", child.getDateOfBirth() == null ? EMPTY :\n formatLocalDateToString(child.getDateOfBirth(), FormatStyle.LONG)))\n .collect(toList());\n }", "public List<TimeInformation> getAllEmployeesTimeInformation() {\r\n\t\tList<TimeInformation> employeeTimeInformation = repository.findAll();\r\n\t\tif(employeeTimeInformation.size() > 0) {\r\n\t\t\treturn employeeTimeInformation;\r\n\t\t} else {\r\n\t\t\treturn new ArrayList<TimeInformation>();\r\n\t\t}\r\n\t}", "public HashMap<Character, float[][]> calcSquigglePeaks(float ppmTol, String seq, float[] mods, String ionTypes, String filterIonTypes, int maxCharge) {\n\t\tHashMap<Character, float[][]> squigglePeaks = new HashMap<>();\n\n\t\tArrayList<Character> nIonTypes = new ArrayList<>();\n\t\tArrayList<Character> cIonTypes = new ArrayList<>();\n\n\t\tthis.averageFragMass = new double[ionTypes.length()];\n\t\tint iTypeIndx = 0;\n\n\t\tfor (int i = 0; i < ionTypes.length(); i++) {\n\t\t\tchar curIonType = ionTypes.charAt(i);\n\t\t\tif (curIonType == 'a' || curIonType == 'b' || curIonType == 'c')\n\t\t\t\tnIonTypes.add(curIonType);\n\t\t\telse if (curIonType == 'x' || curIonType == 'y' || curIonType == 'z')\n\t\t\t\tcIonTypes.add(curIonType);\n\t\t}\n\n\t\tArrayList<Peak> ps = new ArrayList<>();\n\n\t\t//float iB = 0.0f, iY = 0.0f;\n\t\t//int nB = 0, nY = 0;\n\t\t//int maxCharge = (charge==2)?1:2;\n\t\tfloat [] aaMasses = AAMasses.monoisotopic_masses;\n\t\tfloat [] fragTypeShifts = AAMasses.ionTypeShifts;\n\t\t//float[][] tempPeaks;\n\t\tint cLen = seq.length();\n\n\t\t//int normFac;\n\t\t//if (PTMShepherd.getParam(\"squiggle_norm\").equals(\"1\"))\n\t\t//\tnormFac = 1;\n\t\t//else\n\t\t//normFac = cLen;\n\t\t//normFac = 1;\n\n\t\tArrayList<Float> knownFrags = calculatePeptideFragments(seq, mods, filterIonTypes, maxCharge, 0.0f);\n\t\t/*\n\t\tfor (Character iType : nIonTypes) {\n\t\t\tps = new ArrayList<>();\n\t\t\tnTermMass = fragTypeShifts[iType - 'a'];\n\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) { //loop through charge states\n\t\t\t\tfloat cmass = AAMasses.monoisotopic_nterm_mass + nTermMass; //todo is this appropriate for multiple charge states??\n\t\t\t\tfor (int i = 0; i < cLen - 1; i++) { //loop through positions on the peptide\n\t\t\t\t\tcmass += (aaMasses[seq.charAt(i) - 'A'] + mods[i]) / ccharge;\n\t\t\t\t\tknownFrags.add(cmass);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (Character iType : cIonTypes) {\n\t\t\tps = new ArrayList<>();\n\t\t\tcTermMass = fragTypeShifts[iType - 'x' + 3];\n\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) {\n\t\t\t\tfloat cmass = (cTermMass + ccharge * AAMasses.monoisotopic_nterm_mass) / ccharge;\n\t\t\t\tfor (int i = 0; i < cLen - 1; i++) {\n\t\t\t\t\tcmass += (aaMasses[seq.charAt(cLen - 1 - i) - 'A'] + mods[cLen - 1 - i]) / ccharge;\n\t\t\t\t\tknownFrags.add(cmass);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\tfloat nTermMass;\n\t\tfor (Character iType : nIonTypes) {\n\t\t\tps = new ArrayList<>();\n\t\t\tnTermMass = fragTypeShifts[iType - 'a'];\n\t\t\tfor (int j = 0; j < peakMZ.length; j++) {\n\t\t\t\tboolean skipFlag = false;\n\t\t\t\tdouble trueTol = ppmTol * peakMZ[j] / 1000000;\n\t\t\t\tfor (Float ion : knownFrags) {\n\t\t\t\t\tif (Math.abs(peakMZ[j] - ion) < trueTol) {\n\t\t\t\t\t\tskipFlag = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if (skipFlag)\n\t\t\t\t//\tcontinue;\n\t\t\t\tArrayList<Peak> cPeaksNaked = new ArrayList<>();\n\t\t\t\t//ArrayList<Peak> cPeaksDmass = new ArrayList<>();\n\t\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) { //loop through charge states\n\t\t\t\t\tfloat cmass = AAMasses.monoisotopic_nterm_mass + nTermMass;\n\t\t\t\t\tfor (int i = 0; i < cLen - 1; i++) { //loop through positions on the peptide\n\t\t\t\t\t\tcmass += (aaMasses[seq.charAt(i) - 'A'] + mods[i]) / ccharge;\n\t\t\t\t\t\tif (skipFlag)\n\t\t\t\t\t\t\tcPeaksNaked.add(new Peak(peakMZ[j] - cmass, 0, (float)trueTol));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcPeaksNaked.add(new Peak(peakMZ[j] - cmass, peakInt[j], (float)trueTol));\n\t\t\t\t\t\t\tthis.averageFragMass[iTypeIndx] += peakMZ[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//cPeaksDmass.add(new Peak(peakMZ[j] - (cmass + dmass), peakInt[j]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(iType+\"\\t\"+ps.size()+\"\\t\"+cPeaksNaked.size());\n\n\t\t\t\t//Collections.sort(cPeaksNaked);\n\t\t\t\t//Collections.sort(cPeaksDmass);\n\t\t\t\tfor(int i = 0; i < cPeaksNaked.size(); i++) {\n\t\t\t\t\tps.add(cPeaksNaked.get(i));\n\t\t\t\t\t//cPeaksDmass.get(i).lossToRemainder(dmass);\n\t\t\t\t\t//ps.add(cPeaksDmass.get(i));\n\t\t\t\t}\n\t\t\t\t//for (Peak p : cPeaks)\n\t\t\t\t//\tSystem.out.println(p.MZ + \"\\t\" + p.Int);\n\t\t\t}\n\t\t\tsquigglePeaks.put(iType, peaksWTolToArray(ps));\n\t\t\tiTypeIndx++;\n\t\t}\n\n\t\tfloat cTermMass;\n\t\tfor (Character iType : cIonTypes) {\n\t\t\tps = new ArrayList<>();\n\t\t\tcTermMass = fragTypeShifts[iType - 'x' + 3];\n\t\t\tfor (int j = 0; j < peakMZ.length; j++) {\n\t\t\t\tboolean skipFlag = false;\n\t\t\t\tfloat trueTol = ppmTol * peakMZ[j] / 1000000;\n\t\t\t\tfor (Float ion : knownFrags) {\n\t\t\t\t\tif (Math.abs(peakMZ[j] - ion) < trueTol) {\n\t\t\t\t\t\tskipFlag = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if (skipFlag)\n\t\t\t\t//\tcontinue;\n\t\t\t\tArrayList<Peak> cPeaksNaked = new ArrayList<>();\n\t\t\t\tfor (int ccharge = 1; ccharge <= maxCharge; ccharge++) {\n\t\t\t\t\tfloat cmass = (cTermMass + ccharge * AAMasses.monoisotopic_nterm_mass) / ccharge;\n\t\t\t\t\tfor (int i = 0; i < cLen - 1; i++) {\n\t\t\t\t\t\tcmass += (aaMasses[seq.charAt(cLen - 1 - i) - 'A'] + mods[cLen - 1 - i]) / ccharge;\n\t\t\t\t\t\tif (skipFlag)\n\t\t\t\t\t\t\tcPeaksNaked.add(new Peak(peakMZ[j] - cmass, 0, trueTol));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcPeaksNaked.add(new Peak(peakMZ[j] - cmass, peakInt[j], trueTol));\n\t\t\t\t\t\t\tthis.averageFragMass[iTypeIndx] += peakMZ[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor(int i = 0; i < cPeaksNaked.size(); i++)\n\t\t\t\t\tps.add(cPeaksNaked.get(i));\n\t\t\t}\n\t\t\tsquigglePeaks.put(iType, peaksWTolToArray(ps));\n\t\t\tiTypeIndx++;\n\t\t}\n\t\treturn squigglePeaks;\n\t}", "public abstract java.util.Map<java.lang.String, java.lang.Integer> systemicEventIncidenceCountMap();", "public List<ConditionalRequirement> getConditions() {\r\n return conditions;\r\n }", "public void emissionProbabilities() {\r\n /**\r\n * Word and Tag List.\r\n */\r\n final TreeSet<String> words = new TreeSet(), tags = new TreeSet();\r\n Iterator<Kata> iterSatu = MarkovCore.LIST_KATA.iterator();\r\n while (iterSatu.hasNext()) {\r\n final Kata kata = iterSatu.next();\r\n words.add(kata.getKata());\r\n tags.add(kata.getTag());\r\n }\r\n System.out.println(\"Jumlah Kata: \" + words.size());\r\n System.out.println(\"Jumlah Tag: \" + tags.size());\r\n System.out.println();\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Emissions Calculation\">\r\n /**\r\n * Perhitungan Emisi.\r\n */\r\n Iterator<String> iterDua = words.iterator();\r\n while (iterDua.hasNext()) {\r\n final String kata = iterDua.next();\r\n Iterator<String> iterTiga = tags.iterator();\r\n while (iterTiga.hasNext()) {\r\n final StrBuilder strBuilder = new StrBuilder(10);\r\n final String tag = iterTiga.next();\r\n strBuilder.append(\"P(\");\r\n strBuilder.append(kata + \"|\");\r\n strBuilder.append(tag + \") = \");\r\n final Emissions emissions = new Emissions(kata, tag, strBuilder.toString());\r\n emissionses.add(emissions);\r\n }\r\n }\r\n\r\n final HashMap<String, Double> penyebut = new HashMap();\r\n Iterator<Kata> iterEmpat = MarkovCore.LIST_KATA.iterator();\r\n while (iterEmpat.hasNext()) {\r\n final Kata kata = iterEmpat.next();\r\n if (penyebut.get(kata.getTag()) == null) {\r\n penyebut.put(kata.getTag(), 1.0);\r\n } else {\r\n penyebut.put(kata.getTag(), penyebut.get(kata.getTag()) + 1);\r\n }\r\n }\r\n\r\n Iterator<Emissions> iterTiga = emissionses.iterator();\r\n while (iterTiga.hasNext()) {\r\n final Emissions emissions = iterTiga.next();\r\n double pembilang = 0.0;\r\n Iterator<Kata> iterKata = MarkovCore.LIST_KATA.iterator();\r\n while (iterKata.hasNext()) {\r\n Kata kata = iterKata.next();\r\n if (StringUtils.equalsIgnoreCase(kata.getKata(), emissions.word) && StringUtils.equalsIgnoreCase(kata.getTag(), emissions.tag)) {\r\n pembilang++;\r\n }\r\n }\r\n\r\n /**\r\n * WARNING - Laplace Smoothing is Activated.\r\n */\r\n// emissions.setEmissionsProbability(pembilang + 1, penyebut.get(emissions.tag) + this.uniqueWords.size(), (pembilang + 1) / (penyebut.get(emissions.tag) + this.uniqueWords.size()));\r\n emissions.setEmissionsProbability(pembilang, penyebut.get(emissions.tag), pembilang / penyebut.get(emissions.tag));\r\n }\r\n//</editor-fold>\r\n\r\n// System.out.println(emissionses.size());\r\n Iterator<Emissions> emissionsIterator = emissionses.iterator();\r\n while (emissionsIterator.hasNext()) {\r\n final Emissions emissions = emissionsIterator.next();\r\n this.emissionsMap.put(new MultiKey(emissions.word, emissions.tag), emissions.emissionsProbability);\r\n// System.out.println(emissions);\r\n }\r\n// System.out.println(this.emissionsMap.size());\r\n }", "public String inspect(DataTime dataTime, Set<InterrogationKey<?>> keys,\n InterrogateMap dataMap) {\n if (dataMap == null) {\n return \"NO DATA\";\n }\n\n StringBuilder displayedData = new StringBuilder();\n\n boolean containsValueString = containsNonNullKey(\n IRadarInterrogator.VALUE_STRING, keys, dataMap, null);\n\n Set<InterrogationKey<?>> keysToSkip;\n if (containsValueString) {\n keysToSkip = this.interrogator.getValueStringKeys();\n } else {\n keysToSkip = Collections.emptySet();\n }\n\n if (containsNonNullKey(IRadarInterrogator.MNEMONIC, keys, dataMap,\n keysToSkip)) {\n displayedData.append(dataMap.get(IRadarInterrogator.MNEMONIC))\n .append(\" \");\n }\n\n /*\n * Append either the value string or a formatted Value, but not both, as\n * the value string is either already formatted or more meaningful if\n * non-null.\n */\n if (containsValueString) {\n displayedData.append(dataMap.get(IRadarInterrogator.VALUE_STRING));\n } else if (containsNonNullKey(Interrogator.VALUE, keys, dataMap,\n keysToSkip)) {\n Measure<? extends Number, ?> value = dataMap\n .get(Interrogator.VALUE);\n String format;\n if (value.getValue() instanceof Double\n || value.getValue() instanceof Float) {\n format = \"%.2f%s\";\n } else {\n format = \"%.0f%s\";\n }\n displayedData.append(formatMeasure(value, null, format));\n }\n\n if (containsNonNullKey(IRadarInterrogator.PRIMAY_ELEVATION_ANGLE, keys,\n dataMap, keysToSkip)) {\n while (displayedData.length() < 15) {\n displayedData.append(\" \");\n }\n displayedData.append(\n dataMap.get(IRadarInterrogator.PRIMAY_ELEVATION_ANGLE));\n }\n\n if (containsNonNullKey(IRadarInterrogator.SHEAR, keys, dataMap,\n keysToSkip)) {\n displayedData.append(String.format(\" %.4f/s\",\n dataMap.get(IRadarInterrogator.SHEAR)));\n }\n\n if (containsNonNullKey(IRadarInterrogator.MSL, keys, dataMap,\n keysToSkip)) {\n Measure<? extends Number, ?> msl = dataMap\n .get(IRadarInterrogator.MSL);\n displayedData.append(formatMeasure(msl, NonSI.FOOT, \" %.0f%sMSL \"));\n\n Measure<? extends Number, ?> agl = dataMap\n .get(IRadarInterrogator.AGL);\n if (agl == null || Double.isNaN(agl.getValue().doubleValue())) {\n displayedData.append(\"???ft\");\n } else {\n displayedData.append(formatMeasure(agl, NonSI.FOOT, \"%.0f%s\"));\n }\n displayedData.append(\"AGL\");\n }\n\n if (containsNonNullKey(IRadarInterrogator.AZIMUTH, keys, dataMap,\n keysToSkip)) {\n Measure<? extends Number, ?> range = dataMap\n .get(IRadarInterrogator.RANGE);\n displayedData\n .append(formatMeasure(range, NonSI.NAUTICAL_MILE,\n \" %.0fnm\"))\n .append(\"@\").append(dataMap.get(IRadarInterrogator.AZIMUTH)\n .intValue(NonSI.DEGREE_ANGLE));\n }\n\n if (containsNonNullKey(IRadarInterrogator.ICAO, keys, dataMap,\n keysToSkip)) {\n displayedData.append(' ')\n .append(dataMap.get(IRadarInterrogator.ICAO));\n }\n\n if (displayedData.toString().contains(\"null\")\n || displayedData.toString().isEmpty()) {\n displayedData.replace(0, displayedData.length(), \"NO DATA\");\n }\n\n return displayedData.toString();\n }", "private Map<S, List<Node<S>>> getAllOccurrences() {\n List<P> productions = slp.getOrderedProductions();\n Map<S, List<Node<S>>> predecessorMap = new HashMap<>();\n slp.getProductions().stream().map(p -> p.getLeft()).forEach(symbol -> predecessorMap.put(symbol, new ArrayList<>()));\n\n // gather all occurrence\n productions.stream()\n .map(rule -> rule.getRight())\n .flatMap(word -> word.nodeStream())\n .filter(node -> !node.getElement().isTerminal())\n .forEach(node -> predecessorMap.get(node.getElement()).add(node));\n\n return predecessorMap;\n }", "private double[] calcSojournTime(PetriNetView pnmldata,\n\t\t\tStateList tangibleStates) {\n\t\tint numStates = tangibleStates.size();\n\t\tint numTrans = pnmldata.getTransitionViews().length;\n\t\tTransitionView[] trans = pnmldata.getTransitionViews();\n\t\tdouble[] sojournTime = new double[numStates];\n\n\t\tpnmldata.storeCurrentMarking();\n\t\tfor (int i = 0; i < numStates; i++) {\n\t\t\tint[] tangibleStateArray = tangibleStates.get(i);\n\t\t\tpnmldata.setCurrentMarkingVector(tangibleStateArray);\n\t\t\tpnmldata.createMatrixes();\n\t\t\tLinkedList<MarkingView>[] markings = new LinkedList[tangibleStateArray.length];\n\t\t\tfor (int j = 0; j < tangibleStateArray.length; j++) {\n\t\t\t\tLinkedList<MarkingView> newMarkingViewList = new LinkedList<MarkingView>();\n\t\t\t\tMarkingView m = new MarkingView(pnmldata.getActiveTokenView(),\n\t\t\t\t\t\ttangibleStateArray[j]);\n\t\t\t\tnewMarkingViewList.add(m);\n\t\t\t\tmarkings[j] = newMarkingViewList;\n\t\t\t}\n\n\t\t\tboolean[] transStatus = pnmldata.areTransitionsEnabled(markings);\n\t\t\tdouble weights = 0;\n\t\t\tfor (int j = 0; j < numTrans; j++) {\n\t\t\t\tif (transStatus[j]) {\n\t\t\t\t\tweights += trans[j].getRate();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsojournTime[i] = 1 / weights;\n\t\t}\n\n\t\tpnmldata.restorePreviousMarking();\n\t\treturn sojournTime;\n\t}", "private String proposeTime(Conversation conv, boolean correction)\n throws IOException {\n // propose a time block\n Calendar appt = scheduleManager.getApptSlot();\n conv.setAppointmentTime(appt);\n // transition to a the message proposed state\n conv.setState(Conversation.STATE_APPT_PROPOSED);\n\n // generate the message\n if (correction) {\n return WordLattice.fromFile(\"correction.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n } else {\n return WordLattice.fromFile(\"propose.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n }\n }", "private List<Set<GraphChange>> findChanges(Map<Collection<Node>, List<PossibleDConnectingPath>> paths) {\n List<Set<GraphChange>> pagChanges = new ArrayList<>();\n\n Set<Map.Entry<Collection<Node>, List<PossibleDConnectingPath>>> entries = paths.entrySet();\n /* Loop through each entry, ie each conditioned set of variables. */\n for (Map.Entry<Collection<Node>, List<PossibleDConnectingPath>> entry : entries) {\n Collection<Node> conditions = entry.getKey();\n List<PossibleDConnectingPath> dConnecting = entry.getValue();\n\n /* loop through each path */\n for (PossibleDConnectingPath possible : dConnecting) {\n List<Node> possPath = possible.getPath();\n /* Created with 2*# of undirectedPaths as appoximation. might have to increase size once */\n Set<GraphChange> pathChanges = new HashSet<>(2 * possPath.size());\n\n /* find those conditions which are not along the path (used in colider) */\n List<Node> outsidePath = new ArrayList<>(conditions.size());\n for (Node condition : conditions) {\n if (!possPath.contains(condition))\n outsidePath.add(condition);\n }\n\n /* Walk through path, node by node */\n for (int i = 0; i < possPath.size() - 1; i++) {\n Node current = possPath.get(i);\n Node next = possPath.get(i + 1);\n GraphChange gc;\n\n /* for each pair of nodes, add the operation to remove their edge */\n gc = new GraphChange();\n gc.addRemove(possible.getPag().getEdge(current, next));\n pathChanges.add(gc);\n\n /* for each triple centered on a node which is an element of the conditioning\n * set, add the operation to orient as a nonColider around that node */\n if (conditions.contains(current) && i > 0) {\n gc = new GraphChange();\n Triple nonColider = new Triple(possPath.get(i - 1), current, next);\n gc.addNonCollider(nonColider);\n pathChanges.add(gc);\n }\n\n /* for each node on the path not in the conditioning set, make a colider. It\n * is necessary though to ensure that there are no undirectedPaths implying that a\n * conditioned variable (even outside the path) is a decendant of a colider */\n if ((!conditions.contains(current)) && i > 0) {\n Triple colider = new Triple(possPath.get(i - 1), current, next);\n\n if (possible.getPag().isUnderlineTriple(possPath.get(i - 1), current, next))\n continue;\n\n Edge edge1 = possible.getPag().getEdge(colider.getX(), colider.getY());\n Edge edge2 = possible.getPag().getEdge(colider.getZ(), colider.getY());\n\n if (edge1.getNode1().equals(colider.getY())) {\n if (edge1.getEndpoint1().equals(Endpoint.TAIL)) {\n continue;\n }\n } else if (edge1.getNode2().equals(colider.getY())) {\n if (edge1.getEndpoint2().equals(Endpoint.TAIL)) {\n continue;\n }\n }\n\n if (edge2.getNode1().equals(colider.getY())) {\n if (edge2.getEndpoint1().equals(Endpoint.TAIL)) {\n continue;\n }\n } else if (edge2.getNode2().equals(colider.getY())) {\n if (edge2.getEndpoint2().equals(Endpoint.TAIL)) {\n continue;\n }\n }\n\n /* Simple case, no conditions outside the path, so just add colider */\n if (outsidePath.size() == 0) {\n gc = new GraphChange();\n gc.addCollider(colider);\n pathChanges.add(gc);\n continue;\n }\n\n /* ensure nondecendency in possible path between getModel and each conditioned\n * variable outside the path */\n for (Node outside : outsidePath) {\n\n /* list of possible decendant undirectedPaths */\n\n List<PossibleDConnectingPath> decendantPaths = new ArrayList<>();\n decendantPaths\n = PossibleDConnectingPath.findDConnectingPaths\n (possible.getPag(), current, outside, new ArrayList<Node>());\n\n if (decendantPaths.isEmpty()) {\n gc = new GraphChange();\n gc.addCollider(colider);\n pathChanges.add(gc);\n continue;\n }\n\n /* loop over each possible path which might indicate decendency */\n for (PossibleDConnectingPath decendantPDCPath : decendantPaths) {\n List<Node> decendantPath = decendantPDCPath.getPath();\n\n /* walk down path checking orientation (path may already\n * imply non-decendency) and creating changes if need be*/\n boolean impliesDecendant = true;\n Set<GraphChange> colideChanges = new HashSet<>();\n for (int j = 0; j < decendantPath.size() - 1; j++) {\n Node from = decendantPath.get(j);\n // chaneges from +1\n Node to = decendantPath.get(j + 1);\n Edge currentEdge = possible.getPag().getEdge(from, to);\n\n if (currentEdge.getEndpoint1().equals(Endpoint.ARROW)) {\n impliesDecendant = false;\n break;\n }\n\n gc = new GraphChange();\n gc.addCollider(colider);\n gc.addRemove(currentEdge);\n colideChanges.add(gc);\n\n gc = new GraphChange();\n gc.addCollider(colider);\n gc.addOrient(to, from);\n colideChanges.add(gc);\n }\n if (impliesDecendant)\n pathChanges.addAll(colideChanges);\n }\n }\n }\n }\n\n pagChanges.add(pathChanges);\n }\n }\n return pagChanges;\n }", "public List<Hard> getAllHardQuestion()\n\t\t{\n\t\t\tList<Hard> Hard=(List<Hard>)this.hardRepository.findAll();\t\t\n\t\t\treturn Hard;\n\t\t}", "private void getTimeConditions(List<RuleInstance> rules,Set<Condition> conds)\n{\n for (RuleInstance ri : rules) {\n getTimeConditions(ri,rules,conds);\n }\n}", "public final void synpred7_InternalSafetyParser_fragment() throws RecognitionException { \n // InternalSafetyParser.g:3302:5: ( ( () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) ( ( Exclusively ) )? ( Occur | Occurs ) ) )\n // InternalSafetyParser.g:3302:6: ( () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) ( ( Exclusively ) )? ( Occur | Occurs ) )\n {\n // InternalSafetyParser.g:3302:6: ( () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) ( ( Exclusively ) )? ( Occur | Occurs ) )\n // InternalSafetyParser.g:3303:6: () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) ( ( Exclusively ) )? ( Occur | Occurs )\n {\n // InternalSafetyParser.g:3303:6: ()\n // InternalSafetyParser.g:3304:6: \n {\n }\n\n match(input,Whenever,FollowSets000.FOLLOW_21); if (state.failed) return ;\n // InternalSafetyParser.g:3306:6: ( ( ruleExpr ) )\n // InternalSafetyParser.g:3307:7: ( ruleExpr )\n {\n // InternalSafetyParser.g:3307:7: ( ruleExpr )\n // InternalSafetyParser.g:3308:8: ruleExpr\n {\n pushFollow(FollowSets000.FOLLOW_41);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n\n }\n\n match(input,Occurs,FollowSets000.FOLLOW_21); if (state.failed) return ;\n // InternalSafetyParser.g:3312:6: ( ( ruleExpr ) )\n // InternalSafetyParser.g:3313:7: ( ruleExpr )\n {\n // InternalSafetyParser.g:3313:7: ( ruleExpr )\n // InternalSafetyParser.g:3314:8: ruleExpr\n {\n pushFollow(FollowSets000.FOLLOW_46);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n\n }\n\n // InternalSafetyParser.g:3317:6: ( ( Exclusively ) )?\n int alt151=2;\n int LA151_0 = input.LA(1);\n\n if ( (LA151_0==Exclusively) ) {\n alt151=1;\n }\n switch (alt151) {\n case 1 :\n // InternalSafetyParser.g:3318:7: ( Exclusively )\n {\n // InternalSafetyParser.g:3318:7: ( Exclusively )\n // InternalSafetyParser.g:3319:8: Exclusively\n {\n match(input,Exclusively,FollowSets000.FOLLOW_47); if (state.failed) return ;\n\n }\n\n\n }\n break;\n\n }\n\n if ( input.LA(1)==Occurs||input.LA(1)==Occur ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n\n }\n\n\n }\n }", "public String toString() {\n StringBuilder builder = new StringBuilder();\n builder.append(getName()).append(\" \").append(getAge()).append(\"\\n\");\n for (Medication medication : medications) {\n builder.append(medication.toString()).append(\"\\n\");\n }\n builder.delete(builder.length() - 1, builder.length());\n return builder.toString();\n }", "private HashMap<String, Integer> getProducedResources() {\n HashMap<String, Integer> producedResources = new HashMap<>();\n\n // Ajoute à la liste des ressources produites par le joueur la ressource produite par la merveille\n producedResources.merge(wonder.getWonderResource().toString(), 1, Integer::sum);\n\n // Parcourt toutes les constructions afin de compte les ressources produites par les constructions\n for (Card card: buildings) {\n Iterator iterator = card.getProducedResources().entrySet().iterator();\n\n while (iterator.hasNext()) {\n Map.Entry pair = (Map.Entry)iterator.next();\n\n // Si la ressource produite n'est pas une pièce, on l'ajoute à la liste des ressources produites\n if (!pair.getKey().equals(\"COIN\")) {\n producedResources.merge((String)pair.getKey(), (Integer)pair.getValue(), Integer::sum);\n }\n\n iterator.remove();\n }\n }\n\n return producedResources;\n }", "public static double getCO2emissions(int timestep) {\n\t\t\n\t\tdouble co2StromDeutschland = 0.474; // nach Statistischen Daten\n\t\t\n\t\tco2StromDeutschland = 0.540; // nach Stefan's Master Arbeit - als Vergleich für Riemerling\n\t\t\n\t\treturn co2StromDeutschland; // current co2 emission level of Germany\n\t}", "public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }", "public Set<ExExam> getExams(int period) {\n Set<ExExam> set = new HashSet<ExExam>();\n if (iTable[period]!=null) set.add(iTable[period].variable());\n return set;\n }", "private void fillStudyConditionsData() {\n for (Condition condition : workbookStudy.getStudyConditions()) {\n if (condition.getDataType().equals(DATA_TYPE_CHAR)) {\n //LevelC levelCFilter = new LevelC(false);\n //levelCFilter.setFactorid(Integer.SIZE);\n //GCP NEW SCHEMA\n List<LevelC> levelCList = condition.getFactor().getLevelsC();\n if (levelCList != null && levelCList.size() > 0) { //study conditions will only have 1 level\n condition.setValue(levelCList.get(0).getLvalue());\n }\n } else {\n List<LevelN> levelNList = condition.getFactor().getLevelsN();\n if (levelNList != null && levelNList.size() > 0) {\n condition.setValue(levelNList.get(0).getLvalue());\n }\n }\n }\n }" ]
[ "0.4951531", "0.4889269", "0.48071587", "0.46873417", "0.46745917", "0.46309072", "0.45941228", "0.4579622", "0.45770097", "0.45553628", "0.45544752", "0.44846892", "0.4479715", "0.4425315", "0.43740493", "0.43636176", "0.43207046", "0.4308964", "0.43043098", "0.42999637", "0.42948377", "0.42587537", "0.42498466", "0.42373934", "0.4196877", "0.4189947", "0.4189649", "0.418293", "0.4155996", "0.4154752", "0.4144643", "0.41440907", "0.41430095", "0.41316938", "0.41308784", "0.41061348", "0.40923247", "0.408769", "0.4077358", "0.40625238", "0.4054679", "0.4042596", "0.4034737", "0.40313214", "0.40276894", "0.4020455", "0.40128013", "0.4004845", "0.39947796", "0.3984361", "0.39786157", "0.39672711", "0.39589995", "0.39473364", "0.39403763", "0.39309904", "0.391775", "0.39101973", "0.39101577", "0.39093593", "0.39091715", "0.39020622", "0.38937902", "0.3891136", "0.38830534", "0.38823897", "0.3881552", "0.3881545", "0.38780928", "0.38771424", "0.3876432", "0.38758412", "0.3872925", "0.38686708", "0.3868092", "0.38388076", "0.3832828", "0.38309136", "0.38213697", "0.38192597", "0.38159043", "0.3811825", "0.3807982", "0.3805344", "0.3796524", "0.37941122", "0.37936953", "0.37911716", "0.37892124", "0.378727", "0.37870845", "0.3785111", "0.37837806", "0.37827128", "0.37796605", "0.3778014", "0.377717", "0.37750208", "0.37742272", "0.37741023" ]
0.7071554
0
Created by Igor Goryainov skype glotemz on 08.03.2017 14:44.
public interface SmsApplyContract { interface View<T> extends BaseView<T> { void showEmptySmsCodeError(); void setSmsCode(final String smsCode); void smsApplySuccess(); } interface Presenter { void fillSmsField(); void registerSmsCodeReceiver(); void unregisterSmsCodeReceiver(); void fillSmsCodeField(); void applyCode(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void m50366E() {\n }", "private void init() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void anular() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "protected void mo6255a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "@Override\n public void init() {}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo12930a() {\n }", "public void mo55254a() {\n }", "@Override\n public void memoria() {\n \n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo21877s() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private Singletion3() {}", "static void feladat4() {\n\t}", "public abstract void mo70713b();", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public Pitonyak_09_02() {\r\n }", "public final void mo91715d() {\n }" ]
[ "0.5765826", "0.56388927", "0.56231415", "0.55807793", "0.55717814", "0.55403125", "0.55403125", "0.5538458", "0.5478013", "0.54749846", "0.54440916", "0.54140663", "0.5413458", "0.53626007", "0.53580564", "0.53446233", "0.53405", "0.5338819", "0.53039134", "0.5301156", "0.52972996", "0.52837265", "0.5279119", "0.5261695", "0.52536505", "0.52536505", "0.52536505", "0.52536505", "0.52536505", "0.52536505", "0.52536505", "0.5249662", "0.52486557", "0.52486557", "0.5241042", "0.5239257", "0.5233487", "0.5231519", "0.5210897", "0.5210897", "0.5210897", "0.5210897", "0.5210897", "0.5210897", "0.52088916", "0.5208418", "0.5206845", "0.5205575", "0.5205575", "0.5205575", "0.5205575", "0.5205575", "0.5194461", "0.518799", "0.5186295", "0.51757723", "0.5170616", "0.5170616", "0.5169722", "0.51688486", "0.5161521", "0.5158743", "0.51577705", "0.5152962", "0.51503915", "0.51502573", "0.511482", "0.51143205", "0.5112713", "0.51117426", "0.51097417", "0.5109203", "0.5109203", "0.5109203", "0.5107959", "0.5107959", "0.5107959", "0.51049024", "0.5099698", "0.5091635", "0.5090163", "0.5089949", "0.50875837", "0.50791514", "0.5076438", "0.5075693", "0.5073538", "0.5066741", "0.5060812", "0.5049815", "0.5049601", "0.5046395", "0.504089", "0.504089", "0.504089", "0.50342536", "0.50342536", "0.50306064", "0.5025864", "0.5025545", "0.50207025" ]
0.0
-1