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, \"hello@gmails.com\");\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\telement...
[ "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.5892697...
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\...
[ "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.5609...
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\...
[ "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.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(App...
[ "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.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}", "...
[ "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.520184...
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 */ ...
[ "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.551363...
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...
[ "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.5544340...
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 cod...
[ "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...
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 getExr...
[ "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.608016...
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 getExr...
[ "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.608016...
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.showConfirm...
[ "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.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\...
[ "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.60698...
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...
[ "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.649...
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 hasPasswor...
[ "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.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.getAns...
[ "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.554711...
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 } ...
[ "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.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 } ...
[ "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.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 } ...
[ "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.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(f...
[ "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.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 sub...
[ "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.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 f...
[ "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.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 Fil...
[ "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.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 bet...
[ "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.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 pro...
[ "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.58473...
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...
[ "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.5234...
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 ...
[ "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.694574...
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 pu...
[ "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.5881482...
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 Timestam...
[ "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.502277...
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 (...
[ "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.504923...
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 ...
[ "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.5614487...
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 c...
[ "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.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 ...
[ "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.73150...
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 TestDataHelpe...
[ "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.577015...
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 TestDataHelpe...
[ "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.552651...
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= tradi...
[ "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.5513...
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.h...
[ "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.61952...
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 ...
[ "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.5817...
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 TestDataHelpe...
[ "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.539561...
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...
[ "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.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.getUppe...
[ "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.72674...
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}...
[ "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.6566092...
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...
[ "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.5789...
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; // alwa...
[ "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.59517...
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 ...
[ "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.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 ...
[ "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.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 getExr...
[ "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.608016...
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 }"...
[ "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.604...
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 c...
[ "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.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 a...
[ "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.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...
[ "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.6742...
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(\"valu...
[ "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.67426...
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()...
[ "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.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 e...
[ "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.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}", ...
[ "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.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 ...
[ "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.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( ...
[ "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.7420...
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 }", "publi...
[ "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.8...
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\...
[ "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...
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}", ...
[ "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.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] = ...
[ "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.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( ...
[ "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.74064...
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 }", "publi...
[ "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.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\...
[ "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...
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}", ...
[ "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.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] = ...
[ "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.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( ...
[ "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.7420...
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 }", "publi...
[ "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.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 }",...
[ "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.604...
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...
[ "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.66251...
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\tpubl...
[ "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.564...
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 ...
[ "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.5958...
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\tret...
[ "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.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);", "@RolesAll...
[ "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.569...
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 retu...
[ "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.52486...
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 - (flo...
[ "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.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)) brea...
[ "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.61...
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.columnPos...
[ "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.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.getI...
[ "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.688610...
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 getLastMs...
[ "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.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()\...
[ "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.74199...
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 t...
[ "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.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...
[ "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.5831...
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 ...
[ "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.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...
[ "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...
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 ...
[ "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.607...
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();", "publ...
[ "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.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(...
[ "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.74199...
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(...
[ "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.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> getTracked...
[ "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.55...
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...
[ "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.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 ...
[ "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.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 (prescr...
[ "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....
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 cop...
[ "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.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 ...
[ "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.4858174...
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 }", ...
[ "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.503283...
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 }"...
[ "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.512...
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 //...
[ "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.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 setConditio...
[ "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.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() {...
[ "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...
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 vo...
[ "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.52...
0.0
-1